/* HETO SaaS — Dashboard + Modals v5 */
@import url("https://fonts.googleapis.com/css2?family=Epilogue:wght@500;600;700;800&family=Figtree:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

/* ══ RESET Hello Elementor & autres thèmes ══════════════════════
   Hello Elementor injecte a { text-decoration: underline } et
   des resets qui cassent le dashboard client. On neutralise tout. */
.hd-wrap,
.hd-wrap *,
.hd-wrap *::before,
.hd-wrap *::after,
.ha-wrap,
.ha-wrap *,
.htprc,
.htprc * {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}
.hd-wrap a, .hd-wrap a:hover, .hd-wrap a:visited,
.ha-wrap a, .ha-wrap a:hover, .ha-wrap a:visited,
.htprc a,  .htprc a:hover,  .htprc a:visited  { text-decoration: none !important; }
.hd-wrap h1, .hd-wrap h2, .hd-wrap h3,
.hd-wrap h4, .hd-wrap p, .hd-wrap ul,
.hd-wrap ol, .hd-wrap li,
.ha-wrap p, .ha-wrap ul, .ha-wrap li          { margin: 0; padding: 0; list-style: none; }
.hd-wrap button, .ha-wrap button              { font-family: inherit; cursor: pointer; }
.hd-wrap input, .hd-wrap select,
.hd-wrap textarea,
.ha-wrap input, .ha-wrap select,
.ha-wrap textarea                             { font-family: inherit; }
/* ══════════════════════════════════════════════════════════════ */

/* Variables globales sur :root pour que les modals (dans body) y accèdent */
:root {
  --hd-bg:#f7f9ff;--hd-bg2:#ffffff;--hd-bg3:#f1f5f9;--hd-bg4:#e8edf5;
  --hd-border:#e2e8f0;--hd-border2:#cbd5e1;
  --hd-text:#0f172a;--hd-text2:#475569;--hd-text3:#94a3b8;
  --hd-accent:#0C55F4;--hd-accent2:#0C55F4;
  --hd-green:#16a34a;--hd-amber:#e8983a;--hd-red:#dc2626;--hd-blue:#0C55F4;--hd-purple:#0C55F4;
  --hd-r:14px;
  --hd-font:'Roboto',-apple-system,sans-serif;
  --hd-mono:'JetBrains Mono',monospace;
  --hd-shadow:0 1px 3px rgba(0,0,0,.05),0 4px 14px rgba(0,0,0,.05);
}

/* ══ WRAPPER DASHBOARD ══════════════════════════════════════════ */
.hd-wrap{
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 9990 !important;
  display: flex !important;
  flex-direction: row !important;
  width: 100vw !important;
  height: 100vh !important;
  background: var(--hd-bg);
  color: var(--hd-text);
  font-family: var(--hd-font);
  overflow: hidden;
}
.hd-wrap *,.hd-overlay *{box-sizing:border-box}
.hd-wrap svg{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;display:inline-block;vertical-align:middle;flex-shrink:0}
/* Palette + node icons have explicit stroke colors — don't override them */
.hd-wf-pal-ico svg,.hd-wf-node-ico svg{stroke:unset;fill:unset;display:block!important;flex-shrink:0!important}

/* SIDEBAR */
.hd-sidebar{width:240px;min-width:240px;flex-shrink:0;background:#fff;border-right:1px solid var(--hd-border);display:flex;flex-direction:column;height:100%;overflow-y:auto;z-index:2}
.hd-logo{display:flex;align-items:center;gap:10px;padding:18px 20px;border-bottom:1px solid var(--hd-border);text-decoration:none;transition:background .15s}
.hd-logo:hover{background:var(--hd-bg3)}
.hd-logo-icon{width:36px;height:36px;background:var(--hd-accent);border-radius:10px;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px rgba(12,85,244,.25);flex-shrink:0;position:relative;overflow:hidden;transition:background .2s}
.hd-logo-icon img{transition:opacity .2s,transform .2s}
.hd-logo-icon .hd-logo-back{position:absolute;stroke:#fff;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;fill:none;opacity:0;transform:translateX(-4px);transition:opacity .2s,transform .2s}
.hd-logo:hover .hd-logo-icon img{opacity:0;transform:scale(.7)}
.hd-logo:hover .hd-logo-icon .hd-logo-back{opacity:1;transform:translateX(0)}
.hd-logo:hover .hd-logo-icon{background:#0637AF}
.hd-logo-name{font-size:14px;font-weight:700;color:var(--hd-text);line-height:1.2}
.hd-logo-sub{font-size:10px;color:var(--hd-text3);margin-top:1px}
.hd-logo:hover .hd-logo-sub{color:var(--hd-accent)}
.hd-logo svg{width:20px;height:20px;stroke:var(--hd-accent)}
.hd-workspace{padding:12px 20px;border-bottom:1px solid var(--hd-border)}
.hd-ws-name{font-size:13px;font-weight:700;margin-bottom:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hd-plan-badge{display:inline-block;padding:2px 9px;border-radius:20px;font-size:10px;font-weight:700}
.hd-plan-trial{background:rgba(245,158,11,.15);color:var(--hd-amber)}
.hd-plan-pro{background:rgba(12,85,244,.15);color:var(--hd-accent2)}
.hd-plan-business{background:rgba(34,211,160,.15);color:var(--hd-green)}
.hd-nav{display:flex;flex-direction:column;gap:1px;padding:10px;flex:1;overflow-y:auto}
.hd-nav-item{display:flex;align-items:center;gap:9px;padding:9px 11px;border-radius:10px;font-size:13px;font-weight:500;color:var(--hd-text2);cursor:pointer;transition:all .15s;text-decoration:none!important;position:relative}
.hd-nav-item svg{width:15px;height:15px;flex-shrink:0}
.hd-nav-item.active::before{content:'';position:absolute;left:0;top:25%;bottom:25%;width:3px;border-radius:2px;background:var(--hd-accent)}
.hd-nav-item:hover{background:#EEF4FF!important;color:var(--hd-accent)!important}
.hd-nav-item.active{background:#EEF4FF!important;color:var(--hd-accent)!important;font-weight:600!important}
.hd-badge-count{margin-left:auto;background:var(--hd-amber);color:#000;font-size:10px;font-weight:800;padding:1px 6px;border-radius:20px}
.hd-sidebar-footer{padding:14px 18px;border-top:1px solid var(--hd-border)}
.hd-trial-warn{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--hd-amber);margin-bottom:9px}
.hd-logout{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--hd-text3);text-decoration:none;padding:7px 10px;border-radius:8px;transition:.12s}
.hd-logout:hover{background:var(--hd-bg3);color:var(--hd-text)}

/* MAIN */
.hd-main{flex:1;min-width:0;height:100%;overflow-y:auto;overflow-x:hidden;background:var(--hd-bg);display:flex;flex-direction:column}
.hd-page{display:none;padding:0;flex:1;overflow-y:auto;overflow-x:hidden}
.hd-page.active{display:block;overflow-y:auto;overflow-x:hidden}
/* Workflows — override complet */
#hd-page-workflows.active{display:flex!important;flex-direction:row!important;padding:0!important;overflow:hidden!important;height:100%!important}
body.hd-wf-mode .hd-sidebar{display:none!important}
body.hd-wf-mode .hd-main{overflow:hidden!important;width:100%!important}
#hd-page-conversations{padding:0!important}
#hd-page-conversations.active{display:flex!important;flex-direction:column!important;overflow:hidden!important;height:100%!important}
#hd-page-editor{overflow:hidden!important}
#hd-page-editor.active{display:flex!important;flex-direction:column!important;height:100%!important;overflow:hidden!important}
.hd-page-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}
.hd-page-header h1{font-size:21px;font-weight:800;margin:0;color:var(--hd-text)}

/* STATS */
.hd-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-bottom:22px}
.hd-stat{background:#fff;border:1px solid var(--hd-border);border-radius:var(--hd-r);padding:18px 20px;display:flex;align-items:flex-start;gap:14px;box-shadow:var(--hd-shadow);transition:box-shadow .15s;min-width:0}
.hd-stat-ico{width:40px;height:40px;border-radius:11px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.hd-stat-ico svg{width:16px;height:16px}
.hd-stat-ico.blue{background:rgba(96,165,250,.12);}.hd-stat-ico.blue svg{stroke:var(--hd-blue)}
.hd-stat-ico.amber{background:rgba(245,158,11,.12)}.hd-stat-ico.amber svg{stroke:var(--hd-amber)}
.hd-stat-ico.green{background:rgba(34,211,160,.12)}.hd-stat-ico.green svg{stroke:var(--hd-green)}
.hd-stat-ico.purple{background:rgba(12,85,244,.12)}.hd-stat-ico.purple svg{stroke:var(--hd-purple)}
.hd-stat-val{font-size:26px;font-weight:800;line-height:1;margin-bottom:4px;color:var(--hd-text)}
.hd-stat-lbl{font-size:11px;color:var(--hd-text3)}

.hd-stat > div:last-child{min-width:0}
.hd-stat-lbl,.hd-stat-val{word-break:break-word}

/* CARDS */
.hd-card{background:#fff;border:1px solid var(--hd-border);border-radius:var(--hd-r);overflow:hidden;box-shadow:var(--hd-shadow);margin-bottom:16px}
.hd-card-head{display:flex;align-items:center;justify-content:space-between;font-size:13px;font-weight:700;margin-bottom:14px;gap:8px;color:var(--hd-text)}
.hd-card-head svg{width:14px;height:14px;stroke:var(--hd-accent2);margin-right:5px}
.hd-section-title{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--hd-text3);margin-bottom:10px}
.hd-hint{font-size:11px;color:var(--hd-text3);margin-top:4px}
.hd-empty-small{color:var(--hd-text3);font-size:13px;padding:16px;text-align:center}

/* EMBED */
.hd-embed-box{display:flex;align-items:center;gap:10px;background:var(--hd-bg3);border:1px solid var(--hd-border2);border-radius:8px;padding:9px 13px;margin:10px 0}
.hd-embed-box code{flex:1;font-size:11.5px;font-family:monospace;color:var(--hd-accent2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hd-copy-btn{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border-radius:7px;border:1px solid var(--hd-border2);background:var(--hd-bg4);color:var(--hd-text2);font-size:11px;font-weight:600;cursor:pointer;transition:.12s;white-space:nowrap;flex-shrink:0;font-family:inherit}
.hd-copy-btn svg{width:11px;height:11px}
.hd-copy-btn:hover{background:var(--hd-accent);color:#fff;border-color:var(--hd-accent)}

/* BUTTONS */
.hd-btn{display:inline-flex;align-items:center;gap:6px;padding:7px 15px;border-radius:9px;border:1px solid var(--hd-border2);background:var(--hd-bg3);color:var(--hd-text);font-size:13px;font-weight:600;cursor:pointer;transition:.12s;font-family:inherit;line-height:1}
.hd-btn svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.hd-btn:hover:not(:disabled){background:var(--hd-bg4);border-color:var(--hd-accent2)}
.hd-btn:disabled{opacity:.5;cursor:not-allowed}
.hd-btn-primary{background:var(--hd-accent);border-color:var(--hd-accent);color:#fff}
.hd-btn-primary:hover:not(:disabled){background:#0637AF;border-color:#0637AF}
.hd-btn-reset{color:var(--hd-text2);border-color:var(--hd-border2);background:var(--hd-bg2)}
.hd-btn-reset:hover{color:#ef4444;border-color:rgba(239,68,68,.4);background:rgba(239,68,68,.06)}
.hd-btn-danger{border-color:rgba(248,113,113,.3);color:var(--hd-red)}
.hd-btn-danger:hover{background:rgba(248,113,113,.08)}
.hd-btn-sm{padding:5px 10px;font-size:12px;border-radius:7px}
.hd-btn-lg{padding:10px 22px;font-size:14px}
.hd-btn-full{width:100%;justify-content:center}

/* PILLS & STATUS */
.hd-pill{display:inline-block;padding:2px 8px;border-radius:20px;font-size:10px;font-weight:700}
.hd-pill.green{background:rgba(34,211,160,.12);color:var(--hd-green)}
.hd-pill.gray{background:var(--hd-bg3);color:var(--hd-text3)}
.hd-dot{display:inline-block;width:7px;height:7px;border-radius:50%;flex-shrink:0}
.hd-dot.open{background:var(--hd-amber)}.hd-dot.handled_ai{background:var(--hd-accent)}
.hd-dot.handled_human{background:var(--hd-green)}.hd-dot.closed{background:var(--hd-text3)}
.hd-badge-status{display:inline-flex;padding:2px 7px;border-radius:20px;font-size:10px;font-weight:700}
.hd-badge-status.open{background:rgba(245,158,11,.15);color:var(--hd-amber)}
.hd-badge-status.handled_ai{background:rgba(12,85,244,.15);color:var(--hd-accent2)}
.hd-badge-status.handled_human{background:rgba(34,211,160,.15);color:var(--hd-green)}
.hd-badge-status.closed{background:var(--hd-bg3);color:var(--hd-text3)}

/* WIDGETS */
.hd-widget-card{background:var(--hd-bg2);border:1px solid var(--hd-border);border-radius:var(--hd-r);padding:16px;margin-bottom:12px}
.hd-widget-card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.hd-widget-info{display:flex;align-items:center;gap:9px}
.hd-widget-dot{width:9px;height:9px;border-radius:50%;flex-shrink:0}
.hd-widget-info strong{font-size:14px;font-weight:700;color:var(--hd-text)}

/* RECENT */
.hd-recent-item{display:flex;align-items:center;gap:10px;padding:10px 13px;background:var(--hd-bg2);border:1px solid var(--hd-border);border-radius:9px;cursor:pointer;transition:.12s;margin-bottom:6px}
.hd-recent-item:hover{border-color:var(--hd-border2);background:var(--hd-bg3)}
.hd-recent-name{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--hd-text)}
.hd-recent-msg{font-size:11px;color:var(--hd-text3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hd-recent-time{font-size:10px;color:var(--hd-text3);white-space:nowrap;flex-shrink:0}

/* CONVERSATIONS */
.hd-conv-wrap{display:flex;height:100%;background:var(--hd-bg2);overflow:hidden}
.hd-conv-left{width:300px;flex-shrink:0;border-right:1px solid var(--hd-border);display:flex;flex-direction:column;overflow:hidden}
.hd-conv-list{flex:1;overflow-y:auto}
.hd-conv-item{padding:12px 13px;border-bottom:1px solid var(--hd-border);cursor:pointer;transition:.12s}
.hd-conv-item:hover,.hd-conv-item.active{background:var(--hd-bg3)}
.hd-conv-top{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:3px}
.hd-conv-name{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--hd-text)}
.hd-conv-time{font-size:10px;color:var(--hd-text3);white-space:nowrap;flex-shrink:0}
.hd-conv-prev{font-size:11px;color:var(--hd-text3);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-bottom:4px}
.hd-conv-meta{display:flex;gap:6px;align-items:center}
.hd-conv-empty-state,.hd-conv-empty,.hd-conv-loading,.hd-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;gap:10px;color:var(--hd-text3);font-size:13px;padding:20px;text-align:center}
.hd-conv-panel{flex:1;display:flex;flex-direction:column;overflow:hidden;min-width:0}
.hd-cpanel-head{padding:13px 16px;border-bottom:1px solid var(--hd-border);display:flex;align-items:flex-start;justify-content:space-between;gap:10px;flex-shrink:0}
.hd-cpanel-name{font-size:15px;font-weight:700;color:var(--hd-text)}
.hd-tag{display:inline-flex;padding:2px 7px;border-radius:6px;font-size:10px;background:var(--hd-bg3);color:var(--hd-text2)}
.hd-tag.green{background:rgba(34,211,160,.1);color:var(--hd-green)}
.hd-tag.amber{background:rgba(245,158,11,.1);color:var(--hd-amber)}
.hd-conv-msgs{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px}
.hd-msg{display:flex;flex-direction:column;max-width:72%}
.hd-msg.user{align-self:flex-end;align-items:flex-end}
.hd-msg.bot,.hd-msg.agent{align-self:flex-start;align-items:flex-start}
.hd-bubble{padding:9px 13px;border-radius:13px;font-size:13px;line-height:1.5}
.hd-msg.user .hd-bubble{background:var(--hd-accent);color:#fff;border-bottom-right-radius:4px}
.hd-msg.bot .hd-bubble{background:var(--hd-bg3);color:var(--hd-text);border-bottom-left-radius:4px}
.hd-msg.agent .hd-bubble{background:rgba(34,211,160,.1);color:var(--hd-green);border-bottom-left-radius:4px}
.hd-msg-meta{font-size:10px;color:var(--hd-text3);margin-top:3px;display:flex;align-items:center;gap:3px}
.hd-reply-area{padding:10px 13px;border-top:1px solid var(--hd-border);flex-shrink:0}
.hd-reply-area textarea{width:100%;background:var(--hd-bg3);border:1px solid var(--hd-border2);border-radius:8px;color:var(--hd-text);padding:8px 11px;font-size:13px;font-family:inherit;resize:none;outline:none;margin-bottom:7px}
.hd-reply-area textarea:focus{border-color:var(--hd-accent)}

/* FORMS (dashboard) */
.hd-field{margin-bottom:13px}
.hd-field>label{display:block;font-size:11.5px;font-weight:600;color:var(--hd-text2);margin-bottom:5px}
.hd-field input,.hd-field textarea,.hd-field select{width:100%;background:var(--hd-bg3);border:1px solid var(--hd-border2);border-radius:8px;color:var(--hd-text);padding:8px 11px;font-size:13px;font-family:inherit;outline:none;transition:.12s}
.hd-field input:focus,.hd-field textarea:focus,.hd-field select:focus{border-color:var(--hd-accent)}

/* BILLING */
.hd-billing-current{display:flex;align-items:center;justify-content:space-between;background:var(--hd-bg2);border:1px solid var(--hd-border);border-radius:var(--hd-r);padding:16px 18px;margin-bottom:18px}
.hd-billing-plan{font-size:15px;font-weight:700;color:var(--hd-text)}
.hd-billing-exp{font-size:12px;color:var(--hd-text3);margin-top:3px}
.hd-plans{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.hd-plan-card{background:var(--hd-bg2);border:1px solid var(--hd-border);border-radius:var(--hd-r);padding:22px;position:relative}
.hd-plan-card.featured{border-color:var(--hd-accent);background:rgba(12,85,244,.04)}
.hd-plan-rec{position:absolute;top:-1px;right:18px;background:var(--hd-accent);color:#fff;font-size:10px;font-weight:800;padding:3px 9px;border-radius:0 0 7px 7px}
.hd-plan-name{font-size:19px;font-weight:800;color:var(--hd-text);margin-bottom:5px}
.hd-plan-price{font-size:30px;font-weight:800;color:var(--hd-text);margin-bottom:14px}
.hd-plan-price span{font-size:13px;font-weight:500;color:var(--hd-text3)}
.hd-plan-feats{list-style:none;padding:0;margin:0 0 18px;display:flex;flex-direction:column;gap:7px}
.hd-plan-feats li{display:flex;align-items:center;gap:7px;font-size:12.5px;color:var(--hd-text)}
.hd-plan-feats li svg{stroke:var(--hd-green);flex-shrink:0}
.hd-plan-current-lbl{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:700;color:var(--hd-green);margin-top:18px}
.hd-plan-card .hd-btn-full{margin-top:18px !important}

/* EMPTY STATE */
.hd-empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:56px 20px;text-align:center;gap:12px}
.hd-empty-state svg{width:52px;height:52px;opacity:.2}
.hd-empty-state h3{font-size:18px;font-weight:800;margin:0;color:var(--hd-text)}
.hd-empty-state p{color:var(--hd-text3);font-size:14px;margin:0;max-width:320px}

/* ══════════════════════════════════════════════════════════
   MODALS — injectées dans <body> via JS
   Utilisent les variables :root — pas de dépendance à .hd-wrap
══════════════════════════════════════════════════════════ */
.hd-overlay{
  position:fixed;top:0;left:0;width:100%;height:100%;
  background:rgba(0,0,0,.8);
  z-index:999999;
  display:flex;align-items:center;justify-content:center;
  padding:20px;
  font-family:var(--hd-font);
  color:var(--hd-text);
}
.hd-modal{
  background:var(--hd-bg2);
  border:1px solid var(--hd-border2);
  border-radius:16px;
  display:flex;flex-direction:column;
  overflow:hidden;
  max-height:90vh;
  width:100%;
  box-shadow:0 24px 80px rgba(0,0,0,.7);
}
.hd-modal-sm{max-width:520px}
.hd-modal-lg{max-width:920px}
.hd-modal-hd{
  display:flex;align-items:flex-start;justify-content:space-between;
  padding:18px 22px;border-bottom:1px solid var(--hd-border);
  flex-shrink:0;gap:12px;
}
.hd-modal-title{font-size:16px;font-weight:800;color:var(--hd-text);margin:0}
.hd-modal-subtitle{font-size:12px;color:var(--hd-text3);margin-top:4px}
.hd-modal-x{
  display:flex;align-items:center;justify-content:center;
  width:30px;height:30px;border-radius:8px;
  border:1px solid var(--hd-border2);background:var(--hd-bg3);
  color:var(--hd-text2);cursor:pointer;transition:.12s;flex-shrink:0;
}
.hd-modal-x:hover{background:var(--hd-bg4)}
.hd-modal-x svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.hd-modal-bd{flex:1;overflow-y:auto;padding:20px 22px;color:var(--hd-text)}
.hd-modal-ft{
  display:flex;align-items:center;justify-content:flex-end;
  gap:9px;padding:13px 22px;
  border-top:1px solid var(--hd-border);flex-shrink:0;
}

/* Champs dans modals */
.hd-overlay .hd-field{margin-bottom:13px}
.hd-overlay .hd-field>label{display:block;font-size:11.5px;font-weight:600;color:var(--hd-text2);margin-bottom:5px}
.hd-overlay .hd-field input,.hd-overlay .hd-field textarea,.hd-overlay .hd-field select{
  width:100%;background:var(--hd-bg3);border:1px solid var(--hd-border2);
  border-radius:8px;color:var(--hd-text);padding:8px 11px;
  font-size:13px;font-family:var(--hd-font);outline:none;transition:.12s;
}
.hd-overlay .hd-field input:focus,.hd-overlay .hd-field textarea:focus,.hd-overlay .hd-field select:focus{border-color:var(--hd-accent)}
.hd-overlay .hd-hint{font-size:11px;color:var(--hd-text3);margin-top:4px}
.hd-overlay .hd-2col{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.hd-overlay .hd-field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.hd-overlay .hd-color-row{display:flex;align-items:center;gap:7px}
.hd-overlay .hd-color-row input[type=color]{width:34px;height:34px;border-radius:7px;border:1px solid var(--hd-border2);background:var(--hd-bg3);padding:2px;cursor:pointer;flex-shrink:0}
.hd-overlay .hd-color-row input[type=text]{flex:1}
.hd-overlay .hd-toggle-row{display:flex;align-items:center;justify-content:space-between;padding:11px 0;border-bottom:1px solid var(--hd-border);gap:16px}
.hd-overlay .hd-toggle-row b{font-size:13px;font-weight:600;color:var(--hd-text)}
.hd-overlay .req{color:var(--hd-red)}
.hd-overlay .hd-info-box{display:flex;align-items:flex-start;gap:9px;padding:11px 13px;border-radius:9px;font-size:12px;line-height:1.5}
.hd-overlay .hd-info-box svg{width:13px;height:13px;flex-shrink:0;margin-top:1px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.hd-overlay .hd-info-box.green{background:rgba(34,211,160,.07);border:1px solid rgba(34,211,160,.2);color:var(--hd-green)}
.hd-overlay .hd-info-box.blue{background:rgba(96,165,250,.07);border:1px solid rgba(96,165,250,.2);color:var(--hd-blue)}
.hd-overlay .hd-pos-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:6px}
.hd-overlay .hd-pos-btn{padding:9px;border-radius:8px;border:1px solid var(--hd-border2);background:var(--hd-bg3);color:var(--hd-text2);font-size:12px;font-weight:600;cursor:pointer;transition:.12s;font-family:inherit;text-align:center;width:100%}
.hd-overlay .hd-pos-btn:hover{border-color:var(--hd-accent2)}
.hd-overlay .hd-pos-btn.active{border-color:var(--hd-accent);background:rgba(12,85,244,.12);color:var(--hd-accent2)}
/* Toggles */
.hd-toggle{position:relative;width:38px;height:21px;display:inline-block;flex-shrink:0}
.hd-toggle input{opacity:0;width:0;height:0;position:absolute}
.hd-slider{position:absolute;inset:0;background:#d1d5e0;border-radius:999px;cursor:pointer;transition:background .2s}
.hd-slider:before{content:'';position:absolute;width:15px;height:15px;left:3px;top:3px;background:#fff;border-radius:50%;transition:transform .2s,opacity .2s;box-shadow:0 1px 4px rgba(0,0,0,.2);opacity:.7}
.hd-toggle input:checked+.hd-slider{background:var(--hd-accent)}
.hd-toggle input:checked+.hd-slider:before{transform:translateX(17px);opacity:1}
/* Wizard dots */
.hd-wiz-dots{display:flex;align-items:center;justify-content:center;gap:8px;padding:14px;border-bottom:1px solid var(--hd-border)}
.hd-wiz-dot{width:10px;height:10px;border-radius:50%;background:var(--hd-bg4);border:2px solid var(--hd-border2);transition:.2s;flex-shrink:0}
.hd-wiz-dot.active{background:var(--hd-accent);border-color:var(--hd-accent);transform:scale(1.2)}
.hd-wiz-dot.done{background:var(--hd-green);border-color:var(--hd-green)}
/* Tabs éditeur */
.hd-tabs{display:flex;padding:0 22px;border-bottom:1px solid var(--hd-border);flex-shrink:0;gap:2px;background:var(--hd-bg2)}
.hd-tab{display:inline-flex;align-items:center;gap:6px;padding:11px 14px;font-size:12.5px;font-weight:600;color:var(--hd-text2);cursor:pointer;border:none;background:none;border-bottom:2px solid transparent;transition:.12s;font-family:inherit;margin-bottom:-1px}
.hd-tab svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.hd-tab:hover{color:var(--hd-text)}
.hd-tab.active{color:var(--hd-accent2);border-bottom-color:var(--hd-accent)}
.hd-edit-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,38vw);flex:1;overflow:hidden;min-height:0}
#edit-body{overflow-y:auto;padding:20px 22px}
.hd-edit-preview-col{border-left:1px solid var(--hd-border);background:repeating-linear-gradient(45deg,var(--hd-bg) 0,var(--hd-bg) 10px,var(--hd-bg2) 10px,var(--hd-bg2) 20px);padding:16px;display:flex;flex-direction:column;align-items:center;overflow:hidden}
.hd-preview-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--hd-text3);margin-bottom:12px;align-self:flex-start}
/* Widget preview */
.hd-pw{width:min(100%,380px);background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 10px 36px rgba(0,0,0,.4);display:flex;flex-direction:column}
.hd-pw-head{padding:9px 11px;display:flex;align-items:center;gap:7px;flex-shrink:0}
.hd-pw-av{width:28px;height:28px;border-radius:50%;background:rgba(255,255,255,.2);display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:800;color:#fff;flex-shrink:0}
.hd-pw-t{color:#fff;font-size:12px;font-weight:700;line-height:1.2}
.hd-pw-s{color:rgba(255,255,255,.8);font-size:10px;display:flex;align-items:center;gap:4px}
.hd-online-dot{width:6px;height:6px;border-radius:50%;background:#22d3a0;display:inline-block;flex-shrink:0}
.hd-pw-msgs{background:#f1f5f9;padding:10px;flex:1;min-height:55px}
.hd-pw-bubble{background:#fff;border-radius:10px 10px 10px 3px;padding:7px 10px;font-size:11px;line-height:1.4;box-shadow:0 1px 3px rgba(0,0,0,.07);color:#1e293b;display:inline-block;max-width:100%}
.hd-pw-inp{background:#fff;border-top:1px solid #e2e8f0;padding:7px;display:flex;align-items:center;gap:5px}
.hd-pw-inp span{flex:1;font-size:10.5px;color:#94a3b8;background:#f8fafc;border:1px solid #e2e8f0;border-radius:7px;padding:5px 8px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* Toast */
.hd-toast{position:fixed;bottom:22px;right:22px;padding:10px 16px;border-radius:10px;font-size:13px;font-weight:600;z-index:9999999;animation:hdIn .2s ease;box-shadow:0 4px 20px rgba(0,0,0,.25);font-family:var(--hd-font)}
.hd-toast.hd-toast-save{background:var(--hd-bg2);color:var(--hd-text);border:1px solid var(--hd-border);box-shadow:0 4px 16px rgba(0,0,0,.10);font-weight:500;display:flex;align-items:center;gap:8px}
.hd-toast.hd-toast-save .hd-toast-check{width:18px;height:18px;border-radius:50%;background:#22d3a0;display:flex;align-items:center;justify-content:center;flex-shrink:0}
@keyframes hdIn{from{transform:translateY(16px);opacity:0}to{transform:translateY(0);opacity:1}}

/* ══ WIDGET BUILDER ══════════════════════════════════════════════════════ */
.wb-wrap{display:flex;flex-direction:column;gap:12px;padding:2px 0}
.wb-section{background:var(--hd-bg3);border:1px solid var(--hd-border);border-radius:10px;overflow:hidden}
.wb-section-title{padding:10px 14px;font-size:12px;font-weight:700;color:var(--hd-text2);border-bottom:1px solid var(--hd-border);display:flex;align-items:center;gap:7px;background:var(--hd-bg4)}
.wb-row{display:grid;grid-template-columns:130px 1fr;align-items:center;gap:10px;padding:7px 14px;border-top:1px solid var(--hd-border)}
.wb-row:first-child{border-top:none}
.wb-label{font-size:11.5px;color:var(--hd-text2);font-weight:500}
.wb-input,.wb-select{background:var(--hd-bg2);border:1px solid var(--hd-border2);border-radius:7px;padding:5px 9px;font-size:12px;color:var(--hd-text);font-family:var(--hd-font);width:100%;outline:none;transition:border-color .15s}
.wb-input:focus,.wb-select:focus{border-color:var(--hd-accent)}
.wb-color-wrap{display:flex;align-items:center;gap:7px}
.wb-cp{width:28px;height:28px;border-radius:6px;border:2px solid var(--hd-border2);padding:1px;background:none;cursor:pointer;flex-shrink:0}
.wb-cp::-webkit-color-swatch-wrapper{padding:0;border-radius:3px}
.wb-cp::-webkit-color-swatch{border:none;border-radius:3px}
.wb-ct{flex:1;background:var(--hd-bg2);border:1px solid var(--hd-border2);border-radius:7px;padding:5px 8px;font-size:11px;color:var(--hd-text);font-family:'Courier New',monospace;outline:none;transition:border-color .15s}
.wb-ct:focus{border-color:var(--hd-accent)}
.wb-range-wrap{display:flex;align-items:center;gap:8px}
.wb-range{flex:1;-webkit-appearance:none;height:4px;background:var(--hd-bg4);border-radius:4px;outline:none;cursor:pointer}
.wb-range::-webkit-slider-thumb{-webkit-appearance:none;width:15px;height:15px;border-radius:50%;background:var(--hd-accent);cursor:pointer;box-shadow:0 2px 6px rgba(12,85,244,.4)}
.wb-rval{font-size:11px;color:var(--hd-accent2);font-weight:700;min-width:34px;text-align:right;font-family:'Courier New',monospace}

/* ══ FILTRES CONVERSATIONS ══════════════════════════════════════════════ */
.hd-conv-filters {
  flex-shrink: 0;
  display: flex;
  gap: 5px;
  padding: 10px 10px 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--hd-border);
  background: var(--hd-bg2);
  overflow-x: auto;
  scrollbar-width: none;
}
.hd-conv-filters::-webkit-scrollbar { display: none; }
.hd-filter-btn {
  all: unset;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 20px;
  border: 1px solid var(--hd-border2);
  color: var(--hd-text2);
  background: var(--hd-bg3);
  transition: .15s;
  white-space: nowrap;
}
.hd-filter-btn:hover { border-color: var(--hd-accent); color: var(--hd-accent); }
.hd-filter-btn.active { background: var(--hd-accent) !important; border-color: var(--hd-accent) !important; color: #fff !important; }

/* ══ BADGE SOURCE SITE ══════════════════════════════════════════════════ */
.hd-conv-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(12,85,244,.1);
  color: var(--hd-accent);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ══ BOUTON UPGRADE ════════════════════════════════════════════════════ */
.hd-btn-upgrade {
  background: linear-gradient(135deg, #f59e0b, #ef4444) !important;
  border-color: transparent !important;
  color: #fff !important;
}
.hd-btn-upgrade:hover { opacity: .9; }
.hd-pill-upgrade {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  background: rgba(255,255,255,.3);
  margin-left: 3px;
  vertical-align: middle;
}

/* ══ MODAL UPGRADE ═════════════════════════════════════════════════════ */
#hd-upgrade-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hd-upgrade-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2,6,23,.6);
  backdrop-filter: blur(4px);
}
.hd-upgrade-box {
  position: relative;
  background: var(--hd-bg2);
  border: 1px solid var(--hd-border);
  border-radius: 20px;
  padding: 32px 28px;
  width: min(480px, calc(100vw - 32px));
  box-shadow: 0 24px 64px rgba(2,6,23,.4);
  text-align: center;
  transform: translateY(16px) scale(.97);
  opacity: 0;
  transition: transform .25s cubic-bezier(.34,1.2,.64,1), opacity .2s ease;
}
.hd-upgrade-box.visible { transform: translateY(0) scale(1); opacity: 1; }
.hd-upgrade-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg,rgba(245,158,11,.15),rgba(239,68,68,.15));
  color: #f59e0b;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.hd-upgrade-box h3 { font-size: 20px; font-weight: 700; margin: 0 0 8px; color: var(--hd-text); }
.hd-upgrade-box p  { font-size: 13px; color: var(--hd-text2); margin: 0 0 24px; line-height: 1.6; }
.hd-upgrade-box .hd-btn-primary,
.hd-upgrade-box .hd-btn-primary:hover,
.hd-overlay .hd-btn-primary,
.hd-overlay .hd-btn-primary:hover { color: #fff !important; background: var(--hd-accent) !important; }
.hd-upgrade-box .hd-btn-primary:hover,
.hd-overlay .hd-btn-primary:hover { background: #0637AF !important; }
.hd-upgrade-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.hd-upgrade-plan {
  border: 1px solid var(--hd-border2);
  border-radius: 14px;
  padding: 16px 14px;
  text-align: left;
  background: var(--hd-bg3);
}
.hd-upgrade-plan.featured {
  border-color: var(--hd-accent);
  background: rgba(12,85,244,.06);
  position: relative;
}
.hd-up-rec {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--hd-accent);
  margin-bottom: 6px;
}
.hd-up-name  { font-size: 14px; font-weight: 700; margin-bottom: 4px; color: var(--hd-text); }
.hd-up-price { font-size: 22px; font-weight: 800; color: var(--hd-text); margin-bottom: 8px; }
.hd-up-price span { font-size: 12px; font-weight: 400; color: var(--hd-text2); }
.hd-up-feat  { font-size: 11px; color: var(--hd-text2); margin-bottom: 3px; }
.hd-upgrade-close {
  all: unset;
  cursor: pointer;
  font-size: 12px;
  color: var(--hd-text3);
  padding: 8px 16px;
  border-radius: 8px;
  transition: .12s;
  display: block;
  margin: 0 auto;
}
.hd-upgrade-close:hover { color: var(--hd-text); background: var(--hd-bg3); }


/* ══ SCROLLBAR CUSTOM ══════════════════════════════════════════════════ */
/* Firefox */
.hd-main,
.hd-conv-list,
.hd-conv-msgs,
.hd-modal-bd,
#edit-body,
.hd-conv-panel {
  scrollbar-width: thin;
  scrollbar-color: var(--hd-border2) transparent;
}
/* Chrome/Safari/Edge */
.hd-main::-webkit-scrollbar,
.hd-conv-list::-webkit-scrollbar,
.hd-conv-msgs::-webkit-scrollbar,
.hd-modal-bd::-webkit-scrollbar,
#edit-body::-webkit-scrollbar,
.hd-conv-panel::-webkit-scrollbar { width: 4px; }

.hd-main::-webkit-scrollbar-track,
.hd-conv-list::-webkit-scrollbar-track,
.hd-conv-msgs::-webkit-scrollbar-track,
.hd-modal-bd::-webkit-scrollbar-track,
#edit-body::-webkit-scrollbar-track,
.hd-conv-panel::-webkit-scrollbar-track { background: transparent; }

.hd-main::-webkit-scrollbar-thumb,
.hd-conv-list::-webkit-scrollbar-thumb,
.hd-conv-msgs::-webkit-scrollbar-thumb,
.hd-modal-bd::-webkit-scrollbar-thumb,
#edit-body::-webkit-scrollbar-thumb,
.hd-conv-panel::-webkit-scrollbar-thumb {
  background: var(--hd-border2);
  border-radius: 4px;
}
.hd-main::-webkit-scrollbar-thumb:hover,
.hd-conv-left::-webkit-scrollbar-thumb:hover, .hd-conv-list::-webkit-scrollbar-thumb:hover,
.hd-conv-msgs::-webkit-scrollbar-thumb:hover,
.hd-modal-bd::-webkit-scrollbar-thumb:hover,
#edit-body::-webkit-scrollbar-thumb:hover,
.hd-conv-panel::-webkit-scrollbar-thumb:hover { background: var(--hd-text3); }

/* ══ LIMITES & PROGRESSION ════════════════════════════════════════════ */
.hd-limits-bar { margin: 16px 0 0; display: flex; flex-direction: column; gap: 10px; }
.hd-limit-row  { display: flex; flex-direction: column; gap: 5px; }
.hd-limit-info { display: flex; justify-content: space-between; align-items: center; }
.hd-limit-label{ font-size: 12px; font-weight: 500; color: var(--hd-text2); }
.hd-limit-val  { font-size: 12px; font-weight: 600; color: var(--hd-text); font-family: 'Courier New', monospace; }
.hd-limit-track{ height: 5px; background: var(--hd-bg4); border-radius: 4px; overflow: hidden; }
.hd-limit-fill { height: 100%; border-radius: 4px; transition: width .5s cubic-bezier(.4,0,.2,1); }
.hd-limit-warn { font-size: 11.5px; color: #f59e0b; }

/* Bannière plan expiré */
.hd-warn-expired { background: rgba(239,68,68,.12) !important; color: #ef4444 !important; border: 1px solid rgba(239,68,68,.25) !important; }

/* Admin WP — gestion codes cadeau (dans l'interface admin) */

/* ══ PLAN SUMMARY ══════════════════════════════════════════════════════ */
.hd-plan-summary { margin-bottom: 16px; }
.hd-plan-summary-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.hd-plan-badge-lg { display: inline-block; padding: 5px 14px; border-radius: 20px; font-size: 14px; font-weight: 700; }
.hd-plan-badge-lg.hd-plan-trial    { background: rgba(245,158,11,.15); color: #d97706; }
.hd-plan-badge-lg.hd-plan-pro      { background: rgba(12,85,244,.15); color: #0C55F4; }
.hd-plan-badge-lg.hd-plan-business { background: rgba(12,85,244,.15); color: #0637AF; }
.hd-plan-status { font-size: 12px; color: var(--hd-text2); margin-top: 5px; clear: both; }
.hd-plan-status.active  { color: #16a34a; font-weight: 600; }
.hd-plan-status.expired { color: #ef4444; font-weight: 600; }

/* Usage grid */
.hd-usage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .hd-usage-grid { grid-template-columns: 1fr; } }
.hd-usage-item { background: var(--hd-bg3); border: 1px solid var(--hd-border); border-radius: 10px; padding: 14px; }
.hd-usage-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.hd-usage-label { font-size: 12px; font-weight: 600; color: var(--hd-text2); }
.hd-usage-val { font-size: 12px; font-weight: 700; color: var(--hd-text); font-family: 'Courier New', monospace; }
.hd-usage-bar { height: 6px; background: var(--hd-bg4); border-radius: 4px; overflow: hidden; margin-bottom: 4px; }
.hd-usage-fill { height: 100%; border-radius: 4px; transition: width .5s ease; }
.hd-usage-warn { font-size: 11px; margin-top: 4px; }

/* Fonctionnalités */
.hd-feat-list { display: flex; flex-direction: column; gap: 5px; }
.hd-feat { font-size: 12px; font-weight: 500; }
.hd-feat.on  { color: #22c55e; }
.hd-feat.off { color: var(--hd-text3); text-decoration: line-through; opacity: .6; }

/* Sites actifs */
.hd-site-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--hd-border); }
.hd-site-item:last-child { border-bottom: none; }
.hd-site-name { flex: 1; font-size: 12px; font-weight: 500; color: var(--hd-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ══ USAGE — illimité + hints ═════════════════════════════════════════════ */
.hd-badge-unlimited {
  display: inline-flex; align-items: center;
  background: rgba(34,197,94,.15); color: #22c55e;
  font-size: 10px; font-weight: 700; letter-spacing: .03em;
  padding: 2px 7px; border-radius: 20px; vertical-align: middle;
}
.hd-usage-hint {
  font-size: 11px; color: var(--hd-text3); margin-top: 4px;
}

/* ══ CODE CADEAU — intégré au style dashboard ═════════════════════════════ */
.hd-gift-block {
  background: var(--hd-bg3);
  border: 1px solid var(--hd-border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.hd-gift-inner { display: flex; align-items: center; gap: 12px; }
.hd-gift-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(12,85,244,.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--hd-accent); flex-shrink: 0;
}
.hd-gift-title { font-size: 13px; font-weight: 600; color: var(--hd-text); }
.hd-gift-sub   { font-size: 11px; color: var(--hd-text3); margin-top: 2px; }
.hd-gift-form  { display: flex; gap: 8px; align-items: center; flex: 1; min-width: 260px; }
.hd-gift-input {
  flex: 1;
  background: var(--hd-bg2);
  border: 1px solid var(--hd-border);
  border-radius: 9px;
  padding: 9px 13px;
  font-size: 13px;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
  color: var(--hd-text);
  letter-spacing: .05em;
  transition: border-color .15s;
  outline: none;
}
.hd-gift-input:focus { border-color: var(--hd-accent); }
.hd-gift-input::placeholder { color: var(--hd-text3); letter-spacing: .02em; }
.hd-gift-btn {
  background: var(--hd-accent) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 9px !important;
  padding: 9px 20px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: opacity .15s, transform .1s !important;
  font-family: inherit !important;
  text-decoration: none !important;
  outline: none !important;
}
.hd-gift-btn:hover, .hd-gift-btn:focus, .hd-gift-btn:active { opacity: .88 !important; transform: translateY(-1px) !important; color: #fff !important; background: var(--hd-accent) !important; }
.hd-gift-btn:disabled { opacity: .5 !important; cursor: not-allowed !important; transform: none !important; }

/* ══ POPUP DOWNGRADE ══════════════════════════════════════════════════════ */
.hd-downgrade-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: hd-fadein .25s ease;
}
.hd-downgrade-modal {
  background: var(--hd-bg2);
  border: 1px solid var(--hd-border);
  border-radius: 20px;
  padding: 28px 28px 24px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
  animation: hd-slidein .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes hd-slidein {
  from { transform: translateY(20px) scale(.97); opacity: 0; }
  to   { transform: translateY(0)    scale(1);   opacity: 1; }
}
@keyframes hd-shake {
  0%,100% { transform: translateX(0); }
  25%     { transform: translateX(-5px); }
  75%     { transform: translateX(5px); }
}
.hd-downgrade-icon  { font-size: 32px; margin-bottom: 12px; }
.hd-downgrade-title { font-size: 17px; font-weight: 700; color: var(--hd-text); margin-bottom: 10px; }
.hd-downgrade-reason{ font-size: 13px; color: var(--hd-text2); margin-bottom: 6px; line-height: 1.5; }
.hd-downgrade-sub   { font-size: 12px; color: var(--hd-text3); margin-bottom: 18px; line-height: 1.5; }

/* Sites list */
.hd-downgrade-sites { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.hd-downgrade-sites-label { font-size: 11px; font-weight: 700; color: var(--hd-text3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.hd-downgrade-site {
  display: flex; align-items: center; gap: 10px;
  background: var(--hd-bg3); border: 1.5px solid var(--hd-border);
  border-radius: 10px; padding: 10px 14px;
  cursor: pointer; transition: all .15s;
  user-select: none;
}
.hd-downgrade-site:hover { border-color: var(--hd-accent); background: var(--hd-bg4); }
.hd-downgrade-site.selected {
  border-color: var(--hd-accent);
  background: rgba(12,85,244,.08);
}
.hd-dg-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.hd-dg-name { flex: 1; font-size: 13px; font-weight: 500; color: var(--hd-text); }
.hd-dg-status {
  font-size: 11px; font-weight: 600;
  color: var(--hd-text3);
  transition: color .15s;
}
.hd-downgrade-site.selected .hd-dg-status { color: #22c55e; }

/* Compteur */
.hd-downgrade-counter {
  text-align: center; font-size: 12px; color: var(--hd-text3);
  margin-bottom: 16px;
  padding: 6px; background: var(--hd-bg3); border-radius: 8px;
}
.hd-downgrade-counter span { font-weight: 700; color: var(--hd-accent); font-size: 14px; }

/* Actions */
.hd-downgrade-actions { display: flex; flex-direction: column; gap: 0; }

/* ══ WORKFLOW EDITOR (intégré dans le dashboard) ════════════════════════ */
.hd-wf-topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: var(--hd-bg2);
  border: 1px solid var(--hd-border); border-radius: var(--hd-r);
  margin-bottom: 14px; flex-wrap: wrap;
}
.hd-wf-name-input {
  flex: 1; min-width: 160px; background: transparent; border: none; outline: none;
  color: var(--hd-text); font-size: 15px; font-weight: 700; font-family: var(--hd-font);
}
.hd-wf-name-input::placeholder { color: var(--hd-text3); }
.hd-wf-select {
  background: var(--hd-bg3); border: 1px solid var(--hd-border2); color: var(--hd-text);
  border-radius: 7px; padding: 4px 8px; font-size: 12px; font-family: var(--hd-font);
}
.hd-wf-toggle-wrap {
  position: relative; width: 34px; height: 18px; cursor: pointer; display: inline-block; flex-shrink: 0;
}
.hd-wf-toggle-track {
  position: absolute; inset: 0; background: var(--hd-bg3); border-radius: 9px;
  border: 1px solid var(--hd-border2); transition: background .2s;
}
.hd-wf-toggle-track::after {
  content: ''; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--hd-text3); transition: transform .2s, background .2s;
}
#hd-wf-active-chk:checked ~ .hd-wf-toggle-track { background: var(--hd-accent); border-color: var(--hd-accent); }
#hd-wf-active-chk:checked ~ .hd-wf-toggle-track::after { transform: translateX(16px); background: #fff; }

.hd-wf-canvas-wrap {
  display: flex; height: calc(100vh - 260px); min-height: 400px;
  border: 1px solid var(--hd-border); border-radius: var(--hd-r); overflow: hidden;
}
.hd-wf-palette {
  width: 190px; min-width: 190px; background: var(--hd-bg2);
  border-right: 1px solid var(--hd-border); overflow-y: auto; padding: 10px 8px; flex-shrink: 0;
}
.hd-wf-pal-title { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--hd-text3); padding: 4px 6px 8px; font-weight: 700; }
.hd-wf-pal-lbl   { font-size: 10px; color: var(--hd-text3); padding: 6px 6px 4px; text-transform: uppercase; }
.hd-wf-pal-node  { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 7px; cursor: grab; transition: background .12s; user-select: none; }
.hd-wf-pal-node:hover { background: var(--hd-bg3); }
.hd-wf-pal-ico   { width: 26px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.hd-wf-ico-amber  { background: rgba(245,158,11,.15); }
.hd-wf-ico-purple { background: rgba(12,85,244,.15); }
.hd-wf-ico-red    { background: rgba(248,113,113,.15); }
.hd-wf-ico-blue   { background: rgba(96,165,250,.15); }
.hd-wf-ico-teal   { background: rgba(34,211,160,.15); }
.hd-wf-pal-name  { font-size: 12px; color: var(--hd-text); font-weight: 500; }
.hd-wf-pal-desc  { font-size: 11px; color: var(--hd-text3); }

.hd-wf-canvas {
  flex: 1; position: relative; overflow: hidden;
  background-color: var(--hd-bg);
  background-image: radial-gradient(circle, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Nodes */
.hd-wf-node {
  position: absolute; min-width: 155px; max-width: 195px;
  background: var(--hd-bg2); border: 1.5px solid var(--hd-border2);
  border-radius: 9px; cursor: pointer; user-select: none; z-index: 5;
  transition: border-color .15s, box-shadow .15s;
}
.hd-wf-node:hover    { border-color: rgba(12,85,244,.5); }
.hd-wf-node.selected { border-color: var(--hd-accent); box-shadow: 0 0 0 3px rgba(12,85,244,.2); }
.hd-wf-node.dragging { opacity: .85; cursor: grabbing; }
.hd-wf-node-hd {
  padding: 7px 10px 5px; display: flex; align-items: center; gap: 6px;
  border-bottom: 1px solid var(--hd-border); border-radius: 8px 8px 0 0;
}
.hd-wf-node[data-type="trigger"]   .hd-wf-node-hd { background: rgba(12,85,244,.08); }
.hd-wf-node[data-type="condition"] .hd-wf-node-hd { background: rgba(245,158,11,.07); }
.hd-wf-node[data-type="action"]    .hd-wf-node-hd { background: rgba(34,211,160,.07); }
.hd-wf-node-ico  { width: 20px; height: 20px; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.hd-wf-node-lbl  { font-size: 12px; font-weight: 600; color: var(--hd-text); }
.hd-wf-node-bd   { padding: 6px 10px 8px; }
.hd-wf-node-sub  { font-size: 11px; color: var(--hd-text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }

/* Ports */
.hd-wf-port {
  position: absolute; width: 11px; height: 11px; border-radius: 50%;
  background: var(--hd-bg3); border: 2px solid var(--hd-border2); cursor: crosshair; z-index: 10;
  transition: background .12s, border-color .12s;
}
.hd-wf-port:hover     { background: var(--hd-accent); border-color: var(--hd-accent); }
.hd-wf-port.port-in   { left: -6px; top: 50%; transform: translateY(-50%); }
.hd-wf-port.port-out  { right: -6px; top: 50%; transform: translateY(-50%); }
.hd-wf-port.port-true { right: -6px; top: 35%; transform: translateY(-50%); background: rgba(34,211,160,.3); border-color: var(--hd-green); }
.hd-wf-port.port-false{ right: -6px; top: 65%; transform: translateY(-50%); background: rgba(248,113,113,.3); border-color: var(--hd-red); }
.hd-wf-port-lbl       { position: absolute; right: 13px; font-size: 9px; font-weight: 700; text-transform: uppercase; pointer-events: none; }
.hd-wf-port-lbl.lt    { top: 35%; transform: translateY(-50%); color: var(--hd-green); }
.hd-wf-port-lbl.lf    { top: 65%; transform: translateY(-50%); color: var(--hd-red); }

/* Config panel */
.hd-wf-cfg {
  width: 300px; min-width: 300px; background: var(--hd-bg2);
  border-left: 1px solid var(--hd-border); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .2s ease; flex-shrink: 0;
}
.hd-wf-cfg.open      { transform: translateX(0); }
.hd-wf-cfg-header    {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--hd-border); font-weight: 600; font-size: 13px;
  color: var(--hd-text); flex-shrink: 0;
}
.hd-wf-cfg-body      { flex: 1; overflow-y: auto; padding: 14px; }

/* Fields inside cfg */
.hd-wf-cfg-body .hd-field { margin-bottom: 12px; }
.hd-wf-cfg-body .hd-field label { display: block; font-size: 11px; color: var(--hd-text3); margin-bottom: 4px; font-weight: 500; }
.hd-wf-cfg-body .hd-field input,
.hd-wf-cfg-body .hd-field select,
.hd-wf-cfg-body .hd-field textarea {
  width: 100%; background: var(--hd-bg3); border: 1px solid var(--hd-border2);
  color: var(--hd-text); border-radius: 7px; padding: 7px 10px; font-size: 12px;
  outline: none; transition: border-color .15s; font-family: var(--hd-font);
}
.hd-wf-cfg-body .hd-field input:focus,
.hd-wf-cfg-body .hd-field select:focus,
.hd-wf-cfg-body .hd-field textarea:focus { border-color: var(--hd-accent); }
.hd-wf-cfg-body .hd-field textarea { resize: vertical; min-height: 68px; }
.hd-wf-cfg-hint { font-size: 11px; color: var(--hd-text3); margin-top: 4px; }
.hd-wf-cfg-row  { display: flex; gap: 8px; }
.hd-wf-cfg-row .hd-field { flex: 1; }
.hd-wf-cfg-section {
  font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--hd-text3);
  font-weight: 700; margin: 14px 0 8px; padding-bottom: 5px; border-bottom: 1px solid var(--hd-border);
}
.hd-wf-repeat-item {
  background: var(--hd-bg3); border-radius: 7px; padding: 10px; margin-bottom: 8px; border: 1px solid var(--hd-border);
}
.hd-wf-repeat-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hd-wf-repeat-lbl { font-size: 11px; color: var(--hd-text2); font-weight: 500; }
.hd-wf-add-btn {
  width: 100%; padding: 7px; border-radius: 7px; border: 1px dashed var(--hd-border2);
  background: transparent; color: var(--hd-text3); cursor: pointer; font-size: 12px;
  font-family: var(--hd-font); transition: border-color .15s, color .15s;
}
.hd-wf-add-btn:hover { border-color: var(--hd-accent); color: var(--hd-accent2); }
.hd-wf-mod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.hd-wf-mod-card {
  background: var(--hd-bg3); border-radius: 7px; border: 1.5px solid var(--hd-border);
  padding: 8px; cursor: pointer; text-align: center; transition: border-color .15s;
}
.hd-wf-mod-card:hover    { border-color: var(--hd-accent); }
.hd-wf-mod-card.selected { border-color: var(--hd-accent); background: rgba(12,85,244,.08); }
.hd-wf-mod-card-ico  { font-size: 18px; margin-bottom: 4px; }
.hd-wf-mod-card-lbl  { font-size: 11px; color: var(--hd-text2); font-weight: 500; }

/* Workflow list items */
.hd-wf-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-bottom: 1px solid var(--hd-border); cursor: pointer; transition: background .12s;
}
.hd-wf-item:last-child { border-bottom: none; }
.hd-wf-item:hover { background: var(--hd-bg3); }
.hd-wf-item-dot  { width: 8px; height: 8px; border-radius: 50%; background: var(--hd-text3); flex-shrink: 0; }
.hd-wf-item-dot.on { background: var(--hd-green); }
.hd-wf-item-name { flex: 1; font-size: 13px; font-weight: 600; color: var(--hd-text); }
.hd-wf-item-sub  { font-size: 11px; color: var(--hd-text3); }
.hd-wf-item-arr  { color: var(--hd-text3); font-size: 16px; }

/* Btn helpers */
.hd-btn-icon-sm {
  width: 26px; height: 26px; background: transparent; border: 1px solid var(--hd-border);
  border-radius: 5px; color: var(--hd-text2); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .12s;
}
.hd-btn-icon-sm:hover { background: var(--hd-bg3); color: var(--hd-text); }

/* ── Workflow editor: override .hd-wrap svg global rule for colored icons ── */
.hd-wf-node-ico { align-items:center; justify-content:center; display:flex; }
.hd-wf-node-ico svg { width:12px!important; height:12px!important; stroke:unset!important; fill:unset!important; display:block!important; }
.hd-wf-pal-ico  { align-items:center; justify-content:center; }
.hd-wf-pal-ico span { font-size:14px; line-height:1; }

/* Topbar SVG buttons — force correct sizes */
.hd-wf-topbar .hd-btn svg { width:13px!important; height:13px!important; }
.hd-wf-cfg-header .hd-btn-icon-sm svg { width:12px!important; height:12px!important; }
.hd-btn-icon-sm { display:flex!important; align-items:center; justify-content:center; }
.hd-btn-icon-sm svg { width:12px!important; height:12px!important; }

/* Fix Hello Elementor breaking button/input font */
.hd-wf-topbar button,
.hd-wf-topbar input,
.hd-wf-topbar select,
.hd-wf-cfg-body button,
.hd-wf-cfg-body input,
.hd-wf-cfg-body select,
.hd-wf-cfg-body textarea { font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif!important; }

/* Fix port-lbl being invisible due to text-decoration:none reset */
.hd-wf-port-lbl { font-size:9px!important; font-weight:700!important; text-transform:uppercase!important; pointer-events:none!important; }

/* Fix canvas hint z-index */
#hd-wf-hint { z-index:2!important; white-space:nowrap!important; }

/* Ensure toggle works */
.hd-wf-toggle-wrap { vertical-align:middle; }
.hd-wf-toggle-track { display:block!important; }

/* Shine effect on primary buttons */
.hd-btn-primary::after{content:"";position:absolute;inset:-130% auto auto -25%;width:55%;height:310%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.2),transparent);transform:translateX(-140%) skewX(-18deg);animation:hd-shine 4.8s linear infinite;pointer-events:none}
@keyframes hd-shine{0%{transform:translateX(-140%) skewX(-18deg)}100%{transform:translateX(220%) skewX(-18deg)}}

/* Nav section labels */
.hd-nav-section{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--hd-text3);padding:12px 10px 5px}
.hd-nav-badge{margin-left:auto;color:#fff;font-size:10px;font-weight:700;padding:2px 6px;border-radius:10px;min-width:18px;text-align:center}
.hd-nb-blue{background:var(--hd-accent)}
.hd-nb-green{background:var(--hd-green)}
.hd-nb-orange{background:var(--hd-amber)}

/* Plan box in sidebar */
.hd-sidebar-plan{margin:8px 10px;background:#EEF4FF;border:1px solid #c7d9fe;border-radius:var(--hd-r);padding:14px}
.hd-sp-lbl{font-size:10px;color:var(--hd-accent);font-weight:700;text-transform:uppercase;letter-spacing:.05em}
.hd-sp-name{font-size:14px;font-weight:700;color:var(--hd-text);margin:3px 0 8px}
.hd-sp-bar{height:4px;background:#c7d9fe;border-radius:3px;overflow:hidden}
.hd-sp-fill{height:100%;background:var(--hd-accent);border-radius:3px;transition:width .4s}
.hd-sp-info{font-size:11px;color:var(--hd-text3);margin-top:5px}
.hd-sp-btn{display:flex;align-items:center;justify-content:center;gap:5px;width:100%;margin-top:10px;padding:8px;border-radius:8px;background:var(--hd-accent);color:#fff;font-size:12px;font-weight:600;border:none;cursor:pointer;transition:background .15s;position:relative;overflow:hidden}
.hd-sp-btn:hover{background:var(--hd-accent2)}

/* Sidebar user */
.hd-sidebar-user{display:flex;align-items:center;gap:10px;padding:12px 14px;border-top:1px solid var(--hd-border)}
.hd-su-av{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,var(--hd-accent),#0637AF);display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px;font-weight:700;flex-shrink:0}
.hd-su-name{font-size:13px;font-weight:600;color:var(--hd-text)}
.hd-su-email{font-size:11px;color:var(--hd-text3)}

/* Page layout */
.hd-page-inner{padding:26px 30px;max-width:100%;}
.hd-topbar{background:#fff;border-bottom:1px solid var(--hd-border);padding:0 30px;height:60px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:50;flex-shrink:0}
.hd-topbar-title{font-size:17px;font-weight:700;color:var(--hd-text)}
.hd-topbar-sub{font-size:12px;color:var(--hd-text3);margin-top:1px}
.hd-topbar-right{display:flex;align-items:center;gap:10px}

/* Pills updated */
.hd-pill.green{background:#f0fdf4!important;color:#16a34a!important;border:1px solid #bbf7d0}
.hd-pill.gray{background:#f1f5f9!important;color:var(--hd-text3)!important;border:1px solid var(--hd-border)}
.hd-pill.blue{background:#EEF4FF!important;color:var(--hd-accent)!important;border:1px solid #bdd3fe}
.hd-pill.orange{background:#fff8f0!important;color:var(--hd-amber)!important;border:1px solid #fdecc8}

/* Trial banner */
.hd-trial-banner{display:flex;align-items:center;gap:12px;background:#EEF4FF;border:1px solid #bdd3fe;border-radius:var(--hd-r);padding:14px 18px;margin-bottom:20px}
.hd-trial-banner svg{fill:none;stroke:var(--hd-accent);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.hd-trial-banner-text{flex:1;font-size:13px;color:var(--hd-text2)}
.hd-trial-banner-text strong{color:var(--hd-accent)}

/* CRM & RDV pages */
.hd-crm-toolbar{display:flex;align-items:center;gap:10px;margin-bottom:16px;flex-wrap:wrap}
.hd-crm-search{border:1.5px solid var(--hd-border);border-radius:10px;padding:8px 12px 8px 34px;font-size:13px;color:var(--hd-text);background:#fff;outline:none;transition:border-color .15s;max-width:260px;width:100%}
.hd-crm-search:focus{border-color:var(--hd-accent)}
.hd-crm-sw{position:relative}
.hd-crm-sw svg{position:absolute;left:11px;top:50%;transform:translateY(-50%);pointer-events:none;fill:none;stroke:var(--hd-text3);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.hd-tbl-hd{display:grid;grid-template-columns:2.5fr 2fr 1fr 1fr 1fr 90px;padding:9px 20px;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--hd-text3);background:#fafbff;border-bottom:1px solid var(--hd-border2)}
.hd-tbl-row{display:grid;grid-template-columns:2.5fr 2fr 1fr 1fr 1fr 90px;align-items:center;padding:13px 20px;border-bottom:1px solid var(--hd-bg3);cursor:pointer;transition:background .12s}
.hd-tbl-row:hover{background:#fafbff}
.hd-tbl-row:last-child{border-bottom:none}
.hd-tbl-actions{display:flex;gap:5px;justify-content:flex-end}
.hd-act-btn{width:28px;height:28px;border-radius:7px;border:1.5px solid var(--hd-border);background:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--hd-text3);transition:all .15s}
.hd-act-btn:hover{border-color:var(--hd-accent);color:var(--hd-accent);background:#EEF4FF}
.hd-act-btn svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* Side panel */
.hd-sp-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.3);z-index:200}
.hd-sp-overlay.open{display:block}
.hd-side-panel{position:fixed;right:0;top:0;bottom:0;width:380px;background:#fff;box-shadow:-4px 0 30px rgba(0,0,0,.1);z-index:201;display:flex;flex-direction:column;transform:translateX(100%);transition:transform .25s}
.hd-side-panel.open{transform:translateX(0)}

/* Calendar */
.hd-cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}
.hd-cal-day-hd{text-align:center;font-size:10px;font-weight:700;color:var(--hd-text3);text-transform:uppercase;padding:4px 0;margin-bottom:2px}
.hd-cal-day{height:38px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border-radius:8px;font-size:13px;font-weight:500;color:var(--hd-text2);cursor:pointer;transition:all .15s;background:var(--hd-bg3,#f1f5f9);position:relative}
.hd-cal-day:hover{background:#dde6fb;color:var(--hd-accent)}
.hd-cal-day.other{color:var(--hd-text3);opacity:.4;background:transparent;pointer-events:none}
.hd-cal-day.today{font-weight:700;color:var(--hd-accent);position:relative}
.hd-cal-day.today::before{content:'';position:absolute;bottom:4px;left:50%;transform:translateX(-50%);width:5px;height:5px;border-radius:50%;background:var(--hd-accent)}
.hd-cal-day.has-rdv{font-weight:600;color:var(--hd-accent)}
.hd-cal-day.has-rdv::after{content:'';position:absolute;top:5px;right:5px;width:4px;height:4px;border-radius:50%;background:var(--hd-accent)}
.hd-cal-day.selected{background:var(--hd-accent);color:#fff;font-weight:700}
.hd-cal-day.selected::before{background:#fff}
.hd-cal-day.selected::after{background:#fff}

/* RDV rows */
.hd-rdv-row{display:flex;align-items:center;gap:14px;padding:14px 20px;border-bottom:1px solid var(--hd-bg3);transition:background .12s}
.hd-rdv-row:hover{background:#fafbff}
.hd-rdv-row:last-child{border-bottom:none}
.hd-rdv-date-box{width:46px;height:46px;border-radius:11px;display:flex;flex-direction:column;align-items:center;justify-content:center;flex-shrink:0}
.hd-rdv-d{font-size:17px;font-weight:700;line-height:1}
.hd-rdv-m{font-size:9px;font-weight:700;text-transform:uppercase;color:var(--hd-text3)}

/* Avail rows */
.hd-av-row{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid var(--hd-bg3)}
.hd-av-row:last-child{border-bottom:none}
.hd-av-day{width:80px;font-size:13px;font-weight:500;color:var(--hd-text);flex-shrink:0}
.hd-av-hours{flex:1;font-size:12px;color:var(--hd-text2);font-family:monospace}

/* Settings rows */
.hd-setting-row{display:flex;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--hd-bg3)}
.hd-setting-row:last-child{border-bottom:none}
.hd-setting-label{font-size:13px;font-weight:500;color:var(--hd-text)}
.hd-setting-desc{font-size:11px;color:var(--hd-text3);margin-top:2px}

/* Booking link */
.hd-booking-link{background:var(--hd-bg);border:1.5px solid var(--hd-border);border-radius:9px;padding:10px 14px;font-size:12px;color:var(--hd-text2);font-family:monospace;word-break:break-all;cursor:pointer;transition:border-color .15s}
.hd-booking-link:hover{border-color:var(--hd-accent)}

/* RDV hero banner */
.hd-rdv-hero{background:linear-gradient(135deg,var(--hd-accent),#0637AF);border-radius:var(--hd-r);padding:22px 26px;color:#fff;display:flex;align-items:center;gap:18px;margin-bottom:20px;position:relative;overflow:hidden}
.hd-rdv-hero::before{content:'';position:absolute;top:-50px;right:-30px;width:180px;height:180px;border-radius:50%;background:rgba(255,255,255,.06)}
.hd-rdv-hero-ico{width:52px;height:52px;background:rgba(255,255,255,.15);border-radius:14px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.hd-rdv-hero-ico svg{fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* Responsive */
/* responsive moved below */

/* Email modal full width */
.hd-email-modal{background:#fff;border-radius:var(--hd-r);width:900px;max-width:97vw;max-height:92vh;display:flex;flex-direction:column;box-shadow:0 20px 60px rgba(0,0,0,.2);overflow:hidden}

/* ── Quick actions ─────────────────────────────── */
.hd-quick-action{display:flex;align-items:center;gap:10px;padding:11px 12px;border:1.5px dashed var(--hd-border);border-radius:var(--hd-r);cursor:pointer;transition:all .15s;background:#fff;text-decoration:none!important}
.hd-quick-action:hover{border-color:var(--hd-accent)!important;background:#EEF4FF!important}
.hd-quick-action:hover .hd-qa-ico{background:#EEF4FF!important;color:var(--hd-accent)!important}
.hd-qa-ico{width:32px;height:32px;border-radius:9px;background:#f8faff;display:flex;align-items:center;justify-content:center;color:var(--hd-text3);flex-shrink:0;transition:all .15s}
.hd-qa-ico svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.hd-qa-l{font-size:12.5px;font-weight:600;color:var(--hd-text2)}
.hd-qa-d{font-size:11px;color:var(--hd-text3);margin-top:1px}

/* ── Toggle ───────────────────────────────────── */
/* ── Stat delta ───────────────────────────────── */
.hd-stat-delta{font-size:11px;margin-top:4px;color:var(--hd-text3)}
.hd-stat-delta.up{color:var(--hd-green)}.hd-stat-delta.down{color:var(--hd-red)}

/* ── Card header fix (no padding if padding:0 on card) ── */
.hd-card-section-hd{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--hd-bg3)}
.hd-card-body{padding:20px}

/* ── Conv list in overview ─────────────────────── */
.hd-ov-conv-item{display:flex;align-items:center;gap:12px;padding:12px 20px;border-bottom:1px solid var(--hd-bg3);cursor:pointer;transition:background .12s}
.hd-ov-conv-item:hover{background:#fafbff}
.hd-ov-conv-item:last-child{border-bottom:none}
.hd-ov-av{width:34px;height:34px;border-radius:50%;background:linear-gradient(135deg,#bdd3fe,#93c5fd);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;color:#1d4ed8;flex-shrink:0}
.hd-ov-conv-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--hd-accent);margin-top:4px}

/* sidebar mobile replaced below */

/* ── Chart bars ────────────────────────────────── */
.hd-chart-bar{transition:opacity .15s,height .3s}
.hd-chart-bar:hover{opacity:1!important}

/* ── CRM contact avatar ────────────────────────── */
.hd-contact-av{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;flex-shrink:0}

/* ── RDV date box ──────────────────────────────── */
.hd-rdv-date-box{width:46px;height:46px;border-radius:11px;display:flex;flex-direction:column;align-items:center;justify-content:center;flex-shrink:0}
.hd-rdv-date-box.blue{background:#EEF4FF}.hd-rdv-date-box.blue .hd-rdv-d{color:var(--hd-accent)}
.hd-rdv-date-box.orange{background:#fff8f0}.hd-rdv-date-box.orange .hd-rdv-d{color:var(--hd-amber)}
.hd-rdv-date-box.gray{background:#f1f5f9}.hd-rdv-date-box.gray .hd-rdv-d{color:var(--hd-text)}
.hd-rdv-d{font-size:17px;font-weight:700;line-height:1}
.hd-rdv-m{font-size:9px;font-weight:700;text-transform:uppercase;color:var(--hd-text3)}

/* ── hd-pill overrides for light theme ─────────── */
.hd-pill{display:inline-flex;align-items:center;gap:4px;padding:3px 9px;border-radius:20px;font-size:11px;font-weight:600;white-space:nowrap}

/* ── Neutraliser les marges/paddings Elementor autour du shortcode ── */
.heto-dashboard-page .elementor-widget-shortcode,
.heto-dashboard-page .elementor-widget-shortcode .elementor-widget-container,
.heto-dashboard-page .elementor-column,
.heto-dashboard-page .elementor-section,
.heto-dashboard-page .elementor-container,
.heto-dashboard-page .e-con,
.heto-dashboard-page .e-con-inner,
.heto-dashboard-page .elementor-widget-wrap {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}
.heto-dashboard-page .site-main,
.heto-dashboard-page main,
.heto-dashboard-page #primary,
.heto-dashboard-page .content-area,
.heto-dashboard-page .page-content,
.heto-dashboard-page article,
.heto-dashboard-page .entry-content {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
}

/* ── Tuer le rose/pink de Hello Elementor partout dans le dashboard ── */
.hd-wrap a, .hd-wrap a:hover, .hd-wrap a:focus, .hd-wrap a:visited,
.hd-wrap a:active, .hd-wrap button { color: inherit !important; }
.hd-wrap .hd-conv-toolbar-tab { color: #94a3b8 !important; }
.hd-wrap .hd-conv-toolbar-tab.active { color: var(--hd-accent) !important; }
.hd-wrap .hd-conv-bulk-del { color: #fff !important; }
.hd-wrap .hd-conv-select-btn { color: var(--hd-text3) !important; }
.hd-wrap .hd-conv-select-btn.active { color: #fff !important; }
.hd-wrap .hd-filter-btn.active,
.hd-wrap .hd-filter-btn.active:hover { color: #fff !important; background: var(--hd-accent) !important; }
.hd-wrap a.hd-nav-item:hover { color: var(--hd-accent) !important; }
.hd-wrap a.hd-nav-item.active { color: var(--hd-accent) !important; }
.hd-wrap .hd-btn:hover { color: var(--hd-text) !important; }
.hd-wrap .hd-btn-primary, .hd-wrap .hd-btn-primary:hover,
.hd-wrap .hd-btn-primary *, .hd-wrap .hd-btn-primary:hover * { color: #fff !important; }
.hd-wrap .hd-btn-primary svg, .hd-wrap .hd-btn-primary:hover svg { stroke: #fff !important; }
.hd-wrap .hd-quick-action:hover .hd-qa-l,
.hd-wrap .hd-quick-action:hover .hd-qa-ico svg { color: var(--hd-accent) !important; stroke: var(--hd-accent) !important; }

/* Elementor injecte des styles sur a, input, select — on les neutralise */
.hd-wrap a { text-decoration: none !important; }
.hd-wrap a:hover { text-decoration: none !important; }

/* ── Fix boutons capturés par Elementor (pointer-events) ── */
.hd-wrap button,
.hd-wrap a,
.hd-wrap input,
.hd-wrap select,
.hd-wrap textarea,
.hd-wrap [onclick],
.hd-wrap .hd-btn,
.hd-wrap .hd-nav-item,
.hd-wrap .hd-quick-action {
  pointer-events: auto !important;
  cursor: pointer !important;
  position: relative;
  z-index: 1;
}

/* ── Topbar sticky au bon z-index ── */
.hd-topbar { z-index: 50 !important; }

/* ── Sidebar z-index au dessus d'Elementor ── */
.hd-sidebar { z-index: 9999 !important; }

/* ── Contenu principal au dessus des overlays Elementor ── */

.hd-page { z-index: 1; position: relative; }

/* ── Reset couleurs spécifiques Elementor qui écrasent les nôtres ── */
.hd-wrap * {
  -webkit-tap-highlight-color: transparent;
}
.hd-wrap .hd-btn-primary { background-color: var(--hd-accent) !important; color: #fff !important; }
.hd-wrap .hd-btn-primary:hover { background-color: #0637AF !important; }
.hd-wrap .hd-btn-danger { background-color: transparent !important; color: var(--hd-red) !important; border-color: rgba(220,38,38,.3) !important; }

/* ── Neutraliser les overlays Elementor qui bloquent les clics ── */
.heto-dashboard-page .elementor-element-overlay,
.heto-dashboard-page .elementor-editor-element-setting,
.heto-dashboard-page .elementor-clickable,
.heto-dashboard-page .elementor-widget-container::before,
.heto-dashboard-page .elementor-widget-container::after,
.heto-dashboard-page .e-con::before,
.heto-dashboard-page .e-con::after {
  pointer-events: none !important;
  display: none !important;
}

/* Forcer pointer-events sur tous les éléments interactifs du wrap */
.hd-wrap,
.hd-wrap * {
  pointer-events: auto;
}
.hd-wrap .hd-btn,
.hd-wrap button,
.hd-wrap a,
.hd-wrap input,
.hd-wrap select {
  pointer-events: auto !important;
  position: relative !important;
  z-index: 10 !important;
  cursor: pointer !important;
}

/* ── Plan hero card (overview) ─────────────────── */
.hd-plan-hero-card {
  background: linear-gradient(135deg, #0C55F4, #0637AF);
  border-radius: var(--hd-r);
  padding: 22px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hd-plan-hero-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  pointer-events: none;
}
.hd-plan-hero-card::after {
  content: '';
  position: absolute;
  bottom: -30px;
  right: 20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  pointer-events: none;
}
.hd-plan-hero-card > * {
  position: relative;
  z-index: 1;
}

/* ── Plan hero card ─────────────────────────────── */
.hd-plan-hero-card {
  background: linear-gradient(135deg, #0C55F4 0%, #0637AF 100%) !important;
  border-radius: var(--hd-r) !important;
  padding: 22px !important;
  color: #fff !important;
  position: relative !important;
  overflow: hidden !important;
  display: block !important;
}
.hd-plan-hero-card::before {
  content: '' !important;
  position: absolute !important;
  top: -50px !important;
  right: -50px !important;
  width: 160px !important;
  height: 160px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.08) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}
.hd-plan-hero-card::after {
  content: '' !important;
  position: absolute !important;
  bottom: -25px !important;
  right: 25px !important;
  width: 100px !important;
  height: 100px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.05) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}
.hd-plan-hero-card > * {
  position: relative !important;
  z-index: 1 !important;
  color: #fff !important;
}
.hd-plan-hero-card button {
  background: rgba(255,255,255,.15) !important;
  border: 1.5px solid rgba(255,255,255,.3) !important;
  color: #fff !important;
  width: 100% !important;
  padding: 9px !important;
  border-radius: 9px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  margin-top: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.hd-plan-hero-card button:hover {
  background: rgba(255,255,255,.25) !important;
}


/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — Desktop uniquement
   Tablette & mobile (≤1024px) : écran de blocage #hd-unavailable
   ══════════════════════════════════════════════════════════════ */

/* ── 1440px+ : layout standard (sidebar 240px) ─────────────── */
/* (défaut, rien à overrider) */

/* ── Laptop 1281–1439px (zoom léger) ───────────────────────── */
@media (max-width: 1439px) and (min-width: 1281px) {
  .hd-sidebar       { width: 220px !important; min-width: 220px !important; max-width: 220px !important; }
  .hd-page-inner    { padding: 20px 24px !important; }
  .hd-topbar        { padding: 0 22px !important; }
  .hd-stats         { gap: 10px; }
  .hd-stat          { padding: 14px 16px; }
  .hd-stat-val      { font-size: 22px; }
}

/* ── Laptop 1025–1280px (petit écran / zoom fort) ──────────── */
@media (max-width: 1280px) and (min-width: 1025px) {
  .hd-sidebar          { width: 200px !important; min-width: 200px !important; max-width: 200px !important; }
  .hd-logo-sub         { display: none; }
  .hd-nav-item         { font-size: 12px; padding: 8px 10px; }
  .hd-page-inner       { padding: 16px 18px !important; }
  .hd-topbar           { padding: 0 16px !important; }
  .hd-topbar-title     { font-size: 15px; }
  .hd-stats            { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .hd-stat             { padding: 12px 14px; gap: 9px; }
  .hd-stat-val         { font-size: 20px; }
  .hd-plans            { grid-template-columns: 1fr 1fr; }
  #page-edit-grid      { grid-template-columns: 1fr 230px !important; }
}

/* ── Burger mobile : toujours caché (desktop only) ─────────── */
.hd-mobile-menu    { display: none !important; }
.hd-mobile-overlay { display: none !important; }

/* ══════════════════════════════════════════════════════════════
   BLOC TABLETTE & MOBILE (≤ 1024px)
   L'app est masquée — #hd-unavailable prend tout l'écran
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  #hd-root        { display: none !important; }
  #hd-unavailable { display: flex !important; }
}

#hd-unavailable {
  display: none;
  position: fixed;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f7f9ff;
  padding: 32px 24px;
  text-align: center;
  font-family: 'Roboto', -apple-system, sans-serif;
  z-index: 99999;
}

.hd-wrap .hd-btn-primary { background: var(--hd-accent) !important; }
.hd-wrap .hd-btn-primary:hover { background: #0637AF !important; }

/* Boutons ghost */
.hd-wrap .hd-btn-ghost,
.hd-wrap .hd-btn { color: var(--hd-text2) !important; }
.hd-wrap .hd-btn-ghost:hover { color: var(--hd-accent) !important; }

/* Nav badges */
.hd-wrap .hd-badge-count,
.hd-wrap .nav-badge { color: #fff !important; }

/* Pills statut */
.hd-wrap .hd-pill.green  { color: #16a34a !important; }
.hd-wrap .hd-pill.gray   { color: var(--hd-text3) !important; }
.hd-wrap .hd-pill.blue   { color: var(--hd-accent) !important; }
.hd-wrap .hd-pill.orange { color: var(--hd-amber) !important; }

/* hd-conv-wrap : prend toute la hauteur disponible */
.hd-conv-wrap {
  display: flex !important;
  height: 100% !important;
  min-height: 0 !important;
  flex: 1 !important;
}
#hd-page-conversations {
  display: none;
  flex-direction: column;
  height: 100%;
  padding: 0 !important;
}
#hd-page-conversations.active {
  display: flex !important;
}

/* ══ TOUS LES BOUTONS BLEUS → TEXTE BLANC ══════════════════════ */
#hd-root .hd-btn-primary,
#hd-root .hd-btn-primary:hover,
#hd-root .hd-btn-primary:active,
#hd-root .hd-btn-primary:focus,
#hd-root .hd-btn-primary span,
#hd-root .hd-btn-primary svg,
#hd-root .hd-btn-upgrade,
#hd-root .hd-sp-btn,
#hd-root .plan-upgrade { color: #fff !important; }

#hd-root .hd-btn-primary { background-color: #0C55F4 !important; border-color: #0C55F4 !important; }
#hd-root .hd-btn-primary:hover { background-color: #0637AF !important; }
#hd-root .hd-btn-upgrade { background: linear-gradient(135deg, #f59e0b, #ef4444) !important; border-color: transparent !important; color: #fff !important; }
#hd-root .hd-btn-upgrade:hover { opacity: .9; }

/* Cartes de plan */
#hd-root .hd-plan-card.featured .hd-btn,
#hd-root .hd-plan-card .hd-btn-primary { color: #fff !important; }

/* Bouton ghost */
#hd-root .hd-btn:not(.hd-btn-primary):not(.hd-btn-upgrade):not(.hd-btn-danger) {
  background: transparent !important;
  color: var(--hd-text2) !important;
  border-color: var(--hd-border) !important;
}

/* ══ CONVERSATIONS PAGE ════════════════════════════════════════ */
#hd-page-conversations { padding: 0 !important; }
#hd-page-conversations.active { display: flex !important; flex-direction: column !important; height: 100% !important; }
#hd-page-conversations .hd-conv-wrap { flex: 1 !important; height: 100% !important; min-height: 0 !important; }

/* ══ PAGES PADDING ══════════════════════════════════════════════ */
#hd-page-overview.active,
#hd-page-widgets.active,
#hd-page-crm.active,
#hd-page-rdv.active,
#hd-page-billing.active,
#hd-page-account.active,
#hd-page-workflows.active { display: block !important; overflow-y: auto !important; }

.hd-page-inner { padding: 26px 30px !important; }

/* ══ PAGE LAYOUT FIXES ══════════════════════════════════════════ */

/* Toutes les pages sauf conversations : block + scroll */
#hd-page-overview.active,
#hd-page-widgets.active,
#hd-page-crm.active,
#hd-page-rdv.active,
#hd-page-billing.active,
#hd-page-account.active,
#hd-page-workflows.active {
  display: block !important;
  overflow-y: auto !important;
  height: 100% !important;
}

/* Conversations : flex colonne */
#hd-page-conversations { padding: 0 !important; }
#hd-page-conversations.active {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  overflow: hidden !important;
}

/* hd-card : fond blanc, padding, largeur correcte */
.hd-wrap .hd-card {
  background: #fff !important;
  border: 1px solid var(--hd-border) !important;
  border-radius: var(--hd-r) !important;
  padding: 18px 20px !important;
  margin-bottom: 16px !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* hd-field */
.hd-wrap .hd-field { margin-bottom: 14px !important; }
.hd-wrap .hd-field label { display: block !important; font-size: 12px !important; font-weight: 600 !important; color: var(--hd-text3) !important; margin-bottom: 5px !important; }
.hd-wrap .hd-field input,
.hd-wrap .hd-field select,
.hd-wrap .hd-field textarea {
  width: 100% !important;
  border: 1.5px solid var(--hd-border) !important;
  border-radius: 9px !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  font-family: inherit !important;
  color: var(--hd-text) !important;
  background: #fff !important;
  outline: none !important;
}

/* hd-card-head */
.hd-wrap .hd-card-head {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--hd-text) !important;
  margin-bottom: 16px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid var(--hd-bg3) !important;
}

/* ══ ACCOUNT & BILLING — card padding + page layout ═══════════════════════ */
#hd-page-account .hd-card,
#hd-page-billing .hd-card {
  padding: 24px 28px !important;
}
#hd-page-account .hd-card .hd-card-head,
#hd-page-billing .hd-card .hd-card-head {
  margin: -24px -28px 20px -28px !important;
  padding: 16px 28px !important;
  background: var(--hd-bg3) !important;
  border-bottom: 1px solid var(--hd-border) !important;
  border-radius: var(--hd-r) var(--hd-r) 0 0 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}
/* Plan summary card override */
#hd-page-billing .hd-plan-summary {
  padding: 24px !important;
}
#hd-page-billing .hd-plan-summary .hd-plan-summary-top {
  margin-bottom: 20px;
}
#hd-page-billing .hd-plan-summary .hd-card-head {
  margin: 0 !important; padding: 0 !important; background: none !important; border: none !important; border-radius: 0 !important;
}
/* Billing plans grid */
#hd-page-billing .hd-plans .hd-plan-card {
  padding: 24px !important;
}
/* Page inner containers */
.hd-page-narrow {
  padding: 28px 36px !important;
  max-width: 100% !important;
  margin: 0 !important;
}
@media (max-width: 768px) {
  .hd-page-narrow {
    padding: 20px 16px !important;
  }
  #hd-page-account .hd-card,
  #hd-page-billing .hd-card {
    padding: 18px 16px !important;
  }
  #hd-page-account .hd-card .hd-card-head,
  #hd-page-billing .hd-card .hd-card-head {
    margin: -18px -16px 16px -16px !important;
    padding: 14px 16px !important;
  }
}

/* ── Widget Editor page ─────────────────────────────────── */

.hd-editor-sec-group{font-size:10px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--hd-text3);padding:10px 10px 4px;margin-top:4px}
.hd-editor-sec{display:flex;align-items:center;gap:8px;padding:7px 10px;border-radius:7px;cursor:pointer;color:var(--hd-text2);font-size:12px;font-weight:500;transition:.1s;user-select:none}
.hd-editor-sec:hover{background:var(--hd-bg3);color:var(--hd-text)}
.hd-editor-sec.active{background:var(--hd-accent-light,#eff6ff);color:var(--hd-accent);font-weight:600}
.hd-editor-sec svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;flex-shrink:0}
.hd-dev-btn{width:26px;height:26px;border-radius:6px;background:none;border:1px solid var(--hd-border);cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--hd-text3);transition:.1s}
.hd-dev-btn:hover,.hd-dev-btn.active{background:var(--hd-bg3);color:var(--hd-text);border-color:var(--hd-border2)}
.hd-dev-btn svg{stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}
/* Section cards dans éditeur */
.wb-page-card{background:var(--hd-bg2);border:1px solid var(--hd-border);border-radius:10px;overflow:hidden;margin-bottom:14px}
.wb-card-head{padding:10px 16px;border-bottom:1px solid var(--hd-border);display:flex;align-items:center;gap:8px;font-size:12px;font-weight:600;color:var(--hd-text);background:var(--hd-bg3)}
.wb-card-head svg{width:13px;height:13px;stroke:var(--hd-accent);fill:none;stroke-width:2;stroke-linecap:round}
.wb-page-row{display:flex;align-items:center;padding:9px 16px;border-bottom:1px solid var(--hd-border);gap:12px;min-height:44px}
.wb-page-row:last-child{border-bottom:none}
.wb-page-label{font-size:12px;color:var(--hd-text);font-weight:500;width:145px;flex-shrink:0}
.wb-page-label .hint{font-size:10px;color:var(--hd-text3);margin-top:1px;font-weight:400;display:block}
.wb-page-ctrl{flex:1;display:flex;align-items:center;gap:8px}
/* Chips page */
.wb-chips{display:flex;gap:5px;flex-wrap:wrap}
.wb-chip{padding:5px 12px;border-radius:7px;font-size:11px;font-weight:500;cursor:pointer;border:1.5px solid var(--hd-border);background:var(--hd-bg3);color:var(--hd-text2);transition:.1s;user-select:none;font-family:inherit}
.wb-chip:hover{border-color:var(--hd-accent-mid,#bfdbfe);color:var(--hd-accent)}
.wb-chip.selected{background:var(--hd-accent-light,#eff6ff);border-color:var(--hd-accent-mid,#bfdbfe);color:var(--hd-accent);font-weight:600}
/* Tags page */
.wb-tag-list{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:10px}
.wb-tag{display:flex;align-items:center;gap:4px;background:var(--hd-accent-light,#eff6ff);border:1px solid var(--hd-accent-mid,#bfdbfe);color:var(--hd-accent);border-radius:6px;padding:3px 9px;font-size:11px;font-weight:500}
.wb-tag-del{cursor:pointer;font-size:13px;opacity:.6;line-height:1;transition:.1s;background:none;border:none;color:inherit}
.wb-tag-del:hover{opacity:1}
/* Themes */
.wb-themes-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.wb-theme-tile{border:2px solid var(--hd-border);border-radius:9px;padding:9px;cursor:pointer;transition:.12s;text-align:center}
.wb-theme-tile:hover{border-color:var(--hd-accent-mid,#bfdbfe)}
.wb-theme-tile.selected{border-color:var(--hd-accent);background:var(--hd-accent-light,#eff6ff)}
.wb-theme-preview{width:100%;height:44px;border-radius:6px;overflow:hidden;margin-bottom:6px;display:flex;flex-direction:column}
.wb-theme-head{flex:1;border-radius:4px 4px 0 0}
.wb-theme-body{height:12px;background:#f1f5f9}
.wb-theme-name{font-size:10px;font-weight:600;color:var(--hd-text)}
/* Drawer preview */
.editor-preview-drawer{position:absolute;top:0;bottom:0;width:220px;background:#fff;box-shadow:-8px 0 24px rgba(0,0,0,.12);display:flex;flex-direction:column;transform:translateX(100%);opacity:0;transition:transform .35s cubic-bezier(.22,1,.36,1),opacity .3s;pointer-events:none;right:0}
.editor-preview-drawer.left-side{left:0;right:auto;transform:translateX(-100%);box-shadow:8px 0 24px rgba(0,0,0,.12)}
.editor-preview-drawer.visible{transform:translateX(0)!important;opacity:1;pointer-events:auto}
.editor-preview-overlay{position:absolute;inset:0;background:rgba(0,0,0,.22);opacity:0;pointer-events:none;transition:opacity .3s;z-index:5}
.editor-preview-overlay.visible{opacity:1;pointer-events:auto}

/* ── Editor live dot + missing animations ── */
@keyframes hd-blink{0%,100%{opacity:1}50%{opacity:.3}}

/* ── Editor tab style (topbar tabs) ── */
.hd-ed-tab { font-family: inherit; }
/* ── Topbar éditeur : tabs en ligne horizontale ── */
/* ── Topbar éditeur : forcer disposition horizontale ── */
#hd-page-editor > div:first-child {
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow: hidden !important;
}
#hd-editor-tabs-bar {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  overflow: hidden !important;
}
#hd-editor-tabs-bar > * {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}
.hd-ed-tab:hover { background: var(--hd-bg3) !important; color: var(--hd-text) !important; }
.hd-ed-tab.active { background: var(--hd-bg3) !important; color: var(--hd-accent) !important; font-weight: 600 !important; }

/* Sub-tabs inside form */
.hd-ed-subtabs { display:flex;gap:3px;padding:3px;background:var(--hd-bg3);border-radius:9px;margin-bottom:18px; }
.hd-ed-subtab { flex:1;height:30px;border:none;border-radius:7px;background:transparent;color:var(--hd-text2);font-family:inherit;font-size:12px;font-weight:500;cursor:pointer;transition:all .15s; }
.hd-ed-subtab:hover { color:var(--hd-text); }
.hd-ed-subtab.active { background:var(--hd-bg2);color:var(--hd-text);box-shadow:0 1px 3px rgba(0,0,0,.1); }

/* Section card in editor */
.hd-ed-card { background:var(--hd-bg2);border:1px solid var(--hd-border);border-radius:10px;padding:16px;margin-bottom:14px; }
.hd-ed-card-title { font-size:11px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--hd-text3);margin-bottom:14px;padding-bottom:10px;border-bottom:1px solid var(--hd-border); }

/* ── Editor section slide transition — géré en CSS ── */
@keyframes hd-sec-in {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: translateX(0); }
}
#page-edit-body .wb-page-card,
#page-edit-body .hd-ed-subtabs,
#page-edit-body .wb-themes-grid,
#page-edit-body .hd-ed-card,
#page-edit-body > div,
#page-edit-body > .hd-card {
  animation: hd-sec-in .2s cubic-bezier(.22,1,.36,1) both;
}

/* ── Page editor body padding ── */
#page-edit-body { overflow-y: auto !important; padding: 24px 28px !important; background: var(--hd-bg) !important; min-height: 0 !important; }

/* ── Wizard v2 — Secteurs & Choices ── */
.hd-wiz-sectors{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px;margin-top:4px}
.hd-wiz-sector{display:flex;flex-direction:column;align-items:center;gap:8px;padding:16px 10px;border:1.5px solid var(--hd-border);border-radius:12px;cursor:pointer;transition:all .15s;text-align:center;font-size:12px;font-weight:500;color:var(--hd-text2)}
.hd-wiz-sector svg{color:var(--hd-text3)}
.hd-wiz-sector:hover{border-color:var(--hd-accent);color:var(--hd-accent)}
.hd-wiz-sector.selected{border-color:var(--hd-accent);background:var(--hd-accent-light,rgba(12,85,244,.07));color:var(--hd-accent)}
.hd-wiz-sector.selected svg{color:var(--hd-accent)}

.hd-wiz-choice-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
.hd-wiz-choice{padding:7px 14px;border:1.5px solid var(--hd-border);border-radius:8px;cursor:pointer;font-size:12px;font-weight:500;color:var(--hd-text2);transition:all .15s;user-select:none}
.hd-wiz-choice:hover{border-color:var(--hd-accent);color:var(--hd-accent)}
.hd-wiz-choice.selected{border-color:var(--hd-accent);background:var(--hd-accent-light,rgba(12,85,244,.07));color:var(--hd-accent)}

.hd-wiz-item{background:var(--hd-bg2);border:1px solid var(--hd-border);border-radius:8px;padding:10px 12px;margin-bottom:8px}
.hd-wiz-item-header{display:flex;align-items:center;gap:6px;font-size:13px}
.hd-wiz-add-item{background:var(--hd-bg3);border:1px dashed var(--hd-border);border-radius:10px;padding:14px;margin-top:10px}

.hd-wiz-recap{background:var(--hd-bg2);border:1px solid var(--hd-border);border-radius:10px;overflow:hidden}
.hd-wiz-recap-row{display:flex;align-items:center;justify-content:space-between;padding:9px 14px;border-bottom:1px solid var(--hd-border);font-size:12px}
.hd-wiz-recap-row:last-child{border-bottom:none}
.hd-wiz-recap-row span{color:var(--hd-text3)}

/* Required field error state */
.hd-field input[style*="border-color:var(--hd-danger"],
.hd-field textarea[style*="border-color:var(--hd-danger"] {
  box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}
.hd-export-fmt-btn{padding:5px 12px;border:1.5px solid var(--hd-border);border-radius:7px;background:var(--hd-bg);font-size:11px;font-weight:600;color:var(--hd-text2);cursor:pointer;font-family:inherit;transition:all .15s}
.hd-export-fmt-btn:hover{border-color:var(--hd-accent);color:var(--hd-accent)}

/* ── Conversations Gmail-style ── */
.hd-conv-folder-btn{display:flex;align-items:center;gap:8px;width:100%;padding:7px 10px;border:none;background:transparent;border-radius:8px;font-size:13px;font-weight:400;color:var(--hd-text2);cursor:pointer;text-align:left;transition:background .12s}
.hd-conv-folder-btn:hover{background:var(--hd-bg3)}
.hd-conv-folder-btn.active{background:var(--hd-accent-light,rgba(12,85,244,.08));color:var(--hd-accent);font-weight:600}
.hd-conv-folder-btn.active svg{stroke:var(--hd-accent)}
.hd-conv-folder-btn span:first-of-type{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hd-folder-count{font-size:11px;font-weight:600;color:var(--hd-text3);margin-left:auto;flex-shrink:0}
.hd-conv-folder-btn.active .hd-folder-count{color:var(--hd-accent)}


/* ══ MENU ENGRENAGE CONVERSATIONS ══════════════════════════════ */
.hd-gear-menu {
  position: fixed;
  background: #fff;
  border: 1px solid var(--hd-border);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.16);
  min-width: 210px;
  z-index: 99990;
  overflow: hidden;
  animation: hdIn .15s ease;
}
.hd-gear-section {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--hd-text3);
  padding: 8px 14px 4px;
}
.hd-gear-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  background: none;
  border: none;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--hd-text);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background .1s;
}
.hd-gear-item:hover { background: var(--hd-bg3); }
.hd-gear-item svg { flex-shrink: 0; }
.hd-gear-item-danger { color: var(--hd-red) !important; }
.hd-gear-item-danger:hover { background: rgba(220,38,38,.06) !important; }
.hd-gear-divider {
  height: 1px;
  background: var(--hd-border);
  margin: 4px 0;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* ── Forms animations ── */
@keyframes fadeUp{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.6}}
/* hd-stat-ico colors for forms */
.hd-stat-ico.blue{background:rgba(12,85,244,.1);color:#0C55F4}
.hd-stat-ico.green{background:rgba(22,163,74,.1);color:#16a34a}
.hd-stat-ico.amber{background:rgba(232,152,58,.1);color:#e8983a}
.hd-stat-ico.red{background:rgba(220,38,38,.1);color:#dc2626}

/* ═══════════════════════════════════════════════════════════════════
   V4 REDESIGN — Overrides pour le nouveau design
   ═══════════════════════════════════════════════════════════════════ */

/* ── Variables update ── */
:root {
  --hd-font: 'Roboto', -apple-system, sans-serif;
  --hd-bg: #f7f9ff;
  --hd-sw: 240px;
}

/* ── Google Font ── */

/* ── Sidebar collapse ── */
.hd-sidebar { transition: width .3s cubic-bezier(.4,0,.2,1), min-width .3s cubic-bezier(.4,0,.2,1), max-width .3s cubic-bezier(.4,0,.2,1) !important; position: relative; }
.hd-main { transition: margin-left .3s cubic-bezier(.4,0,.2,1) !important; }

/* Collapse button */
.hd-collapse-btn {
  position: absolute; top: 20px; right: -12px; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; border: 1px solid var(--hd-border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 101; box-shadow: 0 1px 4px rgba(0,0,0,.08);
  transition: all .2s; opacity: 0; color: var(--hd-text3);
}
.hd-sidebar:hover .hd-collapse-btn { opacity: 1; }
.hd-collapse-btn:hover { background: #eff6ff; border-color: var(--hd-accent); color: var(--hd-accent); transform: scale(1.1); }
.hd-collapse-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; transition: transform .3s; }

/* Sidebar collapsed state */
.hd-sidebar.collapsed { width: 62px !important; min-width: 62px !important; max-width: 62px !important; overflow: visible !important; }
.hd-sidebar.collapsed .hd-logo { padding: 14px 0; justify-content: center; gap: 0; }
.hd-sidebar.collapsed .hd-logo > div { display: none; }
.hd-sidebar.collapsed .hd-logo-icon { width: 32px; height: 32px; }
.hd-sidebar.collapsed .hd-nav-section { opacity: 0; height: 0; padding: 0; margin: 0; overflow: hidden; }
.hd-sidebar.collapsed .hd-nav { padding: 0 8px; }
.hd-sidebar.collapsed .hd-nav-item {
  justify-content: center; padding: 8px; font-size: 0; overflow: hidden;
  white-space: nowrap; gap: 0; border-radius: 9px; width: 38px; height: 38px;
  margin: 0 auto 2px;
}
.hd-sidebar.collapsed .hd-nav-item svg { flex-shrink: 0; width: 16px !important; height: 16px !important; }
.hd-sidebar.collapsed .hd-nav-item .hd-nav-lbl { display: none; }
.hd-sidebar.collapsed .hd-nav-item .hd-badge-count { position: absolute; top: -1px; right: -4px; font-size: 7px; padding: 0 4px; min-width: 13px; }
.hd-sidebar.collapsed .hd-nav-item span[style*="margin-left:auto"] { display: none; } /* NEW badge */
.hd-sidebar.collapsed .hd-nav-item .hd-pill { display: none; }
.hd-sidebar.collapsed .hd-nav-item.active::before { left: -8px; }
.hd-sidebar.collapsed .hd-sidebar-plan { padding: 0; background: none !important; border: none !important; }
.hd-sidebar.collapsed .hd-sp-lbl, .hd-sidebar.collapsed .hd-sp-name, .hd-sidebar.collapsed .hd-sp-bar, .hd-sidebar.collapsed .hd-sp-info, .hd-sidebar.collapsed .hd-trial-warn { display: none; }
.hd-sidebar.collapsed .hd-sp-btn { font-size: 0; padding: 9px; width: 38px; height: 38px; margin: 0 auto; display: flex; align-items: center; justify-content: center; border-radius: 9px; }
.hd-sidebar.collapsed .hd-sp-btn::before { content: '⚡'; font-size: 14px; }
.hd-sidebar.collapsed .hd-sp-btn svg { display: none; }
.hd-sidebar.collapsed .hd-sidebar-footer { display: none; }
.hd-sidebar.collapsed .hd-sidebar-user { padding: 6px 0; justify-content: center; border-top: none; }
.hd-sidebar.collapsed .hd-sidebar-user > div { display: none; }
.hd-sidebar.collapsed .hd-sidebar-user > a { display: none; }
.hd-sidebar.collapsed .hd-lang-toggle { display: none; }
.hd-sidebar.collapsed .hd-collapse-btn { right: -12px; opacity: 1; }
.hd-sidebar.collapsed .hd-collapse-btn svg { transform: rotate(180deg); }

/* Tooltip on collapsed items */
.hd-sidebar.collapsed .hd-nav-item::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 10px); top: 50%;
  transform: translateY(-50%); background: var(--hd-text); color: #fff;
  font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 6px;
  white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 200;
}
.hd-sidebar.collapsed .hd-nav-item:hover::after { opacity: 1; }

/* ── Mode groups — show/hide sidebar sections ── */
/* .hd-mode-group — DÉSACTIVÉ sidebar statique */
.hd-mode-group,.hd-mode-group.active { display: none !important; }

/* ── Mode bar at bottom ── */
.hd-modebar {
  position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 9992;
  background: rgba(255,255,255,.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--hd-border); border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,.1), 0 0 0 1px rgba(0,0,0,.03);
  display: flex !important; align-items: center; gap: 2px; padding: 4px;
  transition: none;
}
.hd-mode-pill {
  position: absolute; top: 4px; left: 4px; height: calc(100% - 8px);
  background: var(--hd-accent); border-radius: 10px;
  box-shadow: 0 2px 10px rgba(12,85,244,.3);
  transition: all .4s cubic-bezier(.4,0,.2,1);
  z-index: 0; pointer-events: none;
}
.hd-mode-btn {
  display: flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 10px;
  font-size: 12px; font-weight: 600; color: var(--hd-text3); transition: color .3s;
  cursor: pointer; white-space: nowrap; position: relative; z-index: 1;
  background: none; border: none; font-family: var(--hd-font);
}
.hd-mode-btn:hover { color: var(--hd-text); }
.hd-mode-btn.active { color: #fff; }
.hd-mode-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hd-mode-sep { width: 1px; height: 22px; background: var(--hd-border); margin: 0 2px; flex-shrink: 0; z-index: 1; transition: opacity .3s; }
.hd-mode-sep.hide { opacity: 0; }

/* ── Page slide transitions ── */
.hd-page {
  transition: opacity .3s cubic-bezier(.4,0,.2,1), transform .3s cubic-bezier(.4,0,.2,1) !important;
}


/* ── Design fidelity additions (index.html parity) ───────────────── */
.hd-wrap code,.hd-wrap pre,.hd-wrap .hd-mono{font-family:var(--hd-mono)}
.hd-sidebar{background:var(--hd-bg2)!important;border-right:1px solid var(--hd-border)!important;box-shadow:none!important}
.hd-logo{padding:16px 16px 14px!important;border-bottom:none!important}
.hd-logo-icon{width:34px!important;height:34px!important;border-radius:10px!important;background:var(--hd-accent)!important;box-shadow:none!important}
.hd-logo-name{font-size:13.5px!important;font-weight:700!important}
.hd-logo-sub{font-size:9.5px!important;color:var(--hd-text3)!important}
.hd-nav{padding:0 10px 10px!important}
.hd-nav-section{font-size:9px!important;font-weight:700!important;text-transform:uppercase!important;letter-spacing:.1em!important;color:var(--hd-text3)!important;padding:16px 10px 5px!important}
.hd-nav-item{padding:7px 10px!important;border-radius:8px!important;font-size:12.5px!important;font-weight:500!important;color:var(--hd-text2)!important;margin-bottom:1px!important}
.hd-nav-item svg{width:18px!important;height:18px!important;stroke-width:1.8!important}
.hd-nav-item:hover{background:var(--hd-bg)!important;color:var(--hd-text)!important}
.hd-nav-item.active{background:#eff6ff!important;color:var(--hd-accent)!important;font-weight:600!important}
.hd-nav-item.active::before{left:-10px!important;top:50%!important;transform:translateY(-50%)!important;width:3px!important;height:16px!important;border-radius:0 3px 3px 0!important;background:var(--hd-accent)!important}
.hd-badge-count{font-size:9px!important;font-weight:700!important;padding:1px 6px!important;border-radius:99px!important;color:#fff!important;background:var(--hd-accent)!important}
.hd-page-inner{padding:20px 24px!important}
.hd-stat{border-radius:12px!important;box-shadow:none!important;transition:all .2s!important}
.hd-stat:hover,.hd-card:hover{box-shadow:var(--hd-shadow)!important;transform:translateY(-2px)}
.hd-card,.hd-plan-hero-card{border-radius:12px!important;box-shadow:none!important}
.hd-plan-hero-card{background:linear-gradient(135deg,#eff6ff 0%,#f0f7ff 100%)!important;color:var(--hd-text)!important;border:1px solid #dbeafe!important}
.hd-plan-hero-card button{background:var(--hd-accent)!important;border-color:var(--hd-accent)!important;color:#fff!important}
.hd-modebar{background:rgba(255,255,255,.92)!important;backdrop-filter:blur(16px)!important;border:1px solid var(--hd-border)!important;border-radius:14px!important;box-shadow:0 4px 24px rgba(0,0,0,.1),0 0 0 1px rgba(0,0,0,.03)!important;padding:4px!important;gap:2px!important}
.hd-mode-pill{background:var(--hd-accent)!important;border-radius:10px!important;box-shadow:0 2px 10px rgba(26,86,219,.3)!important}
.hd-mode-btn{padding:8px 16px!important;border-radius:10px!important;font-size:12px!important;font-weight:600!important;color:var(--hd-text3)!important}
.hd-mode-btn.active{color:#fff!important}
.hd-mode-btn:hover{color:var(--hd-text)!important}
.hd-topbar,.topbar{height:52px!important;border-bottom:1px solid var(--hd-border)!important;background:#fff!important}
#hd-page-editor,#hd-page-form-builder{background:var(--hd-bg)!important}
.hd-set-row{display:flex;align-items:center;justify-content:space-between;padding:10px 0;border-bottom:1px solid var(--hd-bg3)}
.hd-set-row:last-child{border-bottom:none}
.hd-switch{position:relative;width:36px;height:20px;display:inline-block;flex-shrink:0}
.hd-switch input{opacity:0;width:0;height:0;position:absolute}
.hd-switch span{position:absolute;inset:0;background:#d1d5e0;border-radius:99px;cursor:not-allowed;transition:.2s}
.hd-switch span::before{content:'';position:absolute;width:14px;height:14px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.2s;box-shadow:0 1px 3px rgba(0,0,0,.2)}
.hd-switch input:checked + span{background:var(--hd-accent)}
.hd-switch input:checked + span::before{transform:translateX(16px)}

/* === Pass 2: conversation + billing redesign + reliable collapsed sidebar === */
#hd-root.sidebar-collapsed .hd-sidebar{width:62px!important;min-width:62px!important;max-width:62px!important}
#hd-root.sidebar-collapsed .hd-modebar{transform:translateX(-50%)!important}
#hd-page-conversations .hd-conv-wrap{display:flex;height:100%;min-height:0;background:var(--hd-bg)}
#hd-conv-sidebar{background:#fff!important;padding:12px 8px!important;width:220px!important;min-width:220px!important;border-right:1px solid var(--hd-border)!important}
#hd-conv-mid{width:320px!important;min-width:320px!important;max-width:320px!important;background:#fff!important}
#hd-conv-toolbar{background:#fff!important;border-bottom:1px solid var(--hd-border)!important}
.hd-conv-toolbar-top{display:flex;gap:10px;align-items:center}
.hd-conv-toolbar-row{display:flex;align-items:center;justify-content:space-between;gap:6px}
.hd-conv-search-input,.hd-conv-sort-select{width:100%;padding:7px 10px 7px 30px;background:var(--hd-bg);border:1px solid var(--hd-border);border-radius:10px;font-size:12px;font-family:inherit;color:var(--hd-text);outline:none}
.hd-conv-sort-select{padding:7px 10px;max-width:165px}
.hd-conv-toolbar-tabs{display:flex;gap:8px}
.hd-conv-toolbar-tab{background:transparent;border:1px solid var(--hd-border);border-radius:999px;padding:7px 11px;font-size:11px;font-weight:700;color:var(--hd-text2);display:flex;align-items:center;gap:7px}
.hd-conv-toolbar-tab span{background:var(--hd-bg3);padding:2px 7px;border-radius:999px;font-size:10px}
.hd-conv-toolbar-tab.active{background:var(--hd-blue-bg);border-color:#c7d9fe;color:var(--hd-accent)}
.hd-conv-folder-btn{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;border-radius:10px;border:1px solid transparent;background:transparent;font-size:12px;color:var(--hd-text2);cursor:pointer;text-align:left}
.hd-conv-folder-btn:hover{background:var(--hd-bg)}
.hd-conv-folder-btn.active{background:var(--hd-blue-bg);border-color:#c7d9fe;color:var(--hd-accent);font-weight:700}
.hd-folder-count{margin-left:auto;background:var(--hd-bg3);padding:2px 7px;border-radius:999px;font-size:10px;font-weight:700}
.hd-conv-list{background:#fff}
.hd-conv-item{display:flex;gap:10px;padding:12px;border-bottom:1px solid var(--hd-bg3);cursor:pointer;transition:.15s;background:#fff}
.hd-conv-item:hover{background:var(--hd-bg)}
.hd-conv-item.active{background:var(--hd-blue-bg);box-shadow:inset 3px 0 0 var(--hd-accent)}
.hd-conv-avatar{width:34px;height:34px;border-radius:10px;background:var(--hd-bg3);display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;color:var(--hd-text2);flex-shrink:0}
.hd-conv-body{min-width:0;flex:1}
.hd-conv-name{font-size:12px;font-weight:700;color:var(--hd-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hd-conv-prev{font-size:11.5px;color:var(--hd-text2);margin-top:4px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hd-conv-meta{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-top:8px}
.hd-conv-source,.hd-conv-count{font-size:10px;color:var(--hd-text3);background:var(--hd-bg);border-radius:999px;padding:3px 8px}
.hd-conv-panel{background:var(--hd-bg);padding:16px;min-width:0}
.hd-conv-detail-shell{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:14px;height:100%}
.hd-conv-thread,.hd-conv-info-panel{background:#fff;border:1px solid var(--hd-border);border-radius:16px;overflow:hidden;min-height:0}
.hd-conv-thread{display:flex;flex-direction:column}
.hd-cpanel-head-v2{padding:16px 18px;border-bottom:1px solid var(--hd-border);display:flex;justify-content:space-between;gap:12px;align-items:flex-start;background:#fff}
.hd-cpanel-main{display:flex;gap:12px;min-width:0;flex:1}
.hd-cpanel-avatar{width:40px;height:40px;border-radius:12px;background:var(--hd-blue-bg);color:var(--hd-accent);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:800;flex-shrink:0}
.hd-cpanel-subline{font-size:11px;color:var(--hd-text3);margin-top:3px}
.hd-cpanel-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.hd-conv-msgs{flex:1;background:linear-gradient(180deg,#fff 0%,#f8fafc 100%);padding:16px 18px;overflow:auto}
.hd-msg{max-width:76%;margin-bottom:10px}
.hd-msg.user{margin-left:auto}
.hd-bubble{padding:10px 13px;border-radius:14px;font-size:13px}
.hd-msg.user .hd-bubble{border-bottom-right-radius:5px}
.hd-msg.bot .hd-bubble,.hd-msg.agent .hd-bubble{border-bottom-left-radius:5px}
.hd-reply-area{padding:14px 18px;background:#fff}
.hd-reply-area textarea{border-radius:12px;background:var(--hd-bg)!important;min-height:82px}
.hd-conv-info-panel{padding:16px;overflow:auto}
.hd-conv-info-section+.hd-conv-info-section{margin-top:14px}
.hd-conv-info-lbl{font-size:11px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--hd-text3);margin-bottom:8px}
.hd-conv-info-card{border:1px solid var(--hd-border);border-radius:12px;background:var(--hd-bg);padding:12px;display:flex;flex-direction:column;gap:10px}
.hd-conv-info-card div{display:flex;flex-direction:column;gap:3px}
.hd-conv-info-card strong{font-size:11px;color:var(--hd-text)}
.hd-conv-info-card span{font-size:11px;color:var(--hd-text2);word-break:break-word}
.hd-conv-info-actions{display:flex;flex-direction:column;gap:8px}

#hd-page-billing .hd-page-inner{display:flex;flex-direction:column;gap:18px}
#hd-page-billing .hd-plan-summary{background:#fff;border:1px solid var(--hd-border);border-radius:16px;box-shadow:0 1px 3px rgba(0,0,0,.04)}
#hd-page-billing .hd-plan-summary-top{align-items:flex-start!important;gap:14px}
#hd-page-billing .hd-usage-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
#hd-page-billing .hd-usage-item{background:var(--hd-bg);border:1px solid var(--hd-border);border-radius:14px;padding:16px}
#hd-page-billing .hd-billing-redesign{display:flex;flex-direction:column;gap:16px}
.hd-pricing-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.hd-plan-card{background:#fff!important;border:1px solid var(--hd-border)!important;border-radius:16px!important;padding:20px!important;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.hd-plan-card.current{box-shadow:0 0 0 2px rgba(12,85,244,.12)!important}
.hd-plan-card.featured{background:linear-gradient(180deg,#f8fbff 0%,#fff 100%)!important}
.hd-plan-topline{font-size:11px;font-weight:700;color:var(--hd-text3);text-transform:uppercase;letter-spacing:.06em;margin-bottom:8px}
.hd-plan-desc{font-size:12px;color:var(--hd-text2);line-height:1.55;margin-bottom:14px}
.hd-plan-card-free .hd-plan-price{color:var(--hd-text)!important}
.hd-plan-compare-card{padding:0!important;overflow:hidden}
.hd-plan-table-wrap{overflow:auto}
.hd-plan-table{width:100%;border-collapse:collapse;font-size:12px}
.hd-plan-table th,.hd-plan-table td{padding:12px 16px;border-bottom:1px solid var(--hd-border);text-align:center}
.hd-plan-table th:first-child,.hd-plan-table td:first-child{text-align:left}
.hd-plan-table thead th{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--hd-text3);background:var(--hd-bg)}
.hd-plan-table .is-pro{background:#eff6ff;color:var(--hd-accent);font-weight:700}
.hd-plan-row-head td{background:var(--hd-bg)!important;color:var(--hd-text2);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.hd-billing-feature-panels{display:grid;grid-template-columns:1.3fr 1fr;gap:14px}
.hd-billing-perks{display:flex;flex-wrap:wrap;gap:8px}
.hd-billing-perks span{background:var(--hd-blue-bg);color:var(--hd-accent);border:1px solid #c7d9fe;padding:7px 10px;border-radius:999px;font-size:11px;font-weight:700}
.hd-billing-faq{display:flex;flex-direction:column;gap:12px}
.hd-billing-faq strong{display:block;font-size:12px;color:var(--hd-text);margin-bottom:3px}
.hd-billing-faq p{margin:0;font-size:12px;color:var(--hd-text2);line-height:1.55}

@media (max-width: 1180px){
  #hd-conv-sidebar{display:none!important}
  #hd-conv-mid{width:300px!important;min-width:300px!important;max-width:300px!important}
  .hd-conv-detail-shell{grid-template-columns:minmax(0,1fr)}
  .hd-conv-info-panel{display:none}
  .hd-pricing-grid,.hd-billing-feature-panels,#hd-page-billing .hd-usage-grid{grid-template-columns:1fr}
}
@media (max-width: 860px){
  #hd-page-conversations .hd-conv-wrap{flex-direction:column}
  #hd-conv-mid{width:auto!important;min-width:0!important;max-width:none!important;border-right:none!important;border-bottom:1px solid var(--hd-border)!important}
  .hd-conv-toolbar-top{flex-direction:column;align-items:stretch}
  .hd-conv-toolbar-row{flex-wrap:wrap}
  .hd-conv-sort-select{max-width:none}
}

/* v3 alignment with dashboard html */
.hd-overview-grid-21{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:14px;margin-bottom:16px}
.hd-panel{padding:0 !important;overflow:hidden;border-radius:12px}
.hd-panel-head{display:flex;align-items:center;gap:8px;padding:12px 16px;border-bottom:1px solid var(--hd-border)}
.hd-panel-head svg{stroke:currentColor;fill:none;stroke-width:1.9;flex-shrink:0;color:var(--hd-text2)}
.hd-panel-title{font-size:12.5px;font-weight:700;flex:1;color:var(--hd-text)}
.hd-panel-link{font-size:11px;font-weight:700;color:var(--hd-accent);cursor:pointer}
.hd-panel-body{padding:0}
.hd-panel-scroll{overflow:auto}
.hd-stat-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.hd-stat-trend{font-size:10px;font-weight:700;padding:2px 6px;border-radius:999px;background:#f0fdf4;color:#16a34a}
.hd-feed-item{display:flex;gap:10px;padding:10px 16px;border-bottom:1px solid var(--hd-bg3);transition:background .12s}
.hd-feed-item:last-child{border-bottom:none}
.hd-feed-item:hover{background:var(--hd-bg2)}
.hd-feed-dot{width:7px;height:7px;border-radius:50%;margin-top:5px;flex-shrink:0;background:var(--hd-accent)}
.hd-feed-dot.green{background:#16a34a}.hd-feed-dot.blue{background:var(--hd-accent)}.hd-feed-dot.violet{background:#7c3aed}.hd-feed-dot.amber{background:#d97706}
.hd-feed-text{font-size:11.5px;color:var(--hd-text2);line-height:1.45}.hd-feed-text strong{color:var(--hd-text)}
.hd-feed-time{font-size:9.5px;color:var(--hd-text3);margin-top:1px}
.hd-rdv-mini-settings{padding:10px 16px}
.hd-mini-row{display:flex;align-items:center;justify-content:space-between;padding:10px 0;border-bottom:1px solid var(--hd-bg3);font-size:11.5px;color:var(--hd-text2)}
.hd-mini-row:last-child{border-bottom:none}
.hd-mini-link{background:none;border:none;color:var(--hd-accent);font-weight:700;cursor:pointer}
.hd-rdv-overview-row{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid var(--hd-bg3)}
.hd-rdv-overview-row:last-child{border-bottom:none}
.hd-rdv-overview-date{font-size:10px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--hd-accent);background:#eff6ff;border:1px solid #dbeafe;border-radius:8px;padding:6px 8px;flex-shrink:0}
.hd-rdv-overview-title{font-size:12px;font-weight:700;color:var(--hd-text)}
.hd-rdv-overview-meta{font-size:10.5px;color:var(--hd-text3);margin-top:2px}
.hd-badge{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:999px;font-size:10px;font-weight:700}
.hd-badge-green{background:#f0fdf4;color:#16a34a}.hd-badge-amber{background:#fffbeb;color:#d97706}
#hd-root.sidebar-collapsed .hd-sidebar{overflow:visible !important}
#hd-root.sidebar-collapsed .hd-main{margin-left:0 !important}
#hd-root .hd-sidebar .hd-nav-item{position:relative}
#hd-root.sidebar-collapsed .hd-sidebar .hd-nav-item{width:38px;height:38px;margin:0 auto 3px;padding:8px;justify-content:center;gap:0;border-radius:10px}
#hd-root.sidebar-collapsed .hd-sidebar .hd-nav-item .hd-badge-count{position:absolute;top:-2px;right:-4px}
#hd-root.sidebar-collapsed .hd-sidebar .hd-nav-item::after{content:attr(data-tip);position:absolute;left:calc(100% + 10px);top:50%;transform:translateY(-50%);background:#0f172a;color:#fff;padding:4px 9px;border-radius:6px;font-size:11px;font-weight:700;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s}
#hd-root.sidebar-collapsed .hd-sidebar .hd-nav-item:hover::after{opacity:1}
#hd-root.sidebar-collapsed .hd-sidebar .hd-nav-lbl,
#hd-root.sidebar-collapsed .hd-sidebar .hd-nav-section,
#hd-root.sidebar-collapsed .hd-sidebar .hd-logo > div:last-child,
#hd-root.sidebar-collapsed .hd-sidebar .hd-sidebar-plan,
#hd-root.sidebar-collapsed .hd-sidebar .hd-lang-toggle,
#hd-root.sidebar-collapsed .hd-sidebar .hd-su-name,
#hd-root.sidebar-collapsed .hd-sidebar .hd-su-email{display:none !important}
#hd-root.sidebar-collapsed .hd-sidebar .hd-logo{justify-content:center;padding:14px 0}
#hd-root.sidebar-collapsed .hd-sidebar .hd-sidebar-user{justify-content:center;padding:8px 0}
#hd-root.sidebar-collapsed .hd-sidebar .hd-sidebar-user a{display:none !important}
@media (max-width: 1100px){.hd-overview-grid-21{grid-template-columns:1fr}}

/* Stronger hover color inheritance inside dashboard */
#hd-root a:hover{color:inherit;text-decoration:none}
#hd-root .hd-btn:hover,#hd-root .hd-btn:hover *,#hd-root .hd-filter-btn:hover,#hd-root .hd-filter-btn:hover *,#hd-root .hd-act-btn:hover,#hd-root .hd-act-btn:hover *,#hd-root .hd-nav-item:hover,#hd-root .hd-nav-item:hover *{color:inherit}
#hd-root .hd-btn-primary,#hd-root .hd-btn-primary *,#hd-root .hd-btn-primary:hover,#hd-root .hd-btn-primary:hover *{color:#fff !important}
#hd-root .hd-nav-item:hover{color:var(--hd-text)!important}
#hd-root .hd-nav-item.active,#hd-root .hd-nav-item.active *{color:var(--hd-accent)!important}
#hd-root .hd-nav-item.active .hd-badge-count{color:#fff!important}
#hd-root .hd-filter-btn.active,#hd-root .hd-filter-btn.active *{color:#fff!important}

/* RDV calendar redesign aligned to provided index */
.hd-rdv-cal-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--hd-bg3);gap:12px;flex-wrap:wrap}
.hd-rdv-cal-left,.hd-rdv-cal-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.hd-rdv-cal-title{font-size:14px;font-weight:700;color:var(--hd-text)}
.hd-cal-icon-btn{width:32px;height:32px;border:1px solid var(--hd-border);border-radius:8px;background:var(--hd-bg2);display:flex;align-items:center;justify-content:center;color:var(--hd-text2);font-size:16px;cursor:pointer;transition:.15s}
.hd-cal-icon-btn:hover{border-color:var(--hd-accent);color:var(--hd-accent);background:#fff}
.hd-cal-soft-btn{padding:7px 12px;border:1px solid var(--hd-border);border-radius:8px;background:#fff;color:var(--hd-text2);font-size:11px;font-weight:600;cursor:pointer;transition:.15s}
.hd-cal-soft-btn:hover{border-color:var(--hd-accent);color:var(--hd-accent)}
.hd-rdv-cal-switch{display:flex;gap:4px;background:var(--hd-bg2);padding:4px;border-radius:10px;border:1px solid var(--hd-border)}
.hd-cal-view-btn{padding:7px 11px;border-radius:8px;font-size:11px;font-weight:600;color:var(--hd-text2);background:transparent;border:none;cursor:pointer;transition:.15s}
.hd-cal-view-btn.active{background:#eff6ff;color:var(--hd-accent);box-shadow:inset 0 0 0 1px #dbeafe}
.hd-rdv-cal-body{padding:0}
.hd-week-board{padding:0 0 8px}
.hd-week-head{display:grid;grid-template-columns:repeat(7,1fr);border-bottom:1px solid var(--hd-border)}
.hd-week-head-day{text-align:center;font-size:10px;font-weight:700;color:var(--hd-text3);padding:10px 6px;border-right:1px solid var(--hd-border);text-transform:uppercase;background:#fff}
.hd-week-head-day:last-child{border-right:none}
.hd-week-head-day span{color:inherit}
.hd-week-head-day.today{color:var(--hd-accent);background:#eff6ff}
.hd-week-grid{display:grid;grid-template-columns:repeat(7,1fr);min-height:300px}
.hd-week-col{padding:8px 6px;border-right:1px solid var(--hd-border);background:#fff}
.hd-week-col:last-child{border-right:none}
.hd-week-col.today{background:rgba(12,85,244,.03)}
.hd-week-event{border-left:3px solid; border-radius:0 8px 8px 0;padding:8px 9px;margin-bottom:6px;cursor:pointer;transition:.15s}
.hd-week-event:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(15,23,42,.08)}
.hd-week-event.violet{background:#f5f3ff;border-color:#7c3aed}.hd-week-event.violet .hd-week-event-time{color:#7c3aed}
.hd-week-event.blue{background:#eff6ff;border-color:#2563eb}.hd-week-event.blue .hd-week-event-time{color:#2563eb}
.hd-week-event.green{background:#f0fdf4;border-color:#16a34a}.hd-week-event.green .hd-week-event-time{color:#16a34a}
.hd-week-event.amber{background:#fffbeb;border-color:#d97706}.hd-week-event.amber .hd-week-event-time{color:#d97706}
.hd-week-event-time{font-size:10px;font-weight:700}
.hd-week-event-title{font-size:10.5px;font-weight:600;color:var(--hd-text);margin-top:2px}
.hd-week-event-meta{font-size:9px;color:var(--hd-text3);margin-top:2px}
.hd-cal-list-wrap{padding:0}
.hd-cal-list-item{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--hd-bg3)}
.hd-cal-list-item:last-child{border-bottom:none}
.hd-cal-list-date{width:42px;height:42px;border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;flex-shrink:0}
.hd-cal-list-date strong{font-size:14px;line-height:1}.hd-cal-list-date span{font-size:9px;font-weight:700;text-transform:uppercase;color:var(--hd-text3)}
.hd-cal-list-date.violet{background:#f5f3ff;color:#7c3aed}.hd-cal-list-date.blue{background:#eff6ff;color:#2563eb}.hd-cal-list-date.green{background:#f0fdf4;color:#16a34a}
.hd-cal-list-main{flex:1;min-width:0}.hd-cal-list-title{font-size:12.5px;font-weight:600;color:var(--hd-text)}.hd-cal-list-sub{font-size:11px;color:var(--hd-text3);margin-top:2px}

/* === v5 conversation fidelity + overflow cleanup === */
#hd-root, .hd-wrap, .hd-main, .hd-page, .hd-conv-wrap { max-width: 100vw !important; overflow-x: hidden !important; }
.hd-sidebar, .hd-conv-left, #hd-conv-mid { overflow-x: hidden !important; }
.hd-modebar { max-width: calc(100vw - 28px); }
.hd-stat:hover, .hd-card:hover, .hd-quick-action:hover, .hd-recent-item:hover, .hd-plan-card:hover { box-shadow: none !important; transform: none !important; }
.hd-mode-btn.active:hover { color: #fff !important; }
.hd-mode-btn.active:hover svg { stroke: currentColor !important; }

#hd-page-conversations .hd-conv-wrap { background: #f3f4f6 !important; }
#hd-conv-mid { width: 276px !important; min-width: 276px !important; max-width: 276px !important; border-right: 1px solid var(--hd-border) !important; background: #fff !important; }
#hd-conv-toolbar { display:flex; flex-direction:column; gap:0; padding:0 !important; background:#fff !important; border-bottom:1px solid var(--hd-border) !important; }
.hd-conv-search-wrap { position: relative; }
.hd-conv-search-wrap svg { position:absolute; left:11px; top:50%; transform:translateY(-50%); color:var(--hd-text3); pointer-events:none; }
.hd-conv-search-input { width:100%; padding:10px 12px 10px 34px !important; border:1px solid #d6dbe5 !important; border-radius:10px !important; background:#f8fafc !important; font-size:13px !important; }
.hd-conv-search-input:focus { border-color: var(--hd-accent) !important; background:#fff !important; }
.hd-conv-toolbar-tabs { display:flex; gap:14px; padding:0 6px; border-bottom:1px solid var(--hd-border); overflow-x:auto; flex:1; min-width:0; }
.hd-conv-toolbar-tab { border:none !important; background:none !important; padding:10px 0 9px !important; border-radius:0 !important; font-size:12px !important; font-weight:600 !important; color:#94a3b8 !important; border-bottom:2px solid transparent !important; white-space:nowrap; cursor:pointer; }
.hd-conv-toolbar-tab.active { color: var(--hd-accent) !important; border-bottom-color: var(--hd-accent) !important; }
.hd-conv-list { background:#fff !important; }
.hd-conv-item { position:relative; overflow:hidden; display:block; padding:0 !important; border-bottom:1px solid #edf1f7 !important; background:#fff !important; box-shadow:none !important; }
.hd-conv-main{position:relative; z-index:2; display:flex; align-items:flex-start; gap:12px; padding:12px 14px; background:#fff;}
.hd-conv-item:hover .hd-conv-main { background:#f8fafc !important; }
.hd-conv-item.active .hd-conv-main { background:#f5f8ff !important; box-shadow: inset 3px 0 0 var(--hd-accent) !important; }
.hd-conv-avatar { width:34px; height:34px; border-radius:10px; background:#eef2f7; color:#475569; font-size:12px; font-weight:700; transition:opacity .15s ease; }
.hd-conv-item.active .hd-conv-avatar { background:#e9f0ff; color:var(--hd-accent); }
.hd-conv-avatar-wrap { position:relative; width:34px; height:34px; min-width:34px; flex:0 0 34px; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.hd-conv-avatar-wrap .hd-conv-avatar { position:absolute; inset:0; width:34px; height:34px; display:flex; align-items:center; justify-content:center; transition:opacity .15s ease; }
.hd-conv-trash-trigger { appearance:none; -webkit-appearance:none; position:absolute; top:0; left:0; right:0; bottom:0; margin:0; padding:0; width:34px; height:34px; border:none; border-radius:10px; background:#ef4444; color:#fff; display:flex; align-items:center; justify-content:center; opacity:0; pointer-events:none; transition:opacity .15s ease, background .15s ease; z-index:2; box-sizing:border-box; }
.hd-conv-item:hover .hd-conv-trash-trigger { opacity:1; pointer-events:auto; }
.hd-conv-item:hover .hd-conv-avatar { opacity:0; pointer-events:none; }
.hd-conv-body{flex:1; min-width:0; position:relative; min-height:46px; display:flex; align-items:center;}
.hd-conv-content{width:100%; min-width:0; display:block;}
.hd-conv-trash-trigger:hover{background:#dc2626;}
.hd-conv-trash-trigger svg,.hd-conv-trash-trigger svg *{stroke:#fff !important;color:#fff !important;}
.hd-conv-item-menu { position:fixed; display:none; z-index:9999; min-width:190px; }
.hd-conv-fav { color:#f59e0b; font-size:12px; line-height:1; }
.hd-conv-top { margin-bottom:4px; }
.hd-conv-name-row { display:flex; align-items:center; gap:8px; min-width:0; }
.hd-conv-name { font-size:14px !important; font-weight:700 !important; color:#0f172a !important; }
.hd-conv-dot { width:7px; height:7px; border-radius:50%; background:var(--hd-accent); flex-shrink:0; }
.hd-conv-chk-wrap { display:flex; align-items:center; justify-content:center; width:34px; height:34px; cursor:pointer; z-index:3; }
.hd-conv-bulk-bar button:hover { background:#dc2626 !important; }
.hd-conv-select-btn { padding:5px 7px; border:1px solid var(--hd-border); border-radius:8px; background:var(--hd-bg); color:var(--hd-text3) !important; cursor:pointer; display:flex; align-items:center; font-size:11px; transition:background .15s,color .15s,border-color .15s; flex-shrink:0; }
.hd-conv-select-btn svg { stroke:var(--hd-text3); transition:stroke .15s; }
.hd-conv-select-btn:hover { border-color:var(--hd-accent) !important; }
.hd-conv-select-btn.active { background:var(--hd-accent) !important; border-color:var(--hd-accent) !important; color:#fff !important; }
.hd-conv-select-btn.active svg, .hd-conv-select-btn.active svg * { stroke:#fff !important; }
.hd-conv-bulk-del { padding:4px 10px; border-radius:6px; border:none; background:#ef4444; color:#fff !important; font-size:11px; font-weight:600; cursor:pointer; display:flex; align-items:center; gap:4px; }
.hd-conv-bulk-del:hover { background:#dc2626 !important; color:#fff !important; }
.hd-conv-bulk-del svg, .hd-conv-bulk-del svg * { stroke:#fff !important; }
.hd-conv-time { font-size:11px !important; color:#94a3b8 !important; }
.hd-conv-prev { font-size:13px !important; color:#94a3b8 !important; -webkit-line-clamp:1 !important; margin-top:1px !important; }
.hd-conv-sub { font-size:12px; color:#cbd5e1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.hd-conv-panel { padding:0 !important; background:#f3f4f6 !important; }
.hd-conv-detail-shell { display:grid !important; grid-template-columns:minmax(0,1fr) 330px !important; gap:0 !important; height:100%; }
.hd-conv-thread, .hd-conv-info-panel { border:none !important; border-radius:0 !important; background:transparent !important; }
.hd-conv-thread { border-right:1px solid var(--hd-border) !important; }
.hd-cpanel-head-v2 { padding:12px 16px !important; background:#fff !important; align-items:center !important; }
.hd-cpanel-avatar-solid { background:var(--hd-accent) !important; color:#fff !important; width:36px !important; height:36px !important; border-radius:10px !important; }
.hd-cpanel-name { font-size:15px !important; }
.hd-cpanel-subline { font-size:12px !important; color:#94a3b8 !important; }
.hd-icon-btn { width:32px; height:32px; border-radius:9px; border:1px solid var(--hd-border); background:#fff; display:flex; align-items:center; justify-content:center; color:var(--hd-text2); }
.hd-icon-btn:hover { color:var(--hd-text); background:#f8fafc; }

.hd-conv-msgs { padding:18px 20px !important; background:#f3f4f6 !important; gap:14px !important; }
.hd-msg { display:flex; align-items:flex-start; gap:10px; max-width:100% !important; margin:0 !important; }
.hd-msg.user { justify-content:flex-end; }
.hd-msg-stack { display:flex; flex-direction:column; min-width:0; max-width:min(66%, 720px); }
.hd-msg.user .hd-msg-stack { align-items:flex-end; }
.hd-msg-avatar { width:28px; height:28px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; flex-shrink:0; margin-top:2px; }
.hd-msg-avatar.bot { background:var(--hd-accent); color:#fff; }
.hd-msg-avatar.agent { background:#e2f7ea; color:#16a34a; }
.hd-msg-avatar.user { background:#eef2f7; color:#475569; }
.hd-bubble { background:#fff; border:1px solid #dfe6ef; color:#0f172a; padding:11px 14px !important; border-radius:16px !important; font-size:13px !important; line-height:1.5; box-shadow:none !important; }
.hd-msg.user .hd-bubble { background:var(--hd-accent) !important; color:#fff !important; border-color:var(--hd-accent) !important; border-bottom-right-radius:8px !important; }
.hd-msg.bot .hd-bubble, .hd-msg.agent .hd-bubble { border-bottom-left-radius:8px !important; }
.hd-msg-time { font-size:11px; color:#94a3b8; margin-top:6px; padding:0 4px; }

.hd-reply-area-v2 { display:flex; align-items:center; gap:10px; padding:10px 12px !important; background:#fff !important; border-top:1px solid var(--hd-border) !important; }
.hd-reply-area-v2 textarea { margin:0 !important; min-height:44px !important; max-height:120px; border-radius:12px !important; padding:12px 14px !important; background:#f8fafc !important; resize:none; flex:1; }
.hd-reply-attach, .hd-send-btn { width:34px; height:34px; border:none; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.hd-reply-attach { background:transparent; color:#94a3b8; }
.hd-send-btn { background:var(--hd-accent); color:#fff; }
.hd-send-btn:hover { background:#0637AF; }

.hd-conv-info-panel { width:330px; min-width:330px; background:#fff !important; padding:20px 20px !important; overflow:auto; }
.hd-conv-profile-card { display:flex; flex-direction:column; align-items:center; text-align:center; padding-bottom:14px; }
.hd-conv-profile-avatar { width:56px; height:56px; border-radius:16px; background:var(--hd-accent); color:#fff; display:flex; align-items:center; justify-content:center; font-size:18px; font-weight:700; margin-bottom:12px; }
.hd-conv-profile-name { font-size:15px; font-weight:700; color:var(--hd-text); }
.hd-conv-profile-mail { font-size:12px; color:#94a3b8; margin-top:4px; }
.hd-conv-info-lbl { font-size:11px !important; color:#94a3b8 !important; letter-spacing:.08em !important; margin-bottom:10px !important; }
.hd-conv-info-list { display:flex; flex-direction:column; gap:10px; }
.hd-conv-info-list div { display:flex; justify-content:space-between; gap:10px; font-size:13px; }
.hd-conv-info-list strong { font-weight:500; color:#475569; }
.hd-conv-info-list span { color:#0f172a; text-align:right; display:flex; align-items:center; gap:6px; justify-content:flex-end; }
.hd-mini-status { width:8px; height:8px; border-radius:50%; display:inline-block; }
.hd-mini-status.open, .hd-mini-status.handled_ai { background:#22c55e; }
.hd-mini-status.handled_human { background:#f59e0b; }
.hd-mini-status.closed { background:#cbd5e1; }
.hd-conv-progress-card { background:#f6f8fc; border:1px solid #d9e4fb; border-radius:12px; padding:12px; }
.hd-conv-progress-title { font-size:14px; font-weight:700; color:var(--hd-accent); margin-bottom:6px; }
.hd-conv-progress-sub { font-size:12px; color:#64748b; margin-bottom:10px; }
.hd-conv-progress-bar { height:4px; border-radius:999px; background:#dbe7ff; overflow:hidden; }
.hd-conv-progress-bar span { display:block; height:100%; border-radius:999px; background:var(--hd-accent); }
.hd-conv-tags { display:flex; flex-wrap:wrap; gap:8px; }
.hd-conv-tags span { padding:5px 9px; border-radius:999px; background:#f1f5f9; color:#64748b; font-size:12px; font-weight:600; }
.hd-side-action { width:100%; padding:10px 12px; border-radius:10px; border:1px solid #d6dbe5; background:#fff; color:#0f172a; font-size:13px; font-weight:700; }
.hd-side-action.danger { color:#ef4444; border-color:#fecaca; background:#fff; }
.hd-side-action:hover { background:#f8fafc; }
.cx-msg--system {
  display:flex !important;
  align-items:center !important;
  gap:7px !important;
  margin:6px 0 !important;
  padding:7px 12px !important;
  border-radius:10px !important;
  font-size:12px !important;
  font-weight:500 !important;
  max-width:none !important;
}
.cx-sat-recap {
  background:#fffbeb !important;
  border:1px solid #fde68a !important;
  color:#92400e !important;
}
.cx-sat-sent {
  background:#eff6ff !important;
  border:1px solid #bfdbfe !important;
  color:#1d4ed8 !important;
}
.cx-sat-time {
  margin-left:auto !important;
  font-size:11px !important;
  opacity:.65 !important;
  white-space:nowrap !important;
}
.hd-side-action-star { border-color:#fde68a !important; background:linear-gradient(135deg,#fffbeb,#fff) !important; color:#92400e !important; }
.hd-side-action-star:hover { background:linear-gradient(135deg,#fef3c7,#fffbeb) !important; border-color:#fcd34d !important; }
.hd-side-action-star:disabled { opacity:.6; cursor:not-allowed; }

@media (max-width: 1180px) {
  .hd-conv-detail-shell { grid-template-columns:minmax(0,1fr) !important; }
  .hd-conv-info-panel { display:none; }
}
@media (max-width: 860px) {
  #hd-page-conversations .hd-conv-wrap { flex-direction:column !important; }
  #hd-conv-mid { width:auto !important; min-width:0 !important; max-width:none !important; }
  .hd-conv-toolbar-tabs { gap:10px; }
}

/* === v6 fixes: conversation composer clearance + safer hover states === */
:root{--hd-modebar-clearance:42px}
html,body{overflow-x:hidden!important}
#hd-root{overflow-x:hidden!important}
.hd-wrap{overflow-x:hidden!important}
.hd-sidebar{max-width:240px!important}
#hd-root.sidebar-collapsed .hd-sidebar{max-width:62px!important}

.hd-stat:hover,.hd-card:hover,.hd-quick-action:hover,.hd-recent-item:hover,.hd-plan-card:hover,.hd-cal-card:hover,.hd-week-event:hover,.hd-conv-item:hover,.hd-folder-btn:hover,.hd-side-action:hover{
  box-shadow:none!important;
  transform:none!important;
}

.hd-modebar{overflow:hidden!important}
.hd-mode-btn.active,
.hd-mode-btn.active:hover,
.hd-mode-btn.active:focus,
.hd-mode-btn.active:active,
.hd-mode-btn.active span,
.hd-mode-btn.active:hover span,
.hd-mode-btn.active svg,
.hd-mode-btn.active:hover svg{
  color:#fff!important;
  stroke:currentColor!important;
}

#hd-page-conversations .hd-conv-wrap,
#hd-page-conversations .hd-conv-panel,
#hd-page-conversations .hd-conv-detail-shell,
#hd-page-conversations .hd-conv-thread{
  min-height:0!important;
}
#hd-page-conversations .hd-conv-panel{
  padding-bottom:18px!important;
}
#hd-page-conversations .hd-conv-thread{
  display:flex!important;
  flex-direction:column!important;
}
#hd-page-conversations .hd-conv-msgs{
  flex:1 1 auto!important;
  min-height:0!important;
  padding-bottom:10px!important;
}
#hd-page-conversations .hd-conv-thread{
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
}
#hd-page-conversations .hd-reply-area-v2 textarea{
  min-height:52px!important;
  height:52px!important;
  line-height:1.45!important;
  overflow-y:auto!important;
}

#hd-page-conversations .hd-reply-area-v2{
  position:relative!important;
  bottom:auto!important;
  z-index:6!important;
  margin:0!important;
  box-shadow:0 -1px 0 var(--hd-border)!important;
  padding:12px 14px!important;
}
#hd-page-conversations .hd-reply-area-v2 textarea{
  min-height:42px!important;
  height:42px!important;
  line-height:1.4!important;
  overflow-y:auto!important;
}
#hd-page-conversations .hd-conv-info-panel{
  padding-bottom:28px!important;
}

@media (max-width: 1180px){
  #hd-page-conversations .hd-conv-panel{
    padding-bottom:14px!important;
  }
}
@media (max-width: 860px){
  :root{--hd-modebar-clearance:56px}
  #hd-page-conversations .hd-conv-panel{padding-bottom:10px!important}
}

/* ── Page slide transitions ── */
.hd-page {
  transform: translateX(0);
  transition: opacity .3s cubic-bezier(.4,0,.2,1), transform .3s cubic-bezier(.4,0,.2,1);
}
.hd-page.hd-exit-left,
.hd-page.hd-exit-right {
  display: block !important; /* Override display:none during exit animation */
  pointer-events: none; z-index: 0;
}
.hd-page.hd-exit-left {
  opacity: 0; transform: translateX(-30px);
}
.hd-page.hd-exit-right {
  opacity: 0; transform: translateX(30px);
}
.hd-page.hd-enter {
  display: block !important;
  opacity: 1; transform: translateX(0); z-index: 2;
}

/* ── Widget Selector ── */
.hd-widget-sel {
  margin: 8px 12px 4px; padding: 8px 10px;
  background: var(--hd-bg3); border: 1.5px solid var(--hd-border); border-radius: 8px;
  display: flex; align-items: center; gap: 8px; cursor: pointer; transition: .15s;
}
.hd-widget-sel:hover { border-color: var(--hd-accent); }
.hd-wsel-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.hd-wsel-name { font-size: 12px; font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd-wsel-arrow { color: var(--hd-text3); font-size: 10px; flex-shrink: 0; }
.hd-sidebar.collapsed .hd-widget-sel { margin: 4px 8px; padding: 6px; justify-content: center; }
.hd-sidebar.collapsed .hd-wsel-name, .hd-sidebar.collapsed .hd-wsel-arrow { display: none; }
.hd-sidebar.collapsed .hd-wsel-dot { width: 28px; height: 28px; border-radius: 7px; }

/* Widget card in selector modal */
.hd-wsel-card {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1.5px solid var(--hd-border); border-radius: 10px; cursor: pointer;
  margin-bottom: 6px; transition: .15s;
}
.hd-wsel-card:hover { border-color: var(--hd-accent); background: var(--hd-bg3); }
.hd-wsel-card.selected { border-color: var(--hd-accent); background: #eff6ff; box-shadow: 0 0 0 3px rgba(12,85,244,.08); }
.hd-wsel-card-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.hd-wsel-card-name { font-size: 13px; font-weight: 600; flex: 1; }
.hd-wsel-card-domain { font-size: 10px; color: var(--hd-text3); font-family: 'JetBrains Mono', monospace; }

/* Client cards */
.hd-client-card {
  background: var(--hd-bg2); border: 1px solid var(--hd-border); border-radius: var(--hd-r);
  padding: 16px; display: flex; align-items: center; gap: 14px; transition: .15s;
}
.hd-client-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.hd-client-av { width: 36px; height: 36px; border-radius: 9px; background: #dbeafe; color: #1d4ed8; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.hd-client-name { font-size: 13px; font-weight: 600; }
.hd-client-email { font-size: 11px; color: var(--hd-text3); font-family: 'JetBrains Mono', monospace; }
.hd-client-widgets { display: flex; gap: 4px; flex-wrap: wrap; }
.hd-client-badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 5px; font-size: 9.5px; font-weight: 700; background: #eff6ff; color: #0C55F4; }
.hd-client-badge.inactive { background: var(--hd-bg3); color: var(--hd-text3); }

/* Permission toggle row */
.hd-perm-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; font-size: 12px; color: var(--hd-text2);
}

/* ═══════════════════════════════════════════════════════════
   HETO v5 — additions propres sur base originale
   Règle unique : ne PAS surcharger ce qui marche déjà
═══════════════════════════════════════════════════════════ */

/* Variables v5 */
:root {
  --hd-blue:#0C55F4; --hd-blue-l:#4d7ef7;
  --hd-blue-bg:#eff6ff; --hd-blue-50:#dbeafe;
  --hd-violet:#7c3aed; --hd-violet-bg:#f5f3ff;
  --hd-green-bg:#f0fdf4; --hd-amber-bg:#fffbeb; --hd-red-bg:#fef2f2;
  --hd-r:14px; --hd-rs:8px; --hd-sw:240px; --hd-th:52px;
  --hd-accent:#0C55F4; --hd-accent2:#0C55F4;
}

/* ── Layout root ── */
#hd-root {
  display:flex;flex-direction:row;
  height:calc(100vh - 32px);overflow:hidden;
}
.hd-main {
  flex:1;min-width:0;height:100%;
  overflow:hidden !important;   /* pages use position:absolute inside */
  position:relative !important;
  display:flex;flex-direction:column;
  background:var(--hd-bg,#f7f9ff);
  padding:0 !important;
}

/* ── Pages: toutes cachées par défaut ── */
.hd-page {
  display:none !important;
  position:absolute !important;
  top:0;left:0;right:0;bottom:0;
  flex-direction:column;
  overflow-y:auto;overflow-x:hidden;
}
.hd-page.active {
  display:flex !important;
  position:absolute !important;
  top:0;left:0;right:0;bottom:0;
}

/* Pages qui scrollent */
.hd-page.active:not(#hd-page-conversations):not(#hd-page-editor):not(#hd-page-form-builder) {
  overflow-y:auto;overflow-x:hidden;
}

/* Conversations : pas de scroll propre, conv-wrap gère */
#hd-page-conversations.active {
  overflow:hidden !important;
}
#hd-page-conversations .hd-conv-wrap {
  flex:1 !important;min-height:0 !important;overflow:hidden !important;display:flex !important;
}

/* Editor et FormBuilder : fixed, gérés par JS — display controlled by JS inline */
#hd-page-editor,#hd-page-form-builder {
  position:fixed !important;
  z-index:9995 !important;
}

/* Padding bas pour la modebar sur les pages scrollantes */
.hd-page-inner { padding-bottom:72px; }

/* ── Topbar ── */
.hd-topbar {
  height:var(--hd-th,52px);padding:0 24px;
  display:flex;align-items:center;gap:14px;
  background:#fff;border-bottom:1px solid var(--hd-border,#e2e8f0);
  flex-shrink:0;position:sticky;top:0;z-index:10;
}
.hd-topbar-title{font-size:15px;font-weight:700;color:var(--hd-text,#0f172a)}
.hd-topbar-sub{font-size:11px;color:var(--hd-text3,#94a3b8);margin-top:1px}
.hd-topbar-right{flex:1;display:flex;align-items:center;justify-content:flex-end;gap:8px}
.hd-topbar-btn[data-pages]{display:none !important}

/* ── Mode bar ── */
#hd-modebar,.hd-modebar {
  position:fixed;bottom:14px;
  left:50%;transform:translateX(-50%);
  z-index:9992;
  background:rgba(255,255,255,.95);backdrop-filter:blur(16px);
  border:1px solid var(--hd-border,#e2e8f0);border-radius:14px;
  box-shadow:0 4px 24px rgba(0,0,0,.1);
  display:flex;align-items:center;gap:2px;padding:4px;
  transition:transform .3s cubic-bezier(.4,0,.2,1), opacity .2s;
}
/* Keep modebar visible when editor is open */
body.hd-editor-active #hd-modebar { opacity:1; pointer-events:auto; display:flex; }
#hd-mode-pill,.hd-mode-pill {
  position:absolute;top:4px;left:4px;height:calc(100% - 8px);
  background:var(--hd-accent,#0C55F4);border-radius:10px;
  box-shadow:0 2px 10px rgba(26,86,219,.3);
  transition:all .3s cubic-bezier(.4,0,.2,1);z-index:0;pointer-events:none;
}
.hd-mode-btn {
  display:flex;align-items:center;gap:6px;padding:8px 11px;border-radius:10px;
  font-size:11px;font-weight:600;color:var(--hd-text3,#94a3b8);
  cursor:pointer;white-space:nowrap;position:relative;z-index:1;
  border:none;background:transparent;font-family:inherit;transition:color .2s;
}
.hd-mode-btn:hover{color:var(--hd-text,#0f172a)}
.hd-mode-btn.active{color:#fff}
.hd-mode-btn svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#hd-mode-sep,.hd-mode-sep{width:1px;height:22px;background:var(--hd-border,#e2e8f0);margin:0 2px;z-index:1;transition:opacity .2s}
#hd-mode-sep.hide,.hd-mode-sep.hide{opacity:0}

/* ── Sidebar mode groups — DÉSACTIVÉS (sidebar statique) ── */
.hd-mode-group{overflow:visible !important;max-height:none !important;opacity:1 !important;transition:none !important;display:none !important}
.hd-mode-group.active{max-height:none !important;opacity:1 !important;display:none !important}

/* Admin mode: hide dashboard entry from sidebar — DÉSACTIVÉ (sidebar statique) */

/* Dashboard readability + compact table typography */
.hd-stats-v4 .hd-stat{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  gap:0 !important;
}
.hd-stats-v4 .hd-stat-val{order:1}
.hd-stats-v4 .hd-stat-lbl{order:2;margin-top:4px}
.hd-stats-v4 .hd-stat-top{order:3;margin-top:8px;margin-bottom:0;width:100%}
.hd-stats-v4 .hd-stat-trend{font-size:10px !important}
.hd-panel-body table th{font-size:11px !important}
.hd-panel-body table td{font-size:12px !important;line-height:1.35 !important}

/* ── Badges ── */
.badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:99px;font-size:10px;font-weight:700}
.badge-green{background:var(--hd-green-bg);color:var(--hd-green,#16a34a)}
.badge-blue{background:var(--hd-blue-bg);color:var(--hd-blue)}
.badge-gray{background:var(--hd-bg2,#f1f5f9);color:var(--hd-text3,#94a3b8)}
.badge-red{background:var(--hd-red-bg);color:var(--hd-red,#ef4444)}
.badge-amber{background:var(--hd-amber-bg);color:var(--hd-amber,#f59e0b)}
.badge-violet{background:var(--hd-violet-bg);color:var(--hd-violet)}

/* ── Widget/site card (1 site = 1 chatbot) ── */
.hd-site-widget-card{background:#fff;border:1px solid var(--hd-border,#e2e8f0);border-radius:var(--hd-r);overflow:hidden;max-width:640px;margin:0 auto}
.hd-swc-header{padding:20px 24px;display:flex;align-items:center;justify-content:space-between;gap:14px}
.hd-swc-section{padding:14px 24px;border-bottom:1px solid var(--hd-border,#e2e8f0)}
.hd-swc-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--hd-text3,#94a3b8);margin-bottom:6px}
.hd-swc-value{font-size:13px;color:var(--hd-text,#0f172a)}
.hd-swc-embed{background:var(--hd-bg,#f8fafc);border:1px solid var(--hd-border,#e2e8f0);border-radius:var(--hd-rs);padding:10px 14px;font-size:11px;font-family:var(--hd-mono,'JetBrains Mono',monospace);cursor:pointer;position:relative;word-break:break-all;line-height:1.6;transition:border-color .15s}
.hd-swc-embed:hover{border-color:var(--hd-accent)}
.hd-swc-copy{position:absolute;right:10px;top:50%;transform:translateY(-50%);font-size:10px;font-weight:700;color:var(--hd-accent);background:#fff;padding:2px 8px;border-radius:4px;border:1px solid var(--hd-blue-50,#dbeafe);font-family:inherit}
.hd-swc-actions{padding:14px 24px;display:flex;gap:8px}
.hd-swc-empty{padding:48px 24px;text-align:center;cursor:pointer;background:#fff;border:2px dashed var(--hd-border,#e2e8f0);border-radius:var(--hd-r);max-width:480px;margin:0 auto;transition:border-color .15s,background .15s}
.hd-swc-empty:hover{border-color:var(--hd-accent);background:var(--hd-blue-bg)}

/* ── Export page ── */
.wb-page-card{background:var(--hd-bg2,#f1f5f9);border:1px solid var(--hd-border,#e2e8f0);border-radius:10px;overflow:hidden;margin-bottom:14px}
.wb-card-head{padding:10px 16px;border-bottom:1px solid var(--hd-border,#e2e8f0);display:flex;align-items:center;gap:8px;font-size:12px;font-weight:600;color:var(--hd-text,#0f172a);background:var(--hd-bg3,#e9eef5)}
.wb-card-head svg{width:13px !important;height:13px !important;stroke:var(--hd-accent);fill:none;stroke-width:2;stroke-linecap:round;flex-shrink:0}
.wb-page-row{display:flex;align-items:center;padding:9px 16px;border-bottom:1px solid var(--hd-border,#e2e8f0);gap:12px;min-height:44px}
.wb-page-row:last-child{border-bottom:none}
.hd-export-fmt-btn{padding:5px 12px;border:1.5px solid var(--hd-border,#e2e8f0);border-radius:7px;background:var(--hd-bg,#f8fafc);font-size:11px;font-weight:600;color:var(--hd-text2,#475569);cursor:pointer;font-family:inherit;transition:all .15s}
.hd-export-fmt-btn:hover{border-color:var(--hd-accent);color:var(--hd-accent)}

/* ── Billing ── */
.hd-plan-summary{background:#fff;border:1px solid var(--hd-border,#e2e8f0);border-radius:var(--hd-r);overflow:hidden;margin-bottom:18px}
.hd-plan-summary-top{padding:16px 20px;border-bottom:1px solid var(--hd-border,#e2e8f0);display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}

/* ── Clients ── */
.hd-perm-row{display:flex;align-items:center;justify-content:space-between;padding:7px 0;font-size:12px;color:var(--hd-text2,#475569);border-bottom:1px solid var(--hd-bg2,#f1f5f9)}
.hd-perm-row:last-child{border-bottom:none}

/* ── No animation on page switch ── */
.hd-page,.hd-page.active{transition:none !important;animation:none !important}

/* ═══════════════════════════════════════════════════════
   PATCH: Style cohérence + modebar + dashboard fixes
═══════════════════════════════════════════════════════ */

/* Modebar: TOUJOURS visible, centré sur le viewport */
.hd-modebar{
  position:fixed !important;
  bottom:14px !important;
  left:50% !important;
  right:auto !important;
  transform:translateX(-50%) !important;
  z-index:99999 !important;
  display:flex !important;
  opacity:1 !important;
  pointer-events:auto !important;
}
body.hd-editor-active #hd-modebar{
  display:flex !important;
  opacity:1 !important;
  pointer-events:auto !important;
}
#hd-root.sidebar-collapsed .hd-modebar{
  transform:translateX(-50%) !important;
}

/* Page inner: max-width cohérent */
.hd-page-inner{
  max-width:none !important;
  margin:0 !important;
  padding:24px 30px 100px !important;
  width:100% !important;
}

/* Stats v4: trend SOUS le nombre */
.hd-stats-v4 .hd-stat{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  gap:0 !important;
  padding:16px 18px !important;
}
.hd-stats-v4 .hd-stat-val{font-size:24px !important;font-weight:800 !important;order:1}
.hd-stats-v4 .hd-stat-lbl{font-size:11px !important;order:2;margin-top:4px}
.hd-stats-v4 .hd-stat-top{order:3;margin-top:8px;margin-bottom:0;width:100%}
.hd-stats-v4 .hd-stat-trend{font-size:10px !important}

/* Dashboard panels: compact table typography */
.hd-panel-body table th{font-size:11px !important;font-weight:600;color:var(--hd-text3);padding:8px 12px !important}
.hd-panel-body table td{font-size:12px !important;line-height:1.35 !important;padding:8px 12px !important}
.hd-panel-body table{width:100%;border-collapse:collapse}
.hd-panel-body table tr{border-bottom:1px solid var(--hd-bg3)}
.hd-panel-body table tr:last-child{border-bottom:none}

/* Dashboard: badge readability */
.hd-badge-status{font-size:10px !important;padding:2px 7px !important}

/* Overview layout: proper two-column with tighter gap */
.hd-overview-grid-21{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:14px;margin-bottom:16px}
@media (max-width: 1100px){.hd-overview-grid-21{grid-template-columns:1fr}}

/* Sidebar nav items: old clean style */
.hd-nav-item{
  padding:9px 11px !important;
  border-radius:10px !important;
  font-size:13px !important;
  font-weight:500 !important;
}
.hd-nav-item svg{width:15px !important;height:15px !important}
.hd-nav-item.active{background:#EEF4FF !important;color:var(--hd-accent) !important;font-weight:600 !important}
.hd-nav-item:hover{background:#EEF4FF !important;color:var(--hd-accent) !important}
.hd-nav-item.active::before{
  content:'';position:absolute;left:0;top:25%;bottom:25%;
  width:3px;border-radius:2px;background:var(--hd-accent)
}

/* Fix bg in main layout */
.hd-main{background:#f7f9ff !important}

/* Sidebar plan badge */
.hd-sidebar-plan{
  margin:auto 14px 0;
  padding:14px;
  background:var(--hd-bg3);
  border-radius:12px;
  border:1px solid var(--hd-border);
  margin-bottom:8px;
}
.hd-sp-lbl{font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--hd-text3)}
.hd-sp-name{font-size:14px;font-weight:700;color:var(--hd-text);margin-top:2px}
.hd-sp-info{font-size:10px;color:var(--hd-text3)}
.hd-sp-btn{
  display:flex;align-items:center;justify-content:center;gap:5px;
  width:100%;margin-top:8px;padding:7px;border-radius:8px;
  background:var(--hd-accent);border:none;color:#fff;
  font-size:11px;font-weight:600;cursor:pointer;font-family:inherit;
}
.hd-sp-btn:hover{background:#0637AF}

/* Widget selector in sidebar */
.hd-widget-sel{
  margin:8px 12px 4px;padding:8px 10px;
  background:var(--hd-bg3);border:1.5px solid var(--hd-border);border-radius:8px;
  display:flex;align-items:center;gap:8px;cursor:pointer;transition:.15s;
}

/* Quick actions from old plugin */
.hd-quick-action{
  display:flex;align-items:center;gap:10px;padding:10px 12px;
  border-radius:10px;cursor:pointer;transition:.12s;text-decoration:none !important;
}
.hd-quick-action:hover{background:var(--hd-bg3)}
.hd-qa-ico{
  width:34px;height:34px;border-radius:9px;
  background:#EEF4FF;display:flex;align-items:center;justify-content:center;flex-shrink:0;
}
.hd-qa-ico svg{width:14px;height:14px;stroke:var(--hd-accent)}
.hd-qa-l{font-size:12px;font-weight:600;color:var(--hd-text)}
.hd-qa-d{font-size:10px;color:var(--hd-text3);margin-top:1px}

/* Plan hero card: from old plugin */
.hd-plan-hero-card{
  background:linear-gradient(135deg,#0C55F4,#0637AF);color:#fff;
  border-radius:14px;padding:20px;position:relative;overflow:hidden;
}

/* Site widget cards */
.hd-site-widget-card{border:1px solid var(--hd-border);border-radius:12px;overflow:hidden;background:#fff;margin-bottom:12px}
.hd-swc-header{padding:14px 16px;display:flex;align-items:center;justify-content:space-between}
.hd-swc-body{padding:14px 16px}
.hd-swc-section{margin-bottom:10px}
.hd-swc-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--hd-text3);margin-bottom:4px}
.hd-swc-value{font-size:13px;color:var(--hd-text)}
.hd-swc-embed{
  font-size:11px;font-family:var(--hd-mono);color:var(--hd-text2);
  background:var(--hd-bg3);border-radius:8px;padding:8px 12px;cursor:pointer;
  word-break:break-all;position:relative;transition:.15s;
}
.hd-swc-embed:hover{background:var(--hd-bg4)}
.hd-swc-copy{position:absolute;right:8px;top:50%;transform:translateY(-50%);font-size:10px;font-weight:700;color:var(--hd-accent)}
.hd-swc-actions{display:flex;gap:8px;margin-top:12px}
.hd-swc-empty{
  text-align:center;padding:40px 20px;cursor:pointer;
  border:2px dashed var(--hd-border);border-radius:12px;
  transition:.15s;
}
.hd-swc-empty:hover{border-color:var(--hd-accent);background:var(--hd-blue-bg)}

/* Fix hd-btn-upgrade consistent */
.hd-btn-upgrade{
  background:linear-gradient(135deg,#f59e0b,#ef4444) !important;
  border-color:transparent !important;color:#fff !important;
}
.hd-btn-upgrade:hover{opacity:.9}

/* Badge styles */
.badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:20px;font-size:10px;font-weight:700}
.badge-green{background:rgba(34,211,160,.12);color:var(--hd-green)}
.badge-gray{background:var(--hd-bg3);color:var(--hd-text3)}

/* Sidebar collapsed: site selector */
.hd-sidebar.collapsed .hd-widget-sel{margin:4px 8px;padding:6px;justify-content:center}
.hd-sidebar.collapsed .hd-wsel-name,.hd-sidebar.collapsed .hd-wsel-arrow{display:none}
.hd-sidebar.collapsed .hd-wsel-dot{width:28px;height:28px;border-radius:7px}

/* Sidebar info boxes */
.hd-sidebar-info{
  display:flex;align-items:flex-start;gap:8px;
  margin:6px 0 4px;padding:9px 10px;
  background:var(--hd-bg3);border:1px solid var(--hd-border);border-radius:8px;
}
.hd-sidebar-info-ico{
  width:24px;height:24px;border-radius:6px;background:var(--hd-accent);
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
}
.hd-sidebar-info-ico svg{stroke:#fff !important;fill:none !important}
.hd-sidebar-info-text{
  font-size:10px;color:var(--hd-text3);line-height:1.4;
}
.hd-sidebar.collapsed .hd-sidebar-info{display:none}

/* Limits bar from old plugin */
.hd-limits-bar{
  display:flex;flex-wrap:wrap;gap:8px;padding:10px 0;
}

/* Mode-based nav hiding — DÉSACTIVÉ (sidebar statique) */

/* Editor should not block modebar */
#hd-page-editor{z-index:9991 !important}
#hd-page-form-builder{z-index:9991 !important}

/* All sites page cards */
.w-card{
  background:#fff;border:1px solid var(--hd-border);border-radius:12px;
  padding:16px;cursor:pointer;transition:.15s;
}
.w-card:hover{border-color:var(--hd-accent);background:var(--hd-blue-bg)}

/* Knowledge page scrollable */
#hd-page-knowledge{overflow-y:auto}

/* Table styles for knowledge etc */
.tbl{width:100%;border-collapse:collapse;font-size:12px}
.tbl th{text-align:left;font-size:11px;font-weight:700;color:var(--hd-text3);padding:10px 14px;border-bottom:1px solid var(--hd-border);background:var(--hd-bg)}
.tbl td{padding:10px 14px;border-bottom:1px solid var(--hd-bg3);font-size:12px;color:var(--hd-text2)}
.tbl tr:last-child td{border-bottom:none}
.tbl tr:hover td{background:var(--hd-bg)}
.fi label{display:block;font-size:11.5px;font-weight:600;color:var(--hd-text2);margin-bottom:5px}
.fi input,.fi textarea,.fi select{width:100%;background:var(--hd-bg3);border:1px solid var(--hd-border2);border-radius:8px;color:var(--hd-text);padding:8px 11px;font-size:13px;font-family:inherit;outline:none;box-sizing:border-box}
.fi{margin-bottom:10px}

/* Usage grid in billing */
.hd-usage-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.hd-usage-item{background:var(--hd-bg);border:1px solid var(--hd-border);border-radius:14px;padding:16px}
.hd-usage-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--hd-text3)}
.hd-usage-val{font-size:20px;font-weight:800;color:var(--hd-text);margin-top:4px}
.hd-usage-bar{height:6px;background:var(--hd-bg3);border-radius:3px;overflow:hidden;margin-top:10px}
.hd-usage-fill{height:100%;border-radius:3px;background:var(--hd-accent);transition:width .3s}
.hd-usage-hint{font-size:10px;color:var(--hd-text3);margin-top:4px}
.hd-badge-unlimited{background:#f0fdf4;color:var(--hd-green);padding:1px 6px;border-radius:20px;font-size:10px;font-weight:700}

/* Trial banner */
.hd-trial-banner{
  display:flex;align-items:center;gap:12px;
  background:linear-gradient(135deg,#fef3c7,#fefce8);border:1px solid #fbbf24;
  border-radius:12px;padding:12px 18px;margin-bottom:16px;
}
.hd-trial-banner svg{stroke:#f59e0b;fill:none;stroke-width:2;flex-shrink:0}
.hd-trial-banner-text{flex:1;font-size:13px;color:#92400e;line-height:1.5}

/* Gift block */
.hd-gift-block{background:#fff;border:1px solid var(--hd-border);border-radius:14px;padding:18px;margin-bottom:18px}
.hd-gift-inner{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.hd-gift-icon{width:36px;height:36px;border-radius:9px;background:var(--hd-blue-bg);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.hd-gift-icon svg{stroke:var(--hd-accent)}
.hd-gift-title{font-size:13px;font-weight:700;color:var(--hd-text)}
.hd-gift-sub{font-size:11px;color:var(--hd-text3)}
.hd-gift-form{display:flex;gap:8px}
.hd-gift-input{flex:1;background:var(--hd-bg3);border:1px solid var(--hd-border);border-radius:8px;padding:8px 12px;font-size:12px;font-family:var(--hd-mono);color:var(--hd-text);outline:none}
.hd-gift-btn{padding:8px 16px;border-radius:8px;border:none;font-size:12px;font-weight:600;cursor:pointer;font-family:inherit}


/* === v7 admin conversation fixes === */
#hd-page-conversations .hd-conv-panel{
  padding-bottom:calc(var(--hd-modebar-clearance) + 18px)!important;
}
#hd-page-conversations .hd-conv-detail-shell{
  min-height:calc(100vh - 170px)!important;
  grid-template-columns:minmax(0,1fr) 332px!important;
}
#hd-page-conversations .hd-conv-thread{
  position:relative!important;
}
#hd-page-conversations .hd-conv-msgs{
  padding-bottom:14px!important;
}
#hd-page-conversations .hd-reply-area-v2{
  position:sticky!important;
  bottom:calc(var(--hd-modebar-clearance) + 4px)!important;
  margin:0 10px 8px!important;
  border:1px solid var(--hd-border)!important;
  border-radius:16px!important;
  box-shadow:0 8px 22px rgba(15,23,42,.05)!important;
}
#hd-page-conversations .hd-reply-area-v2 textarea{
  min-height:48px!important;
  height:48px!important;
}
#hd-page-conversations .hd-conv-info-panel{
  width:332px!important;
  min-width:332px!important;
  max-width:332px!important;
  height:100%!important;
  max-height:calc(100vh - 44px)!important;
  box-sizing:border-box!important;
  padding:20px 28px 40px 22px!important;
  overflow:auto!important;
  overflow-x:hidden!important;
}
.hd-conv-info-actions{display:flex;flex-direction:column;gap:10px;}
.hd-side-action.agent-active{background:#eef6ff!important;border-color:#bfd4ff!important;color:var(--hd-accent)!important;}
.hd-side-note{font-size:12px;color:#94a3b8;line-height:1.45;padding:4px 2px 0;}
@media (max-width: 1180px){
  #hd-page-conversations .hd-reply-area-v2{bottom:10px!important;}
  #hd-page-conversations .hd-conv-detail-shell{grid-template-columns:minmax(0,1fr)!important;}
}

#hd-page-conversations .hd-conv-profile-card,
#hd-page-conversations .hd-conv-info-section,
#hd-page-conversations .hd-conv-info-list,
#hd-page-conversations .hd-conv-tags,
#hd-page-conversations .hd-conv-info-actions{
  max-width:100%!important;
}
#hd-page-conversations .hd-conv-profile-mail,
#hd-page-conversations .hd-conv-info-list span,
#hd-page-conversations .hd-conv-tags span,
#hd-page-conversations .hd-side-note{
  word-break:break-word!important;
}



/* === v9 layout + conversation fixes === */
#hd-page-conversations .hd-conv-panel{
  padding-bottom:calc(var(--hd-modebar-clearance) + 8px)!important;
}
#hd-page-conversations .hd-conv-detail-shell{
  height:calc(100vh - 132px)!important;
  min-height:calc(100vh - 132px)!important;
  align-items:stretch!important;
  grid-template-columns:minmax(0,1fr) 306px!important;
}
#hd-page-conversations .hd-conv-thread,
#hd-page-conversations .hd-conv-info-panel{
  height:100%!important;
  min-height:0!important;
  align-self:stretch!important;
}
#hd-page-conversations .hd-reply-area-v2{
  bottom:4px!important;
  margin:0 10px 4px!important;
}
#hd-page-conversations .hd-conv-info-panel{
  width:306px!important;
  min-width:306px!important;
  max-width:306px!important;
  padding:20px 18px 22px 18px!important;
}
#hd-page-conversations .hd-conv-info-actions{padding-bottom:12px!important;}
@media (max-width: 1180px){
  #hd-page-conversations .hd-conv-detail-shell{grid-template-columns:minmax(0,1fr)!important;height:auto!important;min-height:calc(100vh - 132px)!important;}
  #hd-page-conversations .hd-reply-area-v2{bottom:8px!important;}
}


/* === v10 conversation layout fixes === */
#hd-page-conversations .hd-conv-wrap{
  height:100%!important;
  min-height:0!important;
}
#hd-page-conversations .hd-conv-panel{
  padding:0 0 calc(var(--hd-modebar-clearance) + 18px) 0!important;
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
  background:#f3f4f6!important;
}
#hd-page-conversations .hd-conv-detail-shell{
  height:calc(100dvh - 124px)!important;
  min-height:calc(100dvh - 124px)!important;
  grid-template-columns:minmax(0,1fr) 318px!important;
  gap:0!important;
  align-items:stretch!important;
  background:transparent!important;
}
#hd-page-conversations .hd-conv-thread{
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
  border-right:1px solid var(--hd-border)!important;
  padding-bottom:14px!important;
}
#hd-page-conversations .hd-conv-msgs{
  flex:1 1 auto!important;
  min-height:0!important;
}
#hd-page-conversations .hd-reply-area-v2{
  position:sticky!important;
  bottom:0!important;
  margin:0 12px 0!important;
  z-index:3!important;
}
#hd-page-conversations .hd-conv-info-panel{
  display:flex!important;
  flex-direction:column!important;
  align-self:stretch!important;
  height:calc(100dvh - 124px)!important;
  min-height:calc(100dvh - 124px)!important;
  width:318px!important;
  min-width:318px!important;
  max-width:318px!important;
  padding:20px 18px calc(var(--hd-modebar-clearance) + 18px) 18px!important;
  background:#fff!important;
  overflow:auto!important;
  overflow-x:hidden!important;
  box-sizing:border-box!important;
}
#hd-page-conversations .hd-conv-info-panel > *{
  flex-shrink:0!important;
}
#hd-page-conversations .hd-conv-info-actions{
  margin-top:auto!important;
  padding-bottom:0!important;
}
@media (max-width:1180px){
  #hd-page-conversations .hd-conv-detail-shell{grid-template-columns:minmax(0,1fr)!important;}
  #hd-page-conversations .hd-conv-info-panel{display:none!important;}
  #hd-page-conversations .hd-reply-area-v2{bottom:8px!important;}
}


/* === v11 final layout/widget/email fixes === */
#hd-page-conversations .hd-conv-msgs{padding-bottom:16px!important;}
#hd-page-conversations .hd-conv-info-panel::after{content:'';display:block;min-height:12px;flex:0 0 12px;}


/* === v12 right sidebar bottom + cleaner panel floor === */
#hd-page-conversations .hd-conv-panel{
  background:#ffffff!important;
  padding:0!important;
}
#hd-page-conversations .hd-conv-detail-shell{
  height:calc(100dvh - 124px)!important;
  min-height:calc(100dvh - 124px)!important;
  background:#ffffff!important;
}
#hd-page-conversations .hd-conv-thread{
  background:transparent!important;
  padding-bottom:0!important;
}
#hd-page-conversations .hd-conv-msgs{
  background:#f3f4f6!important;
}
#hd-page-conversations .hd-reply-area-v2{
  margin:0 12px 12px!important;
  bottom:0!important;
}
#hd-page-conversations .hd-conv-info-panel{
  align-self:stretch!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  padding:20px 18px 18px 18px!important;
  background:#fff!important;
}
#hd-page-conversations .hd-conv-info-panel::after{
  content:none!important;
  display:none!important;
}
@media (max-width:1180px){
  #hd-page-conversations .hd-reply-area-v2{margin:0 12px 10px!important;}
}

/* === v13 conversations: restore bottom composer + full-height right panel === */
#hd-page-conversations .hd-conv-panel{
  display:flex!important;
  flex-direction:column!important;
  padding:0 0 calc(var(--hd-modebar-clearance) + 12px)!important;
  background:#fff!important;
  min-height:0!important;
}
#hd-page-conversations .hd-conv-detail-shell{
  flex:1 1 auto!important;
  min-height:0!important;
  height:calc(100vh - 132px)!important;
  background:#fff!important;
  align-items:stretch!important;
  grid-template-columns:minmax(0,1fr) 306px!important;
}
#hd-page-conversations .hd-conv-thread{
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
  height:100%!important;
  background:#f3f4f6!important;
  border-right:1px solid var(--hd-border)!important;
}
#hd-page-conversations .hd-conv-msgs{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
  background:#f3f4f6!important;
  padding-bottom:18px!important;
}
#hd-page-conversations .hd-reply-area-v2{
  position:relative!important;
  bottom:auto!important;
  margin:0!important;
  flex-shrink:0!important;
  border:0!important;
  border-top:1px solid var(--hd-border)!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:#fff!important;
  padding:12px 14px!important;
}
#hd-page-conversations .hd-conv-info-panel{
  display:flex!important;
  flex-direction:column!important;
  align-self:stretch!important;
  width:306px!important;
  min-width:306px!important;
  max-width:306px!important;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:20px 18px 20px!important;
  background:#fff!important;
  overflow:auto!important;
  overflow-x:hidden!important;
  box-sizing:border-box!important;
}
#hd-page-conversations .hd-conv-info-actions{
  margin-top:auto!important;
  padding-bottom:0!important;
}
#hd-page-conversations .hd-conv-panel::after,
#hd-page-conversations .hd-conv-detail-shell::after,
#hd-page-conversations .hd-conv-info-panel::after{
  content:none!important;
  display:none!important;
}
@media (max-width:1180px){
  #hd-page-conversations .hd-conv-detail-shell{grid-template-columns:minmax(0,1fr)!important;}
  #hd-page-conversations .hd-conv-info-panel{display:none!important;}
}


/* === v15 targeted fix: keep original header/field sizes, isolate bottom spacing to thread only === */
#hd-page-conversations .hd-conv-panel{
  padding:0!important;
  background:#fff!important;
}
#hd-page-conversations .hd-conv-detail-shell{
  height:calc(100vh - 132px)!important;
  min-height:0!important;
  align-items:stretch!important;
}
#hd-page-conversations .hd-conv-thread{
  min-height:0!important;
  height:100%!important;
  padding-bottom:0!important;
  box-sizing:border-box!important;
}
#hd-page-conversations .hd-conv-msgs{
  padding-bottom:14px!important;
}
#hd-page-conversations .hd-reply-area-v2{
  position:relative!important;
  bottom:auto!important;
  margin:0 0 calc(var(--hd-modebar-clearance) + 10px) 0!important;
  border-top:1px solid var(--hd-border)!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:#fff!important;
}
#hd-page-conversations .hd-conv-info-panel{
  align-self:stretch!important;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:20px 18px!important;
  background:#fff!important;
}
#hd-page-conversations .hd-conv-info-panel::after{
  content:none!important;
  display:none!important;
}

/* === v17 conversations composer polish: clip inside field, rounded banner, bottom margin only on center column === */
#hd-page-conversations .hd-conv-thread{
  padding-bottom:0!important;
}
#hd-page-conversations .hd-reply-area-v2{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  margin:0 12px calc(var(--hd-modebar-clearance) + 24px) 12px!important;
  padding:4px!important;
  background:#fff!important;
  border:1px solid var(--hd-border)!important;
  border-radius:18px!important;
  box-shadow:none!important;
}
#hd-page-conversations .hd-reply-area-v2 textarea{
  margin:0!important;
  min-height:46px!important;
  height:46px!important;
  max-height:120px!important;
  padding:12px 56px 12px 44px!important;
  border:1px solid var(--hd-border)!important;
  border-radius:14px!important;
  background:#f8fafc!important;
}
#hd-page-conversations .hd-reply-attach{
  position:absolute!important;
  left:26px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  width:18px!important;
  height:18px!important;
  padding:0!important;
  margin:0!important;
  border:none!important;
  border-radius:0!important;
  background:transparent!important;
  color:#111827!important;
  z-index:2!important;
}
#hd-page-conversations .hd-reply-attach svg{
  width:18px!important;
  height:18px!important;
  stroke:currentColor!important;
}
#hd-page-conversations .hd-send-btn{
  width:46px!important;
  height:46px!important;
  border-radius:14px!important;
  flex:0 0 46px!important;
  align-self:center!important;
}
#hd-page-conversations .hd-send-btn svg{
  stroke:#fff!important;
}
@media (max-width:1180px){
  #hd-page-conversations .hd-reply-area-v2{
    margin:0 10px calc(var(--hd-modebar-clearance) + 24px) 10px!important;
  }
}

/* === v25 conversations: remove paperclip + stretch visitor bubbles === */
#hd-page-conversations .hd-reply-attach{
  display:none!important;
}
#hd-page-conversations .hd-reply-area-v2{
  gap:10px!important;
}
#hd-page-conversations .hd-reply-area-v2 textarea{
  padding-left:16px!important;
}
#hd-page-conversations .hd-msg.user{
  width:100%!important;
  justify-content:flex-end!important;
}
#hd-page-conversations .hd-msg.user .hd-msg-stack{
  flex:0 1 min(66%,720px)!important;
  width:min(66%,720px)!important;
  max-width:calc(100% - 42px)!important;
  min-width:260px!important;
  align-items:stretch!important;
}
#hd-page-conversations .hd-msg.user .hd-bubble{
  display:block!important;
  width:100%!important;
  text-align:left!important;
  white-space:normal!important;
  word-break:break-word!important;
}

/* === v30 conversations: visitor bubbles wrap like AI bubbles === */
#hd-page-conversations .hd-msg.user{
  width:100%!important;
  max-width:100%!important;
  margin-left:auto!important;
  justify-content:flex-end!important;
}
#hd-page-conversations .hd-msg.user .hd-msg-stack{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-end!important;
  width:auto!important;
  min-width:0!important;
  max-width:min(66%,720px)!important;
  flex:0 1 auto!important;
}
#hd-page-conversations .hd-msg.user .hd-bubble{
  display:inline-block!important;
  width:fit-content!important;
  max-width:100%!important;
  min-width:0!important;
  text-align:left!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
}

.hd-pricing-grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.hd-plan-agency{background:rgba(124,58,237,.15);color:#7c3aed}
@media (max-width:1300px){.hd-pricing-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:780px){.hd-pricing-grid-4{grid-template-columns:1fr}}


/* ═══ Plan Gate: Locked Nav Items ═══════════════════════════════ */
.hd-nav-item.hd-locked{opacity:.4!important;pointer-events:auto;cursor:pointer;position:relative}
.hd-nav-item.hd-locked:hover{opacity:.55!important;background:rgba(148,163,184,.08)!important;color:var(--hd-text3)!important}
.hd-nav-item.hd-locked:hover svg:not(.hd-lock-icon svg){color:var(--hd-text3)!important}
.hd-nav-item.hd-locked .hd-lock-icon{display:inline-flex;align-items:center;margin-left:auto;flex-shrink:0}
.hd-nav-item.hd-locked .hd-lock-icon svg{width:12px;height:12px;fill:none;stroke:#94a3b8;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.hd-nav-item.hd-locked.active{background:transparent!important;color:var(--hd-text3)!important}
.hd-nav-item.hd-locked.active::before{display:none!important}
.hd-sidebar.collapsed .hd-nav-item.hd-locked .hd-lock-icon{position:absolute;top:2px;right:2px}
.hd-sidebar.collapsed .hd-nav-item.hd-locked .hd-lock-icon svg{width:9px;height:9px}

/* ═══ Plan Gate Modal ═══════════════════════════════════════════ */
.hpg-overlay{position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:999999;display:flex;align-items:center;justify-content:center;padding:16px;backdrop-filter:blur(4px);font-family:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
.hpg-box{background:#fff;border-radius:22px;width:100%;max-width:920px;padding:36px 32px 28px;text-align:center;position:relative;box-shadow:0 25px 70px rgba(0,0,0,.18);transform:translateY(12px) scale(.96);opacity:0;transition:transform .3s cubic-bezier(.16,1,.3,1),opacity .25s ease}
.hpg-box.visible{transform:translateY(0) scale(1);opacity:1}
.hpg-close{position:absolute;top:14px;right:14px;width:32px;height:32px;border:1px solid #e2e8f0;border-radius:8px;background:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#64748b;font-size:20px;line-height:1;transition:.15s}
.hpg-close:hover{border-color:#cbd5e1;color:#334155}
.hpg-icon{display:inline-flex;align-items:center;justify-content:center;width:64px;height:64px;border-radius:18px;background:linear-gradient(135deg,#eff6ff,#dbeafe);color:#2563eb;margin-bottom:16px}
.hpg-title{font-size:20px;font-weight:800;color:#0f172a;margin:0 0 8px;letter-spacing:-.02em}
.hpg-desc{font-size:14px;line-height:1.6;color:#64748b;margin:0 0 24px}
.hpg-plans{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;text-align:left;margin-bottom:20px}
.hpg-plan{border:1.5px solid #e2e8f0;border-radius:14px;padding:16px 14px;cursor:pointer;transition:.18s;display:flex;flex-direction:column;position:relative}
.hpg-plan:hover{border-color:#2563eb;background:#f8fafc;transform:translateY(-2px);box-shadow:0 8px 24px rgba(37,99,235,.1)}
.hpg-plan.hpg-rec{border-color:#2563eb;background:#eff6ff;position:relative}
.hpg-plan.hpg-rec:hover{background:#dbeafe}
.hpg-rec-badge{position:absolute;top:-1px;right:14px;background:#2563eb;color:#fff;font-size:10px;font-weight:800;padding:3px 10px;border-radius:0 0 7px 7px;letter-spacing:.03em}
.hpg-plan-name{font-size:16px;font-weight:700;color:#0f172a;margin-bottom:4px}
.hpg-plan-price{font-size:24px;font-weight:900;color:#2563eb;letter-spacing:-.03em;margin-bottom:10px}
.hpg-plan-price span{font-size:12px;font-weight:400;color:#94a3b8}
.hpg-plan-feats{display:flex;flex-direction:column;gap:5px;margin-bottom:16px;flex:1}
.hpg-plan-feats div{font-size:11.5px;color:#475569;display:flex;align-items:center;gap:5px}
.hpg-plan-btn{background:#2563eb;color:#fff;border-radius:10px;padding:10px;text-align:center;font-size:13px;font-weight:700;transition:.15s}
.hpg-plan:hover .hpg-plan-btn{background:#1d4ed8}
.hpg-later{border:1px solid #e2e8f0;background:#fff;color:#64748b;border-radius:10px;padding:10px 24px;font-size:13px;font-weight:600;cursor:pointer;transition:.15s;font-family:inherit}
.hpg-later:hover{border-color:#cbd5e1;color:#334155}



/* ═══ Locked page upgrade banner ═══════════════════════════════ */
.hd-page-plan-locked .hd-topbar{margin-bottom:0}
.hd-plan-gate-inline{margin:20px 24px 0;padding:18px 20px;border:1px solid #fbbf24;border-radius:16px;background:linear-gradient(135deg,#fff7ed,#fefce8);display:flex;align-items:center;gap:16px;min-height:unset!important;box-sizing:border-box}
.hd-plan-gate-inline__icon{width:46px;height:46px;border-radius:14px;background:rgba(251,191,36,.16);display:flex;align-items:center;justify-content:center;font-size:24px;flex-shrink:0}
.hd-plan-gate-inline__content{flex:1;min-width:0}
.hd-plan-gate-inline__title{font-size:15px;font-weight:800;color:#92400e;margin-bottom:4px}
.hd-plan-gate-inline__text{font-size:13px;line-height:1.5;color:#a16207}
.hd-plan-gate-inline__btn{white-space:nowrap;flex-shrink:0}
.hd-plan-locked-dim{position:relative;opacity:.28;filter:grayscale(.08);pointer-events:none;user-select:none}
.hd-page-plan-locked .hd-plan-locked-dim *{cursor:default!important}

@media (max-width:900px){
  .hd-plan-gate-inline{margin:16px;align-items:flex-start;flex-wrap:wrap}
  .hd-plan-gate-inline__btn{width:100%;justify-content:center}
}

/* ═══ In-page feature lock overlay ═════════════════════════════ */
.hd-feat-locked{position:relative;overflow:hidden}
.hd-feat-locked::after{content:'';position:absolute;inset:0;background:rgba(255,255,255,.7);backdrop-filter:blur(2px);z-index:5;border-radius:inherit}
.hd-feat-lock-banner{position:absolute;inset:0;z-index:6;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;cursor:pointer;border-radius:inherit}
.hd-feat-lock-banner svg{color:#94a3b8}
.hd-feat-lock-banner span{font-size:12px;font-weight:700;color:#64748b;background:#f1f5f9;padding:5px 14px;border-radius:8px;border:1px solid #e2e8f0;transition:.15s}
.hd-feat-locked:hover .hd-feat-lock-banner span{color:#2563eb;border-color:#bfdbfe;background:#eff6ff}

@media (max-width:900px){
  .hpg-plans{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:640px){
  .hpg-plans{grid-template-columns:1fr}
  .hpg-box{padding:28px 20px 22px;border-radius:18px}
}
.hpg-plan.hpg-disabled{opacity:.4;cursor:default}
.hpg-plan.hpg-disabled:hover{border-color:#e2e8f0;background:#f8fafc;transform:none;box-shadow:none}

/* Ensure all grid cards stretch to same height */
.hd-card{height:100%}

/* RDV sub-pages */
.hd-rdv-sub{display:none}
.hd-rdv-sub.active{display:block}

/* ═══ Billing plan cards alignment ═══════════════════════════ */
.hd-pricing-grid{align-items:stretch}
.hd-plan-card{display:flex!important;flex-direction:column!important}
.hd-plan-feats{flex:1!important}
.hd-plan-card .hd-btn-full,.hd-plan-card .hd-plan-current-lbl{margin-top:auto!important}

/* ═══ Fix conversation trash flicker ═══════════════════════════ */
.hd-conv-avatar{transition:none!important}
.hd-conv-trash-trigger{transition:opacity .1s ease!important}

/* Extracted dashboard skin: see public/css/dashboard-panel.css */


/* === v14 conversations alignment: visitor left, bot/agent right === */
#hd-page-conversations .hd-msg{
  display:flex!important;
  align-items:flex-start!important;
  gap:10px!important;
  width:100%!important;
  max-width:100%!important;
  margin:0 0 12px 0!important;
}
#hd-page-conversations .hd-msg .hd-msg-avatar{
  width:28px!important;
  height:28px!important;
  min-width:28px!important;
  border-radius:8px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:11px!important;
  font-weight:700!important;
  margin-top:2px!important;
  flex:0 0 28px!important;
}
#hd-page-conversations .hd-msg.user{
  justify-content:flex-start!important;
  flex-direction:row!important;
  margin-left:0!important;
}
#hd-page-conversations .hd-msg.user .hd-msg-stack{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  max-width:min(66%,720px)!important;
  width:auto!important;
  min-width:0!important;
  flex:0 1 auto!important;
}
#hd-page-conversations .hd-msg.user .hd-bubble{
  background:#fff!important;
  color:#0f172a!important;
  border:1px solid #dfe6ef!important;
  border-bottom-left-radius:8px!important;
  border-bottom-right-radius:16px!important;
}
#hd-page-conversations .hd-msg.bot,
#hd-page-conversations .hd-msg.agent{
  justify-content:flex-end!important;
  flex-direction:row-reverse!important;
  margin-left:auto!important;
}
#hd-page-conversations .hd-msg.bot .hd-msg-stack,
#hd-page-conversations .hd-msg.agent .hd-msg-stack{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-end!important;
  max-width:min(66%,720px)!important;
  width:auto!important;
  min-width:0!important;
  flex:0 1 auto!important;
}
#hd-page-conversations .hd-msg.bot .hd-bubble{
  background:var(--hd-accent)!important;
  color:#fff!important;
  border-color:var(--hd-accent)!important;
  border-bottom-right-radius:8px!important;
  border-bottom-left-radius:16px!important;
}
#hd-page-conversations .hd-msg.agent .hd-bubble{
  background:#e2f7ea!important;
  color:#15803d!important;
  border:1px solid #b7ebc6!important;
  border-bottom-right-radius:8px!important;
  border-bottom-left-radius:16px!important;
}
#hd-page-conversations .hd-msg.user .hd-msg-time{align-self:flex-start!important;}
#hd-page-conversations .hd-msg.bot .hd-msg-time,
#hd-page-conversations .hd-msg.agent .hd-msg-time{align-self:flex-end!important;}


/* ── Team modal / permissions refresh ── */
#hd-create-client-body .hd-team-perms{display:grid;grid-template-columns:1fr 1fr;gap:12px}
#hd-create-client-body .hd-team-perm-group{border:1px solid var(--hd-border,#e2e8f0);border-radius:12px;background:#fff;overflow:hidden}
#hd-create-client-body .hd-team-perm-title{padding:10px 12px;background:var(--hd-bg2,#f8fafc);border-bottom:1px solid var(--hd-border,#e2e8f0);font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--hd-text2,#475569)}
#hd-create-client-body .hd-perm-row{padding:10px 12px;gap:12px}
#hd-create-client-body .hd-perm-row-text{display:flex;flex-direction:column;gap:2px;min-width:0}
#hd-create-client-body .hd-perm-row-text span{font-size:12px;font-weight:600;color:var(--hd-text,#0f172a)}
#hd-create-client-body .hd-perm-row-text small{font-size:10px;color:var(--hd-text3,#94a3b8);text-transform:uppercase;letter-spacing:.03em}
#hd-create-client-body .hd-team-site-row{display:flex;align-items:center;gap:8px;padding:10px 12px;border:1.5px solid var(--hd-border,#e2e8f0);border-radius:10px;background:#fff;cursor:pointer;transition:border-color .15s,background .15s}
#hd-create-client-body .hd-team-site-row:hover{border-color:var(--hd-accent);background:#f8fbff}
#hd-create-client-body .hd-team-site-row input[type=checkbox]{width:16px;height:16px;accent-color:var(--hd-accent);margin:0}
#hd-create-client-body .hd-team-site-name{font-size:12px;font-weight:700;color:var(--hd-text,#0f172a)}
#hd-create-client-body .hd-team-site-domain{margin-left:auto;font-size:10px;color:var(--hd-text3,#94a3b8);font-family:var(--hd-mono,'JetBrains Mono',monospace)}
@media (max-width: 760px){#hd-create-client-body .hd-team-perms{grid-template-columns:1fr}}

/* v41: remove bottom mode switch and keep layout stable */
:root{--hd-modebar-clearance:0px !important;}
#hd-modebar,.hd-modebar,#hd-mode-pill,.hd-mode-pill,#hd-mode-sep,.hd-mode-sep{display:none !important;visibility:hidden !important;opacity:0 !important;pointer-events:none !important;}
body.hd-editor-active #hd-modebar{display:none !important;}

/* ═══════════════════════════════════════════════════════
   v42 — UI consistency pass + group chat redesign
═══════════════════════════════════════════════════════ */
#hd-root .hd-topbar{
  min-height:76px !important;
  height:auto !important;
  padding:12px 4px 10px 0 !important;
  overflow:visible !important;
}
#hd-root .hd-title-stack{
  padding-top:4px !important;
  overflow:visible !important;
}
#hd-root .hd-topbar-title{
  line-height:1.14 !important;
  padding-top:2px !important;
  overflow:visible !important;
}
#hd-root .hd-topbar-sub,
#hd-root .hd-back-link{
  margin-top:6px !important;
  line-height:1.35 !important;
}

#hd-root .hd-page-inner,
#hd-root .hd-card,
#hd-root .hd-panel,
#hd-root .hd-stat,
#hd-root .hd-teamchat-sidebar,
#hd-root .hd-teamchat-main,
#hd-root .hd-modal-card{
  border-radius:24px !important;
}
#hd-root .hd-card,
#hd-root .hd-panel,
#hd-root .hd-stat,
#hd-root .hd-teamchat-sidebar,
#hd-root .hd-teamchat-main{
  border:1px solid var(--hd-border) !important;
  box-shadow:0 1px 2px rgba(13,21,38,.03),0 8px 20px rgba(13,21,38,.04) !important;
}
#hd-root .hd-card:hover,
#hd-root .hd-panel:hover,
#hd-root .hd-stat:hover,
#hd-root .hd-teamchat-sidebar:hover,
#hd-root .hd-teamchat-main:hover{
  transform:none !important;
}

#hd-root .hd-card-head{
  padding:16px 20px !important;
  margin:0 !important;
  border-bottom:1px solid var(--hd-border) !important;
  font-size:14px !important;
  font-weight:700 !important;
  color:var(--hd-text) !important;
}
#hd-root #hd-page-account .hd-card > :not(.hd-card-head),
#hd-root #hd-page-billing .hd-card > :not(.hd-card-head){
  margin-left:20px !important;
  margin-right:20px !important;
}
#hd-root #hd-page-account .hd-card .hd-field,
#hd-root #hd-page-billing .hd-card .hd-field{
  margin-bottom:16px !important;
}
#hd-root #hd-page-account .hd-card .hd-field label,
#hd-root #hd-page-billing .hd-card .hd-field label{
  font-size:12px !important;
  font-weight:600 !important;
  color:var(--hd-text2) !important;
  margin-bottom:8px !important;
}
#hd-root #hd-page-account .hd-card .hd-field input,
#hd-root #hd-page-billing .hd-card .hd-field input,
#hd-root #hd-page-account .hd-card .hd-field select,
#hd-root #hd-page-billing .hd-card .hd-field select,
#hd-root #hd-page-account .hd-card .hd-field textarea,
#hd-root #hd-page-billing .hd-card .hd-field textarea{
  min-height:44px !important;
  border-radius:14px !important;
}

#hd-root #hd-page-account .hd-page-inner{
  gap:18px !important;
  padding:18px !important;
}
#hd-root #hd-page-account .hd-card,
#hd-root #hd-page-account #hd-account-security,
#hd-root #hd-page-account #hd-account-notifs{
  overflow:hidden !important;
}
#hd-root #hd-page-account .hd-account-avatar-wrap{
  margin:18px 20px !important;
  padding:18px !important;
  border-radius:18px !important;
  background:#f8fbff !important;
  border:1px solid var(--hd-border) !important;
}
#hd-root #hd-page-account .hd-account-avatar-preview{
  width:84px !important;
  height:84px !important;
  border-radius:22px !important;
}
#hd-root #hd-page-account .hd-btn,
#hd-root #hd-page-account .hd-account-avatar-actions .hd-btn{
  height:40px !important;
  border-radius:14px !important;
}
#hd-root #hd-page-account .hd-set-row{
  padding:16px 20px !important;
  margin:0 !important;
  border-bottom:1px solid var(--hd-border) !important;
  font-size:14px !important;
  line-height:1.45 !important;
  color:var(--hd-text2) !important;
}
#hd-root #hd-page-account .hd-set-row:last-of-type{border-bottom:none !important;}
#hd-root #hd-page-account #hd-account-notifs > div:last-child{
  padding:0 20px 18px !important;
  margin-top:2px !important;
  font-size:12px !important;
  line-height:1.55 !important;
  color:var(--hd-text3) !important;
}

/* ── Group chat redesign ────────────────────────────── */
#hd-root #hd-page-group{
  padding:0 !important;
}
#hd-root #hd-page-group .hd-teamchat-wrap{
  display:grid !important;
  grid-template-columns:320px minmax(0,1fr) !important;
  gap:16px !important;
  padding:16px !important;
  min-height:calc(100vh - 84px) !important;
  align-items:stretch !important;
}
#hd-root #hd-page-group .hd-teamchat-sidebar,
#hd-root #hd-page-group .hd-teamchat-main{
  background:rgba(255,255,255,.68) !important;
  backdrop-filter:blur(10px) !important;
  overflow:hidden !important;
  min-height:0 !important;
}
#hd-root #hd-page-group .hd-teamchat-sidebar{
  display:flex !important;
  flex-direction:column !important;
}
#hd-root #hd-page-group .hd-teamchat-head{
  display:flex !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:12px !important;
  padding:20px 18px 14px !important;
  border-bottom:1px solid var(--hd-border) !important;
}
#hd-root #hd-page-group .hd-teamchat-head .hd-topbar-title{
  font:800 20px 'Epilogue',sans-serif !important;
  line-height:1.15 !important;
  color:var(--hd-text) !important;
  margin:0 !important;
  padding:0 !important;
}
#hd-root #hd-page-group .hd-teamchat-head .hd-topbar-sub{
  font-size:12px !important;
  color:var(--hd-text3) !important;
  margin-top:4px !important;
}
#hd-root #hd-page-group .hd-teamchat-search{
  padding:14px 18px 10px !important;
}
#hd-root #hd-page-group .hd-teamchat-search input{
  width:100% !important;
  min-height:42px !important;
  border-radius:14px !important;
  border:1px solid var(--hd-border) !important;
  background:#fff !important;
  color:var(--hd-text) !important;
  font:500 13px 'Figtree',sans-serif !important;
  padding:0 14px !important;
  outline:none !important;
}
#hd-root #hd-page-group .hd-teamchat-section-title{
  padding:10px 18px 8px !important;
  font:700 11px 'JetBrains Mono',monospace !important;
  letter-spacing:.16em !important;
  text-transform:uppercase !important;
  color:var(--hd-text3) !important;
}
#hd-root #hd-page-group .hd-teamchat-section-row{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
}
#hd-root #hd-page-group .hd-link-btn{
  border:none !important;
  background:transparent !important;
  color:var(--hd-accent) !important;
  font:700 12px 'Figtree',sans-serif !important;
  padding:0 !important;
}
#hd-root #hd-page-group .hd-teamchat-channel-list{
  padding:0 12px 10px !important;
  display:flex !important;
  flex-direction:column !important;
  gap:10px !important;
}
#hd-root #hd-page-group .hd-teamchat-channel{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  padding:12px 12px !important;
  border-radius:18px !important;
  border:1px solid var(--hd-border) !important;
  background:#fff !important;
  cursor:pointer !important;
  transition:background .18s ease,border-color .18s ease, box-shadow .18s ease !important;
}
#hd-root #hd-page-group .hd-teamchat-channel:hover{
  background:#f8fbff !important;
  border-color:#cfdcf5 !important;
}
#hd-root #hd-page-group .hd-teamchat-channel.active{
  background:#edf4ff !important;
  border-color:#bfd5ff !important;
  box-shadow:inset 3px 0 0 var(--hd-accent) !important;
}
#hd-root #hd-page-group .hd-teamchat-channel-av{
  width:42px !important;
  height:42px !important;
  min-width:42px !important;
  border-radius:14px !important;
  overflow:hidden !important;
  background:linear-gradient(180deg,#2D6BFF,#0C55F4) !important;
  color:#fff !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-weight:800 !important;
  box-shadow:0 8px 18px rgba(12,85,244,.16) !important;
}
#hd-root #hd-page-group .hd-teamchat-channel-av img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  display:block !important;
}
#hd-root #hd-page-group .hd-teamchat-channel-meta{
  min-width:0 !important;
  flex:1 !important;
}
#hd-root #hd-page-group .hd-teamchat-channel-meta strong{
  display:block !important;
  font-size:14px !important;
  color:var(--hd-text) !important;
  line-height:1.2 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
#hd-root #hd-page-group .hd-teamchat-channel-meta small{
  display:block !important;
  margin-top:4px !important;
  font-size:12px !important;
  color:var(--hd-text3) !important;
  line-height:1.35 !important;
}
#hd-root #hd-page-group .hd-teamchat-empty{
  padding:8px 18px 16px !important;
  color:var(--hd-text3) !important;
  font-size:13px !important;
}
#hd-root #hd-page-group .hd-teamchat-main{
  display:flex !important;
  flex-direction:column !important;
}
#hd-root #hd-page-group .hd-teamchat-main-head{
  padding:20px 22px 16px !important;
  border-bottom:1px solid var(--hd-border) !important;
  background:rgba(255,255,255,.72) !important;
}
#hd-root #hd-page-group .hd-teamchat-current-meta strong{
  display:block !important;
  font-size:22px !important;
  font-weight:800 !important;
  letter-spacing:-.02em !important;
  color:var(--hd-text) !important;
}
#hd-root #hd-page-group .hd-teamchat-current-meta small{
  display:block !important;
  margin-top:5px !important;
  font-size:13px !important;
  color:var(--hd-text3) !important;
}
#hd-root #hd-page-group .hd-teamchat-thread{
  flex:1 !important;
  min-height:0 !important;
  overflow:auto !important;
  padding:18px 22px !important;
  display:flex !important;
  flex-direction:column !important;
  gap:14px !important;
  background:linear-gradient(180deg,rgba(247,250,255,.55),transparent) !important;
}
#hd-root #hd-page-group .hd-teamchat-msg{
  display:flex !important;
  align-items:flex-end !important;
  gap:10px !important;
  max-width:78% !important;
}
#hd-root #hd-page-group .hd-teamchat-msg.mine{
  margin-left:auto !important;
  flex-direction:row-reverse !important;
}
#hd-root #hd-page-group .hd-teamchat-msg.other{
  margin-right:auto !important;
}
#hd-root #hd-page-group .hd-teamchat-msg-av{
  width:34px !important;
  height:34px !important;
  min-width:34px !important;
  border-radius:12px !important;
  overflow:hidden !important;
  background:#e8effd !important;
  color:var(--hd-text2) !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:12px !important;
  font-weight:800 !important;
}
#hd-root #hd-page-group .hd-teamchat-msg-av img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  display:block !important;
}
#hd-root #hd-page-group .hd-teamchat-msg-stack{
  display:flex !important;
  flex-direction:column !important;
  min-width:0 !important;
}
#hd-root #hd-page-group .hd-teamchat-msg-author{
  font-size:11px !important;
  font-weight:700 !important;
  color:var(--hd-text3) !important;
  margin-bottom:5px !important;
}
#hd-root #hd-page-group .hd-teamchat-msg.mine .hd-teamchat-msg-author{
  text-align:right !important;
}
#hd-root #hd-page-group .hd-teamchat-msg-bubble{
  padding:12px 14px !important;
  border-radius:18px !important;
  font-size:14px !important;
  line-height:1.55 !important;
  border:1px solid var(--hd-border) !important;
  background:#fff !important;
  color:var(--hd-text2) !important;
  box-shadow:0 1px 0 rgba(13,21,38,.02) !important;
}
#hd-root #hd-page-group .hd-teamchat-msg.mine .hd-teamchat-msg-bubble{
  background:var(--hd-accent) !important;
  border-color:var(--hd-accent) !important;
  color:#fff !important;
}
#hd-root #hd-page-group .hd-teamchat-msg-time{
  margin-top:5px !important;
  font-size:11px !important;
  color:var(--hd-text3) !important;
}
#hd-root #hd-page-group .hd-teamchat-msg.mine .hd-teamchat-msg-time{
  text-align:right !important;
}
#hd-root #hd-page-group .hd-teamchat-compose{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:12px !important;
  align-items:end !important;
  padding:16px 18px !important;
  border-top:1px solid var(--hd-border) !important;
  background:#fff !important;
}
#hd-root #hd-page-group .hd-teamchat-input{
  width:100% !important;
  min-height:62px !important;
  max-height:160px !important;
  resize:vertical !important;
  border-radius:18px !important;
  border:1px solid var(--hd-border) !important;
  background:#f8fbff !important;
  padding:16px 18px !important;
  font:500 14px 'Figtree',sans-serif !important;
  color:var(--hd-text) !important;
  outline:none !important;
}
#hd-root #hd-page-group .hd-teamgroup-members{
  display:grid !important;
  gap:10px !important;
  max-height:220px !important;
  overflow:auto !important;
  padding:2px !important;
}
#hd-root #hd-page-group .hd-teamgroup-row{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  padding:10px 12px !important;
  border:1px solid var(--hd-border) !important;
  border-radius:14px !important;
  background:#fff !important;
  cursor:pointer !important;
}
#hd-root #hd-page-group .hd-teamgroup-row input{
  width:16px !important;
  height:16px !important;
}
#hd-root #hd-page-group .hd-inline-status{
  font-size:12px !important;
  color:var(--hd-text3) !important;
  min-height:18px !important;
}
@media (max-width: 1180px){
  #hd-root #hd-page-group .hd-teamchat-wrap{
    grid-template-columns:1fr !important;
  }
  #hd-root #hd-page-group .hd-teamchat-sidebar{
    max-height:none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   TEAM CHAT v2 — Pastilles rondes + statut online (ligne unique)
═══════════════════════════════════════════════════════════════ */

/* ─── Bouton de déconnexion dans la sidebar ─────────────────── */
#hd-root .hd-sidebar-logout{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:10px !important;
  margin:6px 12px 12px !important;
  padding:10px 14px !important;
  border-radius:12px !important;
  border:1px solid rgba(255,255,255,.08) !important;
  background:rgba(255,255,255,.03) !important;
  color:rgba(255,255,255,.72) !important;
  font:600 13px 'Figtree',sans-serif !important;
  text-decoration:none !important;
  cursor:pointer !important;
  transition:background .18s ease, color .18s ease, border-color .18s ease !important;
  overflow:hidden !important; /* Empêche le texte de déborder en mode réduit */
  white-space:nowrap !important;
}
#hd-root .hd-sidebar-logout:hover{
  background:rgba(220,38,38,.12) !important;
  border-color:rgba(220,38,38,.35) !important;
  color:#fca5a5 !important;
}
#hd-root .hd-sidebar-logout svg{
  flex-shrink:0 !important;
}
#hd-root .hd-sidebar-logout span{
  line-height:1 !important;
}

#hd-root #hd-page-group .hd-tc2-wrap{
  display:flex !important;
  flex-direction:column !important;
  gap:16px !important;
}

/* Champ de recherche placé dans la topbar standard à droite */
#hd-root #hd-page-group .hd-topbar-right .hd-tc2-search{
  position:relative !important;
  display:flex !important;
  align-items:center !important;
}
#hd-root #hd-page-group .hd-topbar-right .hd-tc2-search svg{
  position:absolute !important;
  left:13px !important;
  color:var(--hd-text3) !important;
  pointer-events:none !important;
}
#hd-root #hd-page-group .hd-topbar-right .hd-tc2-search input{
  width:280px !important;
  max-width:100% !important;
  min-height:38px !important;
  border-radius:12px !important;
  border:1px solid var(--hd-border) !important;
  background:var(--hd-bg2, #f8fafc) !important;
  color:var(--hd-text) !important;
  padding:0 14px 0 36px !important;
  font:500 13px 'Figtree',sans-serif !important;
  outline:none !important;
  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease !important;
}
#hd-root #hd-page-group .hd-topbar-right .hd-tc2-search input:focus{
  border-color:var(--hd-accent) !important;
  box-shadow:0 0 0 3px rgba(12,85,244,.12) !important;
  background:#fff !important;
}

/* Barre de pastilles — une seule ligne */
/* ═══════════════════════════════════════════════════════════════
   ÉQUIPE — UI Modernisée
   Layout : barre canaux horizontale + zone chat épurée
═══════════════════════════════════════════════════════════════ */

/* Barre des canaux — horizontal scroll, fond card */
#hd-root #hd-page-group .hd-tc2-pillbar{
  background:#fff !important;
  border:1px solid var(--hd-border) !important;
  border-radius:20px !important;
  padding:12px 16px !important;
  box-shadow:0 1px 2px rgba(13,21,38,.03),0 4px 14px rgba(13,21,38,.04) !important;
}
#hd-root #hd-page-group .hd-tc2-pills{
  display:flex !important;
  align-items:center !important;
  gap:6px !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  padding:2px 2px 4px !important;
  scrollbar-width:thin !important;
  min-height:60px !important;
}
#hd-root #hd-page-group .hd-tc2-pills::-webkit-scrollbar{ height:4px; }
#hd-root #hd-page-group .hd-tc2-pills::-webkit-scrollbar-thumb{ background:#dde4ef; border-radius:4px; }
#hd-root #hd-page-group .hd-tc2-pills::-webkit-scrollbar-track{ background:transparent; }

/* Séparateur */
#hd-root #hd-page-group .hd-tc2-sep{
  display:inline-block !important;
  width:1px !important; min-width:1px !important;
  height:32px !important; align-self:center !important;
  background:var(--hd-border) !important;
  margin:0 4px !important;
}

/* ── Pill : chip horizontal (plus compact, lisible) ── */
#hd-root #hd-page-group .hd-tc2-pill{
  display:inline-flex !important;
  align-items:center !important;
  gap:9px !important;
  background:transparent !important;
  border:1.5px solid transparent !important;
  border-radius:14px !important;
  padding:7px 12px 7px 8px !important;
  cursor:pointer !important;
  position:relative !important;
  flex-shrink:0 !important;
  transition:background .15s, border-color .15s, box-shadow .15s !important;
  font-family:inherit !important;
}
#hd-root #hd-page-group .hd-tc2-pill:hover{
  background:var(--hd-bg3) !important;
}
#hd-root #hd-page-group .hd-tc2-pill.active{
  background:#eef4ff !important;
  border-color:rgba(12,85,244,.18) !important;
  box-shadow:0 0 0 3px rgba(12,85,244,.07) !important;
}

/* Wrapper avatar */
#hd-root #hd-page-group .hd-tc2-pill-av-wrap{
  position:relative !important;
  width:34px !important; height:34px !important;
  display:block !important; flex-shrink:0 !important;
}

/* Avatar rond */
#hd-root #hd-page-group .hd-tc2-pill-av{
  width:34px !important; height:34px !important;
  border-radius:50% !important;
  overflow:hidden !important;
  background:linear-gradient(135deg,#2D6BFF,#0C55F4) !important;
  color:#fff !important;
  display:flex !important; align-items:center !important; justify-content:center !important;
  font:700 13px 'Epilogue',sans-serif !important;
  box-shadow:0 2px 8px rgba(12,85,244,.15) !important;
  border:2px solid #fff !important;
  box-sizing:border-box !important;
  transition:box-shadow .15s !important;
}
#hd-root #hd-page-group .hd-tc2-pill-av img{
  width:100% !important; height:100% !important;
  object-fit:cover !important; display:block !important;
}
#hd-root #hd-page-group .hd-tc2-pill.active .hd-tc2-pill-av{
  box-shadow:0 0 0 2.5px var(--hd-accent) !important;
}

/* Labels texte */
#hd-root #hd-page-group .hd-tc2-pill-labels{
  display:flex !important; flex-direction:column !important;
  min-width:0 !important; align-items:flex-start !important;
}
#hd-root #hd-page-group .hd-tc2-pill-label{
  font:600 13px 'Figtree',sans-serif !important;
  color:var(--hd-text) !important;
  white-space:nowrap !important;
  overflow:hidden !important; text-overflow:ellipsis !important;
  max-width:100px !important;
  line-height:1.25 !important;
}
#hd-root #hd-page-group .hd-tc2-pill.active .hd-tc2-pill-label{
  color:var(--hd-accent) !important;
  font-weight:700 !important;
}
#hd-root #hd-page-group .hd-tc2-pill-sub{
  font:500 11px 'Figtree',sans-serif !important;
  color:var(--hd-text3) !important;
  white-space:nowrap !important;
  line-height:1.2 !important;
}

/* Point de statut */
#hd-root #hd-page-group .hd-tc2-pill-av-wrap > .hd-tc2-dot{
  position:absolute !important;
  bottom:-1px !important; right:-1px !important;
  width:11px !important; height:11px !important;
  border-radius:50% !important;
  border:2px solid #fff !important;
  background:#b8c3d1 !important;
  box-sizing:border-box !important; z-index:3 !important;
}
#hd-root #hd-page-group .hd-tc2-pill-av-wrap > .hd-tc2-dot.online{ background:#22c55e !important; }
#hd-root #hd-page-group .hd-tc2-pill-av-wrap > .hd-tc2-dot.away  { background:#f59e0b !important; }
#hd-root #hd-page-group .hd-tc2-pill-av-wrap > .hd-tc2-dot.dnd   { background:#ef4444 !important; }
#hd-root #hd-page-group .hd-tc2-pill-av-wrap > .hd-tc2-dot.offline{ background:#b8c3d1 !important; }

/* Badge non-lus */
#hd-root #hd-page-group .hd-tc2-unread{
  position:absolute !important; top:-3px !important; right:-6px !important;
  min-width:18px !important; height:18px !important; padding:0 4px !important;
  border-radius:9px !important; background:#ef4444 !important; color:#fff !important;
  font:800 10px 'Figtree',sans-serif !important;
  display:flex !important; align-items:center !important; justify-content:center !important;
  border:2px solid #fff !important; box-sizing:border-box !important; z-index:4 !important;
}

/* Canal global : dégradé violet */
#hd-root #hd-page-group .hd-tc2-pill-global .hd-tc2-pill-av{
  background:linear-gradient(135deg,#8B5CF6,#6366F1) !important;
  font-size:15px !important;
}
/* Groupes : avatar carré arrondi */
#hd-root #hd-page-group .hd-tc2-pill-group .hd-tc2-pill-av{
  border-radius:10px !important;
}
/* Bouton + ajouter groupe */
#hd-root #hd-page-group .hd-tc2-pill-add{
  padding:7px 12px !important;
  border:1.5px dashed var(--hd-border2) !important;
  color:var(--hd-accent) !important;
}
#hd-root #hd-page-group .hd-tc2-pill-add .hd-tc2-pill-add-ico{
  width:34px !important; height:34px !important; border-radius:50% !important;
  display:flex !important; align-items:center !important; justify-content:center !important;
  background:#eef4ff !important; font-size:20px !important; font-weight:300 !important;
  line-height:1 !important; color:var(--hd-accent) !important;
  transition:background .15s !important;
}
#hd-root #hd-page-group .hd-tc2-pill-add:hover{
  background:#eef4ff !important; border-color:var(--hd-accent) !important; border-style:solid !important;
}
#hd-root #hd-page-group .hd-tc2-pill-add .hd-tc2-pill-label{
  color:var(--hd-accent) !important; font-weight:600 !important;
}

/* Vide */
#hd-root #hd-page-group .hd-tc2-empty{
  color:var(--hd-text3) !important; font-size:13px !important;
  font-style:italic !important; padding:16px 4px !important;
  align-self:center !important; flex-shrink:0 !important;
}

/* Zone de chat */
#hd-root #hd-page-group .hd-tc2-chat{
  display:flex !important;
  flex-direction:column !important;
  background:#fff !important;
  border:1px solid var(--hd-border) !important;
  border-radius:22px !important;
  overflow:hidden !important;
  min-height:520px !important;
  box-shadow:0 1px 2px rgba(13,21,38,.03),0 8px 20px rgba(13,21,38,.04) !important;
  isolation:isolate !important; /* Empêche les stacking contexts internes de fuir */
  position:relative !important;
  z-index:1 !important;
}
#hd-root #hd-page-group .hd-tc2-chat-head{
  padding:18px 22px 14px !important;
  border-bottom:1px solid var(--hd-border) !important;
  background:rgba(250,252,255,.82) !important;
}
#hd-root #hd-page-group .hd-tc2-chat .hd-teamchat-thread{
  background:linear-gradient(180deg,rgba(247,250,255,.45),transparent) !important;
  flex:1 !important;
  min-height:320px !important;
}

/* ═══ Barre de composition unifiée (photo / dictée / texte / vocal / envoi) ═══ */
#hd-root #hd-page-group .hd-tc2-compose{
  display:flex !important;
  align-items:flex-end !important;
  gap:6px !important;
  padding:10px 12px !important;
  border-top:1px solid var(--hd-border) !important;
  background:#fff !important;
}
#hd-root #hd-page-group .hd-tc2-compose-btn{
  flex-shrink:0 !important;
  width:40px !important;
  height:40px !important;
  border-radius:50% !important;
  border:none !important;
  background:transparent !important;
  color:var(--hd-text3) !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  cursor:pointer !important;
  transition:background .15s ease, color .15s ease !important;
  padding:0 !important;
}
#hd-root #hd-page-group .hd-tc2-compose-btn:hover{
  background:#f1f5fb !important;
  color:var(--hd-accent) !important;
}
#hd-root #hd-page-group .hd-tc2-compose-btn.is-active{
  background:rgba(12,85,244,.10) !important;
  color:var(--hd-accent) !important;
}

/* Textarea : occupe tout l'espace libre, pas de marge fantôme */
#hd-root #hd-page-group .hd-tc2-compose-input{
  flex:1 1 auto !important;
  min-width:0 !important;
  min-height:40px !important;
  max-height:180px !important;
  padding:10px 14px !important;
  border:1px solid var(--hd-border) !important;
  border-radius:20px !important;
  background:#f8fafc !important;
  color:var(--hd-text) !important;
  font:500 14px 'Figtree',sans-serif !important;
  line-height:1.45 !important;
  resize:none !important;
  outline:none !important;
  overflow-y:auto !important;
  transition:border-color .15s ease, background .15s ease !important;
  display:block !important;
  vertical-align:middle !important;
  box-sizing:border-box !important;
}
#hd-root #hd-page-group .hd-tc2-compose-input:focus{
  border-color:var(--hd-accent) !important;
  background:#fff !important;
}

/* Bouton envoi : rond bleu */
#hd-root #hd-page-group .hd-tc2-compose-send{
  flex-shrink:0 !important;
  width:40px !important;
  height:40px !important;
  border-radius:50% !important;
  border:none !important;
  background:var(--hd-accent) !important;
  color:#fff !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  cursor:pointer !important;
  transition:background .15s ease, transform .12s ease !important;
  padding:0 !important;
  margin-left:4px !important;
  box-shadow:0 4px 10px rgba(12,85,244,.25) !important;
}
#hd-root #hd-page-group .hd-tc2-compose-send:hover{
  background:#0a49d1 !important;
  transform:scale(1.05) !important;
}
#hd-root #hd-page-group .hd-tc2-compose-send:active{
  transform:scale(.96) !important;
}
#hd-root #hd-page-group .hd-tc2-compose-send svg{
  transform:translateX(-1px) !important;
}

/* ═══ FIX LAYOUT : plus de marge sous la zone chat ═══
   Ciblé .active uniquement — sans ça display:flex !important écrase display:none
   et la page Équipe reste visible par-dessus toutes les autres pages */
#hd-root #hd-page-group.hd-page{
  /* Pas de display ici — géré par .active class */
  flex-direction:column !important;
  min-height:calc(100vh - 48px) !important;
}
#hd-root #hd-page-group.hd-page.active{
  display:flex !important;
}
#hd-root #hd-page-group .hd-page-inner.hd-tc2-wrap{
  flex:1 1 auto !important;
  min-height:0 !important;
}
#hd-root #hd-page-group .hd-tc2-chat{
  flex:1 1 auto !important;
  min-height:320px !important;
}

/* ═══ Barre vocale inline (au-dessus de la compose) ═══
   Visibilité gérée UNIQUEMENT par classes JS (.hd-vbar-open / .hd-vbar-show)
   pour éviter tout conflit !important avec inline styles ═══════════════════ */

/* Base : masquée par défaut */
#hd-root #hd-page-group .hd-tc2-voice-bar{
  display:none;
  align-items:center;
  gap:6px;
  padding:10px 12px;
  border-top:1px solid var(--hd-border);
  background:#fff;
}
/* Ouverte via JS : hdVbarOpen(true) → ajoute la classe .hd-vbar-open */
#hd-root #hd-page-group .hd-tc2-voice-bar.hd-vbar-open{
  display:flex !important;
  animation:vbar-slide-in .18s cubic-bezier(.22,.68,0,1.2) both;
}
@keyframes vbar-slide-in{
  from{ opacity:0; transform:translateY(6px); }
  to  { opacity:1; transform:translateY(0);   }
}

/* Point rouge clignotant (enregistrement) */
#hd-root #hd-page-group .hd-tc2-vbar-dot{
  width:8px;
  height:8px;
  min-width:8px;
  border-radius:50%;
  background:#ef4444;
  animation:vbar-pulse 1.1s ease-in-out infinite;
  flex-shrink:0;
}
@keyframes vbar-pulse{
  0%,100%{ opacity:1;  transform:scale(1);   }
  50%    { opacity:.25; transform:scale(.75); }
}

/* Canvas spectre */
#hd-root #hd-page-group .hd-tc2-voice-canvas{
  flex:1 1 auto;
  min-width:0;
  height:40px;
  width:auto;
  background:#f8fafc;
  border-radius:20px;
  border:1px solid var(--hd-border);
  display:block;
}

/* Timer enregistrement */
#hd-root #hd-page-group .hd-tc2-voice-timer{
  font:600 13px var(--hd-mono);
  color:var(--hd-text2);
  letter-spacing:.02em;
  font-variant-numeric:tabular-nums;
  flex-shrink:0;
  min-width:34px;
  text-align:right;
}

/* Groupes d'actions : cachés par défaut, visibles via classe .hd-vbar-show */
#hd-root #hd-page-group .hd-tc2-vbar-actions{
  display:none;
  align-items:center;
  gap:4px;
}
#hd-root #hd-page-group .hd-tc2-vbar-actions.hd-vbar-show{
  display:flex !important;
}

/* ─── Player custom (remplace <audio controls> natif non stylisable) ─── */
#hd-root #hd-page-group .hd-vbar-player{
  display:none;
  flex:1 1 auto;
  min-width:0;
  align-items:center;
  gap:8px;
  height:40px;
}
#hd-root #hd-page-group .hd-vbar-player.hd-vbar-show{
  display:flex !important;
}
/* Bouton play/pause du player custom */
#hd-root #hd-page-group .hd-vbar-play-btn{
  flex-shrink:0;
  width:32px; height:32px;
  border-radius:50%;
  border:none;
  background:var(--hd-accent) !important;
  color:#fff !important;
  fill:#fff !important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:background .15s, transform .12s;
}
#hd-root #hd-page-group .hd-vbar-play-btn:hover{ background:#0a49d1 !important; transform:scale(1.06); }
/* Force icône SVG blanche quelque soit l'héritage */
#hd-root #hd-page-group .hd-vbar-play-btn svg,
#hd-root #hd-page-group .hd-vbar-play-btn svg *{
  fill:#fff !important;
  stroke:none !important;
  color:#fff !important;
}
/* Barre de progression + dot */
#hd-root #hd-page-group .hd-vbar-track{
  flex:1 1 auto;
  min-width:0;
  height:20px;           /* zone cliquable large */
  display:flex;
  align-items:center;
  position:relative;
  cursor:pointer;
}
/* Fond de la barre */
#hd-root #hd-page-group .hd-vbar-track::before{
  content:'';
  position:absolute;
  left:0; right:0;
  top:50%; transform:translateY(-50%);
  height:4px;
  background:var(--hd-border);
  border-radius:4px;
}
#hd-root #hd-page-group .hd-vbar-progress{
  height:4px;
  border-radius:4px;
  background:var(--hd-accent);
  width:0%;
  pointer-events:none;
  position:relative;
  z-index:1;
  /* Pas de transition CSS — géré par la boucle RAF pour du 60fps fluide */
}
/* DOT propre à l'extrémité droite de la progression */
#hd-root #hd-page-group .hd-vbar-progress::after{
  content:'';
  position:absolute;
  right:-7px; top:50%;
  transform:translateY(-50%);
  width:14px; height:14px;
  border-radius:50%;
  background:#fff;
  border:2.5px solid var(--hd-accent);
  box-shadow:0 1px 4px rgba(12,85,244,.25);
}
/* Durée */
#hd-root #hd-page-group .hd-vbar-duration{
  font:600 12px var(--hd-mono);
  color:var(--hd-text3);
  flex-shrink:0;
  min-width:38px;
  text-align:right;
}

/* Boutons de la barre — même style que .hd-tc2-compose-btn */
#hd-root #hd-page-group .hd-tc2-vbar-btn{
  flex-shrink:0;
  width:40px; height:40px;
  border-radius:50%;
  border:none;
  background:transparent;
  color:var(--hd-text3);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:background .15s ease, color .15s ease;
  padding:0;
}
#hd-root #hd-page-group .hd-tc2-vbar-btn:hover{
  background:#f1f5fb;
  color:var(--hd-accent);
}
/* Stop */
#hd-root #hd-page-group .hd-tc2-vbar-stop{
  background:rgba(239,68,68,.10) !important;
  color:#ef4444 !important;
}
#hd-root #hd-page-group .hd-tc2-vbar-stop:hover{
  background:rgba(239,68,68,.18) !important;
  color:#dc2626 !important;
}
#hd-root #hd-page-group .hd-tc2-voice-stop-sq{
  width:12px; height:12px;
  background:#ef4444;
  border-radius:3px;
  display:block;
}
/* Envoyer */
#hd-root #hd-page-group .hd-tc2-vbar-send{
  background:var(--hd-accent) !important;
  color:#fff !important;
  box-shadow:0 4px 10px rgba(12,85,244,.25);
}
#hd-root #hd-page-group .hd-tc2-vbar-send:hover{ background:#0a49d1 !important; }
/* Redo / Fermer — contraste suffisant sur fond blanc */
#hd-root #hd-page-group .hd-tc2-vbar-redo,
#hd-root #hd-page-group .hd-tc2-vbar-close{
  color:var(--hd-text2) !important;
  background:var(--hd-bg3) !important;
}
#hd-root #hd-page-group .hd-tc2-vbar-redo:hover,
#hd-root #hd-page-group .hd-tc2-vbar-close:hover{
  background:var(--hd-border2) !important;
  color:var(--hd-text) !important;
}
/* Send button : toujours bleu avec icône blanche */
#hd-root #hd-page-group .hd-tc2-vbar-send svg,
#hd-root #hd-page-group .hd-tc2-vbar-send *{
  color:#fff !important;
  stroke:#fff !important;
}

/* ═══ Rendu des messages avec pièces jointes (images / audio) ═══ */
#hd-root #hd-page-group .hd-teamchat-msg-attachment{
  margin-top:6px !important;
  max-width:320px !important;
}
#hd-root #hd-page-group .hd-teamchat-msg-attachment img{
  width:100% !important;
  max-width:320px !important;
  max-height:320px !important;
  object-fit:cover !important;
  border-radius:14px !important;
  display:block !important;
  cursor:pointer !important;
}
#hd-root #hd-page-group .hd-teamchat-msg-attachment audio{
  width:280px !important;
  max-width:100% !important;
  margin-top:4px !important;
}

/* ─── Topbar right : son + statut + recherche ───────────────── */
#hd-root #hd-page-group .hd-tc2-topbar-right{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  flex-wrap:wrap !important;
}

/* Bouton son on/off */
#hd-root #hd-page-group .hd-tc2-sound-btn{
  width:38px !important;
  height:38px !important;
  border-radius:12px !important;
  border:1px solid var(--hd-border) !important;
  background:#fff !important;
  color:var(--hd-text2) !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  cursor:pointer !important;
  transition:background .15s ease, color .15s ease, border-color .15s ease !important;
  padding:0 !important;
}
#hd-root #hd-page-group .hd-tc2-sound-btn:hover{
  background:#f4f7fb !important;
  color:var(--hd-accent) !important;
  border-color:#cfdcf5 !important;
}
#hd-root #hd-page-group .hd-tc2-sound-btn.is-off{
  color:#94a3b8 !important;
}

/* Sélecteur de statut */
#hd-root #hd-page-group .hd-tc2-status-wrap{
  position:relative !important;
}
#hd-root #hd-page-group .hd-tc2-status-btn{
  display:inline-flex !important;
  align-items:center !important;
  gap:8px !important;
  min-height:38px !important;
  padding:0 14px !important;
  border-radius:12px !important;
  border:1px solid var(--hd-border) !important;
  background:#fff !important;
  color:var(--hd-text) !important;
  font:600 13px 'Figtree',sans-serif !important;
  cursor:pointer !important;
  transition:background .15s ease, border-color .15s ease !important;
}
#hd-root #hd-page-group .hd-tc2-status-btn:hover{
  background:#f4f7fb !important;
  border-color:#cfdcf5 !important;
}
#hd-root #hd-page-group .hd-tc2-status-btn svg{
  color:var(--hd-text3) !important;
  flex-shrink:0 !important;
}

#hd-root #hd-page-group .hd-tc2-status-dot{
  width:10px !important;
  height:10px !important;
  border-radius:50% !important;
  background:#b8c3d1 !important;
  flex-shrink:0 !important;
  display:inline-block !important;
}
#hd-root #hd-page-group .hd-tc2-status-dot.online{
  background:#22c55e !important;
  box-shadow:0 0 0 2px rgba(34,197,94,.20) !important;
}
#hd-root #hd-page-group .hd-tc2-status-dot.dnd{
  background:#ef4444 !important;
  box-shadow:0 0 0 2px rgba(239,68,68,.20) !important;
}
#hd-root #hd-page-group .hd-tc2-status-dot.offline{
  background:#b8c3d1 !important;
}

#hd-root #hd-page-group .hd-tc2-status-menu{
  position:absolute !important;
  top:calc(100% + 6px) !important;
  right:0 !important;
  min-width:200px !important;
  flex-direction:column !important;
  gap:2px !important;
  padding:6px !important;
  background:#fff !important;
  border:1px solid var(--hd-border) !important;
  border-radius:12px !important;
  box-shadow:0 12px 32px rgba(13,21,38,.12) !important;
  z-index:200 !important;
}
#hd-root #hd-page-group .hd-tc2-status-item{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  width:100% !important;
  padding:8px 12px !important;
  border:none !important;
  background:transparent !important;
  color:var(--hd-text) !important;
  font:500 13px 'Figtree',sans-serif !important;
  border-radius:8px !important;
  cursor:pointer !important;
  text-align:left !important;
  transition:background .15s ease !important;
}
#hd-root #hd-page-group .hd-tc2-status-item:hover{
  background:#f4f7fb !important;
}


#hd-root #hd-teamgroup-modal.hd-modal-overlay{
  position:fixed !important;
  inset:0 !important;
  background:rgba(14,23,38,.45) !important;
  display:none;
  align-items:center !important;
  justify-content:center !important;
  z-index:9999 !important;
  padding:20px !important;
}
#hd-root #hd-teamgroup-modal.hd-modal-overlay[style*="display:flex"],
#hd-root #hd-teamgroup-modal.hd-modal-overlay[style*="display: flex"]{
  display:flex !important;
}
#hd-root #hd-teamgroup-modal .hd-modal-card{
  background:#fff !important;
  border-radius:18px !important;
  box-shadow:0 25px 60px rgba(10,19,40,.25) !important;
  overflow:hidden !important;
  border:1px solid var(--hd-border) !important;
}

@media (max-width: 900px){
  #hd-root #hd-page-group .hd-topbar-right .hd-tc2-search input{
    width:100% !important;
  }
}

/* HETO UX preview — responsive max width with small chat-like margin */
@media(max-width:1100px){#page-edit-grid{grid-template-columns:1fr!important}#page-edit-right{display:none!important}}
#page-edit-preview{inset:clamp(10px,2vw,18px)!important}
#page-edit-preview-scene{background:linear-gradient(135deg,var(--hd-bg2,#f8fafc),var(--hd-bg,#fff))!important}


/* ═══ HETO sidebar color lock — #0C55F4 ═══ */
#hd-root .hd-sidebar {
  background:
    radial-gradient(circle at 86% 3%, rgba(255,255,255,.20) 0, rgba(255,255,255,.08) 24%, rgba(255,255,255,0) 48%),
    radial-gradient(circle at 0% 78%, rgba(255,255,255,.12) 0, rgba(255,255,255,.05) 28%, rgba(255,255,255,0) 54%),
    linear-gradient(180deg, #0C55F4 0%, #0C55F4 58%, #0847D8 100%) !important;
  box-shadow: 0 18px 40px rgba(12,85,244,.24), 0 2px 8px rgba(13,21,38,.08) !important;
  contain: paint !important;
}
#hd-root .hd-sidebar::before {
  background: rgba(255,255,255,.11) !important;
}
#hd-root .hd-sidebar::after {
  background: rgba(255,255,255,.08) !important;
}
#hd-root .hd-nav-item.active {
  background: rgba(255,255,255,.96) !important;
  color: #08245F !important;
  border-color: rgba(255,255,255,.78) !important;
}
#hd-root .hd-nav-item.active svg,
#hd-root .hd-nav-item.active .hd-nav-lbl {
  color: #08245F !important;
  stroke: #08245F !important;
}
#hd-root .hd-nav-item.active::after {
  background: #0C55F4 !important;
  box-shadow: 0 0 0 4px rgba(12,85,244,.13) !important;
}
#hd-root .hd-nav-item:hover {
  background: rgba(255,255,255,.15) !important;
  border-color: rgba(255,255,255,.22) !important;
}
#hd-root .hd-nav-tag,
#hd-root .hd-badge-count,
#hd-root .hd-nav-badge {
  background: rgba(255,255,255,.16) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,.24) !important;
}
#hd-root .hd-nav-item.active .hd-nav-tag,
#hd-root .hd-nav-item.active .hd-badge-count,
#hd-root .hd-nav-item.active .hd-nav-badge {
  background: #EEF4FF !important;
  color: #0C55F4 !important;
  border-color: #C9DAFF !important;
}
#hd-root .hd-sp-btn {
  color: #0C55F4 !important;
}
#hd-root .hd-sp-btn:hover {
  background: #EEF4FF !important;
  color: #0847D8 !important;
}
#hd-root .hd-logo-icon,
#hd-root .hd-su-av {
  border-color: rgba(255,255,255,.30) !important;
}


/* ===== Skeleton conversation loading ===== */
@keyframes hd-sk-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}
.hd-sk-pulse {
  background: linear-gradient(90deg,#f0f4f8 25%,#e2eaf4 50%,#f0f4f8 75%);
  background-size: 800px 100%;
  animation: hd-sk-shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}
.hd-conv-skeleton { display:flex; flex-direction:column; height:100%; background:#fff; }
.hd-sk-header { display:flex; align-items:center; gap:12px; padding:16px 20px; border-bottom:1px solid #f4f7fe; flex-shrink:0; }
.hd-sk-avatar { width:38px; height:38px; border-radius:10px; flex-shrink:0; }
.hd-sk-meta { flex:1; display:flex; flex-direction:column; }
.hd-sk-line { border-radius:6px; display:block; }
.hd-sk-actions { display:flex; gap:8px; margin-left:auto; }
.hd-sk-pill { height:30px; border-radius:8px; }
.hd-sk-messages { flex:1; padding:24px 20px; display:flex; flex-direction:column; gap:12px; overflow:hidden; }
.hd-sk-msg { height:38px; border-radius:12px; }
.hd-sk-msg-bot { align-self:flex-start; }
.hd-sk-msg-user { align-self:flex-end; opacity:.75; }
.hd-sk-input-bar { display:flex; align-items:center; gap:10px; padding:14px 20px; border-top:1px solid #f4f7fe; flex-shrink:0; }
.hd-sk-input { flex:1; height:42px; border-radius:12px; }
.hd-sk-send { width:42px; height:42px; border-radius:11px; flex-shrink:0; }

/* ===== Skeleton v2 — wave staggeré + typing indicator ===== */
@keyframes hd-sk-wave {
  0%,100% { opacity:.45; transform:scaleY(.97); }
  50%      { opacity:1;   transform:scaleY(1);   }
}
@keyframes hd-sk-dot-bounce {
  0%,80%,100% { transform:translateY(0);   opacity:.4; }
  40%          { transform:translateY(-6px); opacity:1; }
}

.hd-sk-wave {
  animation: hd-sk-wave 1.5s ease-in-out infinite;
  animation-delay: var(--sk-d, 0s);
  background: linear-gradient(135deg, #f0f4fb 0%, #e4eaf5 50%, #eef2fb 100%);
  border-radius: 8px;
}

/* Header */
.hd-conv-skeleton { display:flex; flex-direction:column; height:100%; background:#fff; overflow:hidden; }
.hd-sk-header { display:flex; align-items:center; gap:12px; padding:16px 20px; border-bottom:1px solid #f1f5fb; flex-shrink:0; }
.hd-sk-avatar { width:38px; height:38px; border-radius:11px; flex-shrink:0; }
.hd-sk-meta   { flex:1; display:flex; flex-direction:column; }
.hd-sk-line   { display:block; }
.hd-sk-actions { display:flex; gap:7px; margin-left:auto; }
.hd-sk-pill   { height:30px; border-radius:8px; }

/* Messages */
.hd-sk-messages { flex:1; padding:20px 20px 12px; display:flex; flex-direction:column; gap:10px; overflow:hidden; }
.hd-sk-row { display:flex; width:100%; }
.hd-sk-row-bot  { justify-content:flex-start; }
.hd-sk-row-user { justify-content:flex-end; }
.hd-sk-bubble { height:36px; border-radius:14px; }
.hd-sk-bubble-user {
  background: linear-gradient(135deg,#dce4ff 0%,#c9d5ff 100%) !important;
  animation-name: hd-sk-wave !important;
}

/* Typing dots */
.hd-sk-typing { display:flex; align-items:center; gap:5px; padding:10px 14px; background:#f4f7fd; border-radius:14px; }
.hd-sk-dot {
  width:7px; height:7px; border-radius:50%;
  background:#b8c8f0;
  animation: hd-sk-dot-bounce 1.2s ease-in-out infinite;
  animation-delay: var(--dk, 0s);
}

/* Input bar */
.hd-sk-input-bar { display:flex; align-items:center; gap:10px; padding:14px 20px; border-top:1px solid #f1f5fb; flex-shrink:0; }
.hd-sk-input { flex:1; height:44px; border-radius:14px; }
.hd-sk-send  { width:44px; height:44px; border-radius:12px; }

/* HETO 2.1.124 — harmonisation finale de l'éditeur widget
   Objectif : toutes les sections (IA, Options, Email, Connaissances, Workflows,
   Formulaires, Mon Site, Agent IA) reprennent les mêmes espacements/cartes que
   la page Apparence montrée dans la capture. */
#hd-root #hd-page-editor.heto-editor-real-page,
#hd-root #hd-page-editor.heto-v11-editor-refined{
  --heto-editor-bg:#EEF2FB;
  --heto-editor-card:#FFFFFF;
  --heto-editor-soft:#F4F7FE;
  --heto-editor-soft-blue:#EBF0FF;
  --heto-editor-border:#E9EDF7;
  --heto-editor-border-2:#D0D8F5;
  --heto-editor-blue:#5570F1;
  --heto-editor-blue-strong:#0C55F4;
  --heto-editor-text:#1B2559;
  --heto-editor-text2:#2B3674;
  --heto-editor-muted:#A3AED0;
  --heto-editor-shadow:0 1px 4px rgba(112,144,176,.06);
  background:var(--heto-editor-bg)!important;
  overflow:hidden!important;
}

/* Header / flèche retour : plus petite et plus légère partout dans l'éditeur. */
#hd-root #hd-page-editor .v11e-menu,
#hd-root #hd-page-editor #page-editor-close-btn,
#hd-root #hd-page-editor .hd-back-link,
#hd-root #hd-page-editor #wiz-back-btn{
  min-width:34px!important;
  min-height:34px!important;
  border-radius:10px!important;
}
#hd-root #hd-page-editor .v11e-menu svg,
#hd-root #hd-page-editor #page-editor-close-btn svg,
#hd-root #hd-page-editor .hd-back-link svg,
#hd-root #hd-page-editor #wiz-back-btn svg,
#hd-root .hd-logo-back{
  width:15px!important;
  height:15px!important;
  max-width:15px!important;
  max-height:15px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.75!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
#hd-root #hd-page-editor .v11e-menu{
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  padding:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:#8FA1C0!important;
  background:transparent!important;
  border:1px solid transparent!important;
  box-shadow:none!important;
}
#hd-root #hd-page-editor .v11e-menu:hover{
  color:var(--heto-editor-blue-strong)!important;
  background:var(--heto-editor-soft)!important;
  border-color:var(--heto-editor-border)!important;
}

/* Chrome haut identique à la capture. */
#hd-root #hd-page-editor.heto-v11-editor-refined .v11e-top,
#hd-root #hd-page-editor.heto-editor-real-page .v11e-top{
  height:64px!important;
  min-height:64px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  background:#fff!important;
  border-bottom:1px solid #F4F7FE!important;
}
#hd-root #hd-page-editor.heto-v11-editor-refined .v11e-left,
#hd-root #hd-page-editor.heto-editor-real-page .v11e-left{
  padding:0 16px!important;
  gap:12px!important;
  min-width:0!important;
}
#hd-root #hd-page-editor.heto-v11-editor-refined .v11e-search,
#hd-root #hd-page-editor.heto-editor-real-page .v11e-search{
  width:min(420px,44vw)!important;
  max-width:420px!important;
  min-width:280px!important;
  height:40px!important;
  border-radius:12px!important;
  border:1px solid #DDE5F7!important;
  background:#fff!important;
  box-shadow:0 1px 4px rgba(112,144,176,.06)!important;
}
#hd-root #hd-page-editor.heto-v11-editor-refined .v11e-right,
#hd-root #hd-page-editor.heto-editor-real-page .v11e-right{
  height:64px!important;
  padding:0 14px!important;
  gap:8px!important;
  background:#fff!important;
  border-left:1px solid #F4F7FE!important;
  border-top-left-radius:0!important;
}
#hd-root #hd-page-editor .v11e-ico{
  width:34px!important;
  height:34px!important;
  border-radius:10px!important;
  border:1px solid var(--heto-editor-border)!important;
  background:var(--heto-editor-soft)!important;
  color:var(--heto-editor-blue-strong)!important;
  box-shadow:none!important;
}
#hd-root #hd-page-editor .v11e-user{
  width:36px!important;
  height:36px!important;
  border-radius:12px!important;
  border:1px solid #B8C8F8!important;
  background:var(--heto-editor-soft-blue)!important;
  color:var(--heto-editor-blue-strong)!important;
}
#hd-root #hd-page-editor .v11e-tabs{
  height:52px!important;
  min-height:52px!important;
  padding:0 16px!important;
  gap:34px!important;
  align-items:flex-end!important;
  background:#fff!important;
  border-bottom:1px solid #F4F7FE!important;
  overflow-x:auto!important;
  scrollbar-width:none!important;
}
#hd-root #hd-page-editor .v11e-tabs::-webkit-scrollbar{display:none!important;}
#hd-root #hd-page-editor .v11e-tab{
  height:52px!important;
  min-width:auto!important;
  padding:0 2px!important;
  border-radius:0!important;
  border:0!important;
  border-bottom:2px solid transparent!important;
  background:transparent!important;
  color:var(--heto-editor-muted)!important;
  font:600 12px/1 Inter,Figtree,system-ui,-apple-system,Segoe UI,sans-serif!important;
  white-space:nowrap!important;
}
#hd-root #hd-page-editor .v11e-tab svg{
  width:15px!important;
  height:15px!important;
  stroke-width:1.75!important;
}
#hd-root #hd-page-editor .v11e-tab.active{
  color:var(--heto-editor-blue-strong)!important;
  border-bottom-color:var(--heto-editor-blue-strong)!important;
  background:transparent!important;
}

/* Split général : mêmes marges et fond que l'onglet Apparence. */
#hd-root #hd-page-editor.heto-editor-real-page #page-edit-grid,
#hd-root #hd-page-editor.heto-v11-editor-refined #page-edit-grid{
  flex:1 1 auto!important;
  min-height:0!important;
  height:auto!important;
  width:100%!important;
  overflow:hidden!important;
  background:#fff!important;
}
#hd-root #hd-page-editor.heto-editor-real-page #page-edit-body,
#hd-root #hd-page-editor.heto-v11-editor-refined #page-edit-body{
  min-width:0!important;
  min-height:0!important;
  overflow:auto!important;
  padding:14px 16px 108px!important;
  background:var(--heto-editor-bg)!important;
  box-sizing:border-box!important;
}
#hd-root #hd-page-editor.heto-editor-real-page #page-edit-right,
#hd-root #hd-page-editor.heto-v11-editor-refined #page-edit-right{
  min-width:0!important;
  width:auto!important;
  background:var(--heto-editor-bg)!important;
  border-left:1px solid var(--heto-editor-border)!important;
  overflow:hidden!important;
}
#hd-root #hd-page-editor.heto-editor-real-page #page-edit-preview-scene,
#hd-root #hd-page-editor.heto-v11-editor-refined #page-edit-preview-scene{
  background:var(--heto-editor-bg)!important;
  padding:14px!important;
}

/* Largeurs cohérentes pour les onglets sans aperçu. */
#hd-root #hd-page-editor.heto-editor-fullwidth-active #page-edit-body > div,
#hd-root #hd-page-editor #page-edit-grid.heto-editor-fullwidth #page-edit-body > div{
  max-width:1180px!important;
  width:100%!important;
  margin-left:auto!important;
  margin-right:auto!important;
  box-sizing:border-box!important;
}
#hd-root #hd-page-editor:not(.heto-editor-fullwidth-active) #page-edit-body > .hd-2col,
#hd-root #hd-page-editor:not(.heto-editor-fullwidth-active) #page-edit-body > .hd-field,
#hd-root #hd-page-editor:not(.heto-editor-fullwidth-active) #page-edit-body > .hd-toggle-row,
#hd-root #hd-page-editor:not(.heto-editor-fullwidth-active) #page-edit-body > .wb-page-card{
  width:100%!important;
  box-sizing:border-box!important;
}

/* Champs libres (IA / Email / Agent / Site) convertis en cartes propres. */
#hd-root #hd-page-editor #page-edit-body .hd-field{
  background:#fff!important;
  border:1px solid var(--heto-editor-border)!important;
  border-radius:14px!important;
  box-shadow:var(--heto-editor-shadow)!important;
  padding:12px 14px!important;
  margin:0 0 12px!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
#hd-root #hd-page-editor #page-edit-body .hd-field > label{
  display:flex!important;
  align-items:center!important;
  gap:5px!important;
  margin:0 0 7px!important;
  min-height:18px!important;
  color:#71819B!important;
  font:800 11.5px/1.25 Inter,Figtree,system-ui,-apple-system,Segoe UI,sans-serif!important;
  letter-spacing:.01em!important;
}
#hd-root #hd-page-editor #page-edit-body .hd-field .req,
#hd-root #hd-page-editor #page-edit-body .req{
  color:#FF6B6B!important;
}
#hd-root #hd-page-editor #page-edit-body .hd-hint{
  color:var(--heto-editor-muted)!important;
  font:500 11px/1.45 Inter,Figtree,system-ui,-apple-system,Segoe UI,sans-serif!important;
  margin-top:6px!important;
}
#hd-root #hd-page-editor #page-edit-body input:not([type=color]):not([type=checkbox]):not([type=radio]):not([type=range]),
#hd-root #hd-page-editor #page-edit-body select,
#hd-root #hd-page-editor #page-edit-body textarea,
#hd-root #hd-page-editor #page-edit-body .wb-input,
#hd-root #hd-page-editor #page-edit-body .wb-select,
#hd-root #hd-page-editor #page-edit-body .wb-ct{
  width:100%!important;
  box-sizing:border-box!important;
  border:1px solid #DDE6F4!important;
  background:#F8FAFF!important;
  border-radius:12px!important;
  color:#14213D!important;
  font:500 13px/1.45 Inter,Figtree,system-ui,-apple-system,Segoe UI,sans-serif!important;
  outline:none!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72)!important;
}
#hd-root #hd-page-editor #page-edit-body input:not([type=color]):not([type=checkbox]):not([type=radio]):not([type=range]),
#hd-root #hd-page-editor #page-edit-body select,
#hd-root #hd-page-editor #page-edit-body .wb-input,
#hd-root #hd-page-editor #page-edit-body .wb-select,
#hd-root #hd-page-editor #page-edit-body .wb-ct{
  min-height:40px!important;
  padding:9px 12px!important;
}
#hd-root #hd-page-editor #page-edit-body textarea{
  min-height:108px!important;
  padding:11px 12px!important;
  resize:vertical!important;
}
#hd-root #hd-page-editor #page-edit-body input:focus,
#hd-root #hd-page-editor #page-edit-body select:focus,
#hd-root #hd-page-editor #page-edit-body textarea:focus{
  border-color:#B8C8F8!important;
  background:#fff!important;
  box-shadow:0 0 0 3px rgba(85,112,241,.08)!important;
}

/* Grilles internes IA / formulaires : plus d'alignements cassés. */
#hd-root #hd-page-editor #page-edit-body .hd-2col{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px 14px!important;
  align-items:start!important;
  margin:0 0 12px!important;
}
#hd-root #hd-page-editor #page-edit-body .hd-2col > div{
  min-width:0!important;
}
#hd-root #hd-page-editor #page-edit-body .hd-2col .hd-field{
  margin-bottom:12px!important;
}
#hd-root #hd-page-editor #ai-sector-picker{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(128px,1fr))!important;
  gap:9px!important;
  margin:0!important;
}
#hd-root #hd-page-editor .hd-wiz-sector-mini,
#hd-root #hd-page-editor .hd-choice-mini,
#hd-root #hd-page-editor .wb-chip{
  margin:0!important;
  min-height:34px!important;
  padding:7px 11px!important;
  border-radius:10px!important;
  background:#fff!important;
  border:1px solid var(--heto-editor-border)!important;
  color:var(--heto-editor-text2)!important;
  font:700 11px/1.2 Inter,Figtree,system-ui,-apple-system,Segoe UI,sans-serif!important;
  box-sizing:border-box!important;
}
#hd-root #hd-page-editor .hd-wiz-sector-mini.selected,
#hd-root #hd-page-editor .hd-choice-mini.selected,
#hd-root #hd-page-editor .wb-chip.selected,
#hd-root #hd-page-editor .wb-chip.on{
  background:var(--heto-editor-soft-blue)!important;
  border-color:#B8C8F8!important;
  color:var(--heto-editor-blue-strong)!important;
  box-shadow:0 0 0 3px rgba(85,112,241,.08)!important;
}
#hd-root #hd-page-editor #ai-obj-chips,
#hd-root #hd-page-editor .hd-wiz-choice-row-mini,
#hd-root #hd-page-editor .wb-chips{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  margin:0!important;
}

/* Cartes / lignes : un seul système visuel pour Options, Email, Connaissances, Formulaires. */
#hd-root #hd-page-editor .wb-page-card,
#hd-root #hd-page-editor .hd-toggle-row,
#hd-root #hd-page-editor #kb-assign-list > label,
#hd-root #hd-page-editor #fb-assign-list > label{
  background:#fff!important;
  border:1px solid var(--heto-editor-border)!important;
  border-radius:14px!important;
  box-shadow:var(--heto-editor-shadow)!important;
  overflow:hidden!important;
  margin:0 0 12px!important;
  box-sizing:border-box!important;
}
#hd-root #hd-page-editor .hd-toggle-row{
  min-height:58px!important;
  padding:12px 14px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
}
#hd-root #hd-page-editor .hd-toggle-row b{
  color:var(--heto-editor-text2)!important;
  font:800 12.5px/1.25 Inter,Figtree,system-ui,-apple-system,Segoe UI,sans-serif!important;
}
#hd-root #hd-page-editor .wb-card-head{
  min-height:42px!important;
  padding:0 14px!important;
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  background:#FAFCFF!important;
  border-bottom:1px solid #F4F7FE!important;
  color:var(--heto-editor-text2)!important;
  font:800 12px/1 Inter,Figtree,system-ui,-apple-system,Segoe UI,sans-serif!important;
}
#hd-root #hd-page-editor .wb-card-head svg{
  width:14px!important;
  height:14px!important;
  fill:none!important;
  stroke:var(--heto-editor-blue)!important;
  stroke-width:1.8!important;
}
#hd-root #hd-page-editor .wb-page-row{
  min-height:50px!important;
  padding:8px 14px!important;
  display:grid!important;
  grid-template-columns:minmax(160px,220px) minmax(0,1fr)!important;
  align-items:center!important;
  gap:14px!important;
  border-bottom:1px solid #F4F7FE!important;
  box-sizing:border-box!important;
}
#hd-root #hd-page-editor .wb-page-row:last-child{border-bottom:0!important;}
#hd-root #hd-page-editor .wb-page-label{
  color:var(--heto-editor-text2)!important;
  font:700 12.5px/1.2 Inter,Figtree,system-ui,-apple-system,Segoe UI,sans-serif!important;
}
#hd-root #hd-page-editor .wb-page-label .hint{
  display:block!important;
  margin-top:3px!important;
  color:var(--heto-editor-muted)!important;
  font:500 10.5px/1.2 Inter,Figtree,system-ui,-apple-system,Segoe UI,sans-serif!important;
}
#hd-root #hd-page-editor .wb-page-ctrl{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
}

/* Panneaux d'information au début des sections : même carte blanche que l'Apparence. */
#hd-root #hd-page-editor[data-editor-tab="ai"] #page-edit-body > div:first-child,
#hd-root #hd-page-editor[data-editor-tab="kb"] #page-edit-body > div:first-child > div:nth-child(2),
#hd-root #hd-page-editor[data-editor-tab="forms"] #page-edit-body > div:first-child > div:nth-child(2){
  background:#fff!important;
  border:1px solid var(--heto-editor-border)!important;
  border-radius:14px!important;
  box-shadow:var(--heto-editor-shadow)!important;
}

/* Recherche / rubriques : conserve la page Apparence comme référence. */
#hd-root #hd-page-editor .heto-rubriques-shell{
  margin-bottom:14px!important;
  border-radius:14px!important;
  box-shadow:var(--heto-editor-shadow)!important;
}
#hd-root #hd-page-editor .heto-rubriques-grid{
  gap:7px!important;
}

@media(max-width:1280px){
  #hd-root #hd-page-editor .v11e-tabs{gap:24px!important;}
  #hd-root #hd-page-editor #page-edit-body .hd-2col{grid-template-columns:minmax(0,1fr)!important;}
}
@media(max-width:900px){
  #hd-root #hd-page-editor.heto-editor-real-page #page-edit-body,
  #hd-root #hd-page-editor.heto-v11-editor-refined #page-edit-body{padding:12px 12px 100px!important;}
  #hd-root #hd-page-editor .v11e-right{display:none!important;}
  #hd-root #hd-page-editor .v11e-top{grid-template-columns:minmax(0,1fr)!important;}
  #hd-root #hd-page-editor .v11e-search{min-width:0!important;width:100%!important;max-width:none!important;}
  #hd-root #hd-page-editor .v11e-tabs{height:auto!important;min-height:52px!important;gap:18px!important;padding:0 12px!important;}
  #hd-root #hd-page-editor .wb-page-row{grid-template-columns:1fr!important;align-items:start!important;}
  #hd-root #hd-page-editor .wb-page-ctrl{justify-content:flex-start!important;width:100%!important;}
}

/* ═══════════════════════════════════════════════════════════════════════════
   HETO 2.1.130 — Widget editor final layout lock
   - mêmes marges / mêmes rayons sur Apparence, IA, Options, Email
   - Mon Site en vraie pleine largeur
   - aperçu stable, sans transition/zoom dynamique
═══════════════════════════════════════════════════════════════════════════ */
#hd-root #hd-page-editor,
#hd-root #hd-page-editor.heto-editor-real-page,
#hd-root #hd-page-editor.heto-v11-editor-refined{
  --heto130-bg:#EEF2FB;
  --heto130-card:#FFFFFF;
  --heto130-border:#E9EDF7;
  --heto130-border-strong:#DDE5F7;
  --heto130-text:#2B3674;
  --heto130-muted:#8FA1C0;
  --heto130-blue:#0C55F4;
  --heto130-radius:16px;
  --heto130-shell-x:22px;
  --heto130-shell-top:20px;
  --heto130-shell-bottom:108px;
  --heto-editor-preview-w:clamp(420px,33vw,620px);
  background:var(--heto130-bg)!important;
  overflow:hidden!important;
  border-radius:0!important;
}
#hd-root #hd-page-editor .v11e-chrome{flex:0 0 auto!important;}
#hd-root #hd-page-editor .v11e-top{height:64px!important;min-height:64px!important;box-sizing:border-box!important;}
#hd-root #hd-page-editor .v11e-tabs{height:54px!important;min-height:54px!important;box-sizing:border-box!important;}
#hd-root #hd-page-editor #page-edit-grid,
#hd-root #hd-page-editor.heto-editor-real-page #page-edit-grid,
#hd-root #hd-page-editor.heto-v11-editor-refined #page-edit-grid{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) var(--heto-editor-preview-w)!important;
  height:calc(100dvh - 118px)!important;
  min-height:0!important;
  width:100%!important;
  max-width:none!important;
  gap:0!important;
  overflow:hidden!important;
  align-items:stretch!important;
  background:var(--heto130-bg)!important;
  box-sizing:border-box!important;
}
#hd-root #hd-page-editor #page-edit-grid.heto-editor-fullwidth,
#hd-root #hd-page-editor.heto-editor-fullwidth-active #page-edit-grid,
#hd-root #hd-page-editor[data-editor-tab="ecommerce"] #page-edit-grid,
#hd-root #hd-page-editor[data-editor-tab="kb"] #page-edit-grid,
#hd-root #hd-page-editor[data-editor-tab="wf"] #page-edit-grid,
#hd-root #hd-page-editor[data-editor-tab="forms"] #page-edit-grid,
#hd-root #hd-page-editor[data-editor-tab="agent"] #page-edit-grid{
  grid-template-columns:minmax(0,1fr)!important;
}
#hd-root #hd-page-editor #page-edit-body,
#hd-root #hd-page-editor.heto-editor-real-page #page-edit-body,
#hd-root #hd-page-editor.heto-v11-editor-refined #page-edit-body{
  width:100%!important;
  max-width:none!important;
  height:100%!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding:var(--heto130-shell-top) var(--heto130-shell-x) var(--heto130-shell-bottom)!important;
  margin:0!important;
  background:var(--heto130-bg)!important;
  box-sizing:border-box!important;
  scrollbar-width:thin!important;
  scrollbar-color:#D0D8F5 transparent!important;
}
#hd-root #hd-page-editor #page-edit-body::-webkit-scrollbar{width:4px!important;}
#hd-root #hd-page-editor #page-edit-body::-webkit-scrollbar-thumb{background:#D0D8F5!important;border-radius:999px!important;}
#hd-root #hd-page-editor #page-edit-body > *,
#hd-root #hd-page-editor.heto-editor-fullwidth-active #page-edit-body > *,
#hd-root #hd-page-editor #page-edit-grid.heto-editor-fullwidth #page-edit-body > *,
#hd-root #hd-page-editor[data-editor-tab="ecommerce"] #page-edit-body > *,
#hd-root #hd-page-editor[data-editor-tab="appearance"] #page-edit-body > *,
#hd-root #hd-page-editor[data-editor-tab="ai"] #page-edit-body > *,
#hd-root #hd-page-editor[data-editor-tab="options"] #page-edit-body > *,
#hd-root #hd-page-editor[data-editor-tab="email"] #page-edit-body > *{
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
  box-sizing:border-box!important;
}
#hd-root #hd-page-editor #page-edit-body > *:first-child{margin-top:0!important;}
#hd-root #hd-page-editor .heto-final-section-intro,
#hd-root #hd-page-editor .heto-rubriques-shell,
#hd-root #hd-page-editor .wb-page-card,
#hd-root #hd-page-editor .hd-field,
#hd-root #hd-page-editor .hd-toggle-row,
#hd-root #hd-page-editor #page-edit-body > div[style*="border-radius"],
#hd-root #hd-page-editor #hd-site-stats > div,
#hd-root #hd-page-editor #hd-site-items > div{
  border-radius:var(--heto130-radius)!important;
  box-sizing:border-box!important;
}
#hd-root #hd-page-editor .heto-final-section-intro,
#hd-root #hd-page-editor .heto-rubriques-shell,
#hd-root #hd-page-editor .wb-page-card,
#hd-root #hd-page-editor .hd-field,
#hd-root #hd-page-editor .hd-toggle-row{
  background:#fff!important;
  border:1px solid var(--heto130-border)!important;
  box-shadow:0 1px 4px rgba(112,144,176,.06)!important;
}
#hd-root #hd-page-editor #page-edit-right,
#hd-root #hd-page-editor.heto-editor-real-page #page-edit-right,
#hd-root #hd-page-editor.heto-v11-editor-refined #page-edit-right{
  width:var(--heto-editor-preview-w)!important;
  min-width:var(--heto-editor-preview-w)!important;
  max-width:var(--heto-editor-preview-w)!important;
  height:100%!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  background:var(--heto130-bg)!important;
  border-left:1px solid var(--heto130-border-strong)!important;
  box-sizing:border-box!important;
}
#hd-root #hd-page-editor.heto-editor-fullwidth-active #page-edit-right,
#hd-root #hd-page-editor #page-edit-grid.heto-editor-fullwidth #page-edit-right,
#hd-root #hd-page-editor[data-editor-tab="ecommerce"] #page-edit-right,
#hd-root #hd-page-editor[data-editor-tab="kb"] #page-edit-right,
#hd-root #hd-page-editor[data-editor-tab="wf"] #page-edit-right,
#hd-root #hd-page-editor[data-editor-tab="forms"] #page-edit-right,
#hd-root #hd-page-editor[data-editor-tab="agent"] #page-edit-right{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  width:0!important;
  min-width:0!important;
  max-width:0!important;
  border-left:0!important;
}
#hd-root #hd-page-editor #page-edit-preview-scene{
  flex:1 1 auto!important;
  min-height:0!important;
  height:auto!important;
  width:100%!important;
  overflow:auto!important;
  padding:18px!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:center!important;
  background:var(--heto130-bg)!important;
  box-sizing:border-box!important;
  contain:layout!important;
}
#hd-root #hd-page-editor #page-edit-preview,
#hd-root #hd-page-editor #page-edit-preview *,
#hd-root #hd-page-editor .heto-v7-real-wrap,
#hd-root #hd-page-editor .heto-v7-real-widget,
#hd-root #hd-page-editor .heto-preview-window,
#hd-root #hd-page-editor .heto-final-preview-scale-target{
  transition:none!important;
  animation-duration:0s!important;
}
#hd-root #hd-page-editor #page-edit-preview{
  position:relative!important;
  inset:auto!important;
  flex:0 0 auto!important;
  width:auto!important;
  height:auto!important;
  min-width:0!important;
  min-height:0!important;
  max-width:100%!important;
  margin:0 auto 28px!important;
  overflow:visible!important;
  transform:none!important;
  transform-origin:top center!important;
  box-sizing:border-box!important;
  pointer-events:auto!important;
}
#hd-root #hd-page-editor #page-edit-preview > *,
#hd-root #hd-page-editor #page-edit-preview .heto-v7-real-wrap,
#hd-root #hd-page-editor #page-edit-preview .heto-final-preview-scale-target,
#hd-root #hd-page-editor #page-edit-preview .heto-preview-window{
  transform:none!important;
  transform-origin:top center!important;
}
#hd-root #hd-page-editor .v11e-tab[data-tab="kb"],
#hd-root #hd-page-editor .v11e-tab[data-tab="wf"],
#hd-root #hd-page-editor .v11e-tab[data-tab="forms"],
#hd-root #hd-page-editor .v11e-tab[data-tab="agent"],
#hd-root #hd-page-editor .hd-ed-tab[data-tab="kb"],
#hd-root #hd-page-editor .hd-ed-tab[data-tab="wf"],
#hd-root #hd-page-editor .hd-ed-tab[data-tab="forms"],
#hd-root #hd-page-editor .hd-ed-tab[data-tab="agent"]{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
@media(max-width:1180px){
  #hd-root #hd-page-editor #page-edit-grid,
  #hd-root #hd-page-editor.heto-editor-real-page #page-edit-grid,
  #hd-root #hd-page-editor.heto-v11-editor-refined #page-edit-grid{grid-template-columns:minmax(0,1fr)!important;}
  #hd-root #hd-page-editor #page-edit-right{display:none!important;}
}
@media(max-width:760px){
  #hd-root #hd-page-editor,
  #hd-root #hd-page-editor.heto-editor-real-page,
  #hd-root #hd-page-editor.heto-v11-editor-refined{--heto130-shell-x:12px;--heto130-shell-top:12px;}
  #hd-root #hd-page-editor #page-edit-grid{height:calc(100dvh - 112px)!important;}
}



/* HETO 2.1.133 — final coherence fixes */
#hd-root #hd-page-editor .v11e-tab,
#hd-root #hd-page-editor .v11e-tab.active,
#hd-root #hd-page-editor .hd-wiz-sector-mini,
#hd-root #hd-page-editor .hd-wiz-sector-mini.selected,
#hd-root #hd-page-editor .hd-choice-mini,
#hd-root #hd-page-editor .hd-choice-mini.selected,
#hd-root #hd-page-editor .wb-chip,
#hd-root #hd-page-editor .wb-chip.selected,
#hd-root #hd-page-editor .wb-chip.on{box-shadow:none!important;outline:none!important;}
#hd-root #hd-page-editor .v11e-tab::before,
#hd-root #hd-page-editor .v11e-tab::after,
#hd-root #hd-page-editor .hd-wiz-sector-mini::before,
#hd-root #hd-page-editor .hd-wiz-sector-mini::after,
#hd-root #hd-page-editor .hd-choice-mini::before,
#hd-root #hd-page-editor .hd-choice-mini::after,
#hd-root #hd-page-editor .wb-chip::before,
#hd-root #hd-page-editor .wb-chip::after{content:none!important;display:none!important;}
#hd-root #hd-page-editor .v11e-tabs{background:#fff!important;box-shadow:none!important;}
#hd-root #hd-page-editor .v11e-tab{position:relative!important;background:transparent!important;border-radius:0!important;}
#hd-root #hd-page-editor .v11e-tab.active{background:transparent!important;border-bottom:2px solid var(--heto130-blue)!important;}
#hd-root #hd-page-editor .hd-wiz-sector-mini.selected,
#hd-root #hd-page-editor .hd-choice-mini.selected,
#hd-root #hd-page-editor .wb-chip.selected,
#hd-root #hd-page-editor .wb-chip.on{background:#EBF0FF!important;border-color:#B8C8F8!important;color:#0C55F4!important;box-shadow:inset 0 0 0 1px rgba(184,200,248,.45)!important;}
#hd-root #hd-page-editor #page-edit-preview{max-width:none!important;}


/* HETO 2.1.163 — Mon Site full width/search/buttons */
#hd-root #heto-studio-pro .msx{width:100%!important;max-width:none!important;margin:0!important;box-sizing:border-box!important;}
#hd-root #heto-studio-pro #pan-site,#hd-root #heto-studio-pro #pan-site.on{width:100%!important;max-width:none!important;}
#hd-root #heto-studio-pro .ms-sec,#hd-root #heto-studio-pro .ms-banner,#hd-root #heto-studio-pro .ms-stats,#hd-root #heto-studio-pro .ms-mtabs{width:100%!important;max-width:none!important;box-sizing:border-box!important;}
#hd-root #heto-studio-pro .ms-tbar{width:100%!important;box-sizing:border-box!important;display:flex!important;align-items:center!important;gap:12px!important;}
#hd-root #heto-studio-pro .ms-tbar-search{flex:1 1 auto!important;width:auto!important;min-width:260px!important;max-width:none!important;box-sizing:border-box!important;}
#hd-root #heto-studio-pro .ms-tbar-search input{width:100%!important;min-width:0!important;}
#hd-root #heto-studio-pro .tb-search{flex:1 1 auto!important;width:auto!important;max-width:620px!important;min-width:360px!important;}
#hd-root #heto-studio-pro .tb-sv,#hd-root #heto-studio-pro .sv-s,#hd-root #heto-studio-pro .ms-tb-btn.pri,#hd-root #heto-studio-pro .ms-tb-btn.pri:hover,#hd-root #heto-studio-pro .ms-cn-btn,#hd-root #heto-studio-pro .ms-cn-btn:hover,#hd-root #heto-studio-pro .ms-mtab.on,#hd-root #heto-studio-pro .ms-mtab.on:hover,#hd-root button#hd-gift-code-btn,#hd-root .hd-gift-btn{color:#fff!important;-webkit-text-fill-color:#fff!important;}
#hd-root #heto-studio-pro .tb-sv svg,#hd-root #heto-studio-pro .sv-s svg,#hd-root #heto-studio-pro .ms-tb-btn.pri svg,#hd-root #heto-studio-pro .ms-cn-btn svg,#hd-root #heto-studio-pro .ms-mtab.on svg{color:#fff!important;stroke:#fff!important;}
@media(max-width:900px){#hd-root #heto-studio-pro .ms-tbar{flex-wrap:wrap!important;}#hd-root #heto-studio-pro .ms-tbar-search{flex:1 1 100%!important;width:100%!important;min-width:0!important;}#hd-root #heto-studio-pro .tb-search{min-width:180px!important;max-width:none!important;}}

#hd-root #heto-studio-pro .ms-tbar > div[style*="flex:1"]{display:none!important;flex:0 0 0!important;width:0!important;}
#hd-root #heto-studio-pro .ms-tbar .ms-tb-btn:first-of-type{margin-left:0!important;}


/* HETO 2.1.165 — Mon Site overview cleanup */
#hd-root #heto-studio-pro #pan-site,#hd-root #heto-studio-pro #pan-site.on{margin:0!important;padding:0!important;}
#hd-root #heto-studio-pro #pan-site .msx{width:100%!important;max-width:none!important;margin:0!important;padding:0 0 48px!important;box-sizing:border-box!important;}
#hd-root #heto-studio-pro #pan-site #ms-view-mgmt,#hd-root #heto-studio-pro #pan-site #ms-view-disco{margin-top:0!important;padding-top:0!important;}
#hd-root #heto-studio-pro #pan-site .ms-banner,#hd-root #heto-studio-pro #pan-site .ms-disco-hero{margin-top:0!important;}
#hd-root #heto-studio-pro #pan-site .ms-banner,#hd-root #heto-studio-pro #pan-site .ms-disco-hero,#hd-root #heto-studio-pro #pan-site .ms-search,#hd-root #heto-studio-pro #pan-site .ms-cats,#hd-root #heto-studio-pro #pan-site .ms-cn-grid,#hd-root #heto-studio-pro #pan-site .ms-manual,#hd-root #heto-studio-pro #pan-site .ms-stats,#hd-root #heto-studio-pro #pan-site .ms-mtabs,#hd-root #heto-studio-pro #pan-site .ms-sec{margin-left:0!important;margin-right:0!important;}
#hd-root #heto-studio-pro #pan-site .ms-stats{margin-top:0!important;}
#hd-root #heto-studio-pro #pan-site .ms-mtabs{margin-top:0!important;}


/* HETO 2.1.166 — correction globale des boutons / contraste / palette */
:root{--heto-btn-blue:#0C55F4;--heto-btn-blue-hover:#0846d5;--heto-btn-blue-soft:#EEF4FF;--heto-btn-border:#CFE0FF;--heto-btn-danger:#dc2626;--heto-btn-danger-soft:#FEF2F2;}

/* Boutons primaires : texte et icônes toujours blancs */
#hd-root button[style*="background:#0C55F4"],
#hd-root button[style*="background: #0C55F4"],
#hd-root button[style*="background:#5570F1"],
#hd-root button[style*="background: #5570F1"],
#hd-root button[style*="background:var(--hd-accent"],
#hd-root button[style*="background: var(--hd-accent"],
#hd-root .hd-btn-primary,
#hd-root .hd-btn-upgrade,
#hd-root .hd-btn[class*="primary"],
#hd-root .tb-sv,
#hd-root .sv-s,
#hd-root .hd-send-btn,
#hd-root .cx-send-btn,
#hd-root .cp-send,
#hd-root .hw-send,
#hd-root .cw-send,
#hd-root .hd-chat-preview-send,
#hd-root .hd-tc2-compose-send,
#hd-root .hd-tc2-vbar-send,
#hd-root .heto-pm-send,
#hd-root .ms-tb-btn.pri,
#hd-root .ms-cn-btn,
#hd-root .ms-mtab.on,
#hd-root .ms-banner .ms-bn-btn[data-ms-act="sync"]{
  background:var(--heto-btn-blue)!important;
  border-color:var(--heto-btn-blue)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  box-shadow:0 10px 24px rgba(12,85,244,.20)!important;
}
#hd-root button[style*="background:#0C55F4"] *,
#hd-root button[style*="background: #0C55F4"] *,
#hd-root button[style*="background:#5570F1"] *,
#hd-root button[style*="background: #5570F1"] *,
#hd-root button[style*="background:var(--hd-accent"] *,
#hd-root button[style*="background: var(--hd-accent"] *,
#hd-root .hd-btn-primary *,
#hd-root .hd-btn-upgrade *,
#hd-root .hd-btn[class*="primary"] *,
#hd-root .tb-sv *,
#hd-root .sv-s *,
#hd-root .hd-send-btn *,
#hd-root .cx-send-btn *,
#hd-root .cp-send *,
#hd-root .hw-send *,
#hd-root .cw-send *,
#hd-root .hd-chat-preview-send *,
#hd-root .hd-tc2-compose-send *,
#hd-root .hd-tc2-vbar-send *,
#hd-root .heto-pm-send *,
#hd-root .ms-tb-btn.pri *,
#hd-root .ms-cn-btn *,
#hd-root .ms-mtab.on *,
#hd-root .ms-banner .ms-bn-btn[data-ms-act="sync"] *{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  fill:none!important;
  stroke:#fff!important;
}
#hd-root button[style*="background:#0C55F4"] svg,
#hd-root button[style*="background: #0C55F4"] svg,
#hd-root button[style*="background:#5570F1"] svg,
#hd-root button[style*="background: #5570F1"] svg,
#hd-root button[style*="background:var(--hd-accent"] svg,
#hd-root button[style*="background: var(--hd-accent"] svg,
#hd-root .hd-btn-primary svg,
#hd-root .hd-btn-upgrade svg,
#hd-root .tb-sv svg,
#hd-root .sv-s svg,
#hd-root .hd-send-btn svg,
#hd-root .cx-send-btn svg,
#hd-root .cp-send svg,
#hd-root .hw-send svg,
#hd-root .cw-send svg,
#hd-root .hd-chat-preview-send svg,
#hd-root .hd-tc2-compose-send svg,
#hd-root .hd-tc2-vbar-send svg,
#hd-root .heto-pm-send svg,
#hd-root .ms-tb-btn.pri svg,
#hd-root .ms-cn-btn svg,
#hd-root .ms-mtab.on svg,
#hd-root .ms-banner .ms-bn-btn[data-ms-act="sync"] svg{
  color:#fff!important;
  stroke:#fff!important;
}
#hd-root button[style*="background:#0C55F4"]:hover,
#hd-root button[style*="background: #0C55F4"]:hover,
#hd-root button[style*="background:#5570F1"]:hover,
#hd-root button[style*="background: #5570F1"]:hover,
#hd-root .hd-btn-primary:hover,
#hd-root .tb-sv:hover,
#hd-root .sv-s:hover,
#hd-root .hd-send-btn:hover,
#hd-root .cx-send-btn:hover,
#hd-root .cp-send:hover,
#hd-root .hw-send:hover,
#hd-root .cw-send:hover,
#hd-root .hd-chat-preview-send:hover,
#hd-root .hd-tc2-compose-send:hover,
#hd-root .hd-tc2-vbar-send:hover,
#hd-root .heto-pm-send:hover,
#hd-root .ms-tb-btn.pri:hover,
#hd-root .ms-cn-btn:hover,
#hd-root .ms-mtab.on:hover,
#hd-root .ms-banner .ms-bn-btn[data-ms-act="sync"]:hover{
  background:var(--heto-btn-blue-hover)!important;
  border-color:var(--heto-btn-blue-hover)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

/* Boutons secondaires : plus de noir brut, même palette que le plugin */
#hd-root .ms-bn-btn,
#hd-root .ms-tb-btn:not(.pri),
#hd-root .cp-chip,
#hd-root .cx-tool-btn,
#hd-root .hd-side-action,
#hd-root .hd-btn:not(.hd-btn-primary):not(.hd-btn-upgrade):not(.hd-btn-danger):not(.tb-sv):not(.sv-s),
#hd-root button[class*="secondary"],
#hd-root .zb,
#hd-root .tb-b,
#hd-root .tb-u{
  background:#fff!important;
  border-color:var(--heto-btn-border)!important;
  color:#315EA8!important;
  -webkit-text-fill-color:#315EA8!important;
}
#hd-root .ms-bn-btn svg,
#hd-root .ms-tb-btn:not(.pri) svg,
#hd-root .cp-chip svg,
#hd-root .cx-tool-btn svg,
#hd-root .hd-side-action svg,
#hd-root .hd-btn:not(.hd-btn-primary):not(.hd-btn-upgrade):not(.hd-btn-danger):not(.tb-sv):not(.sv-s) svg,
#hd-root button[class*="secondary"] svg,
#hd-root .zb svg,
#hd-root .tb-b svg,
#hd-root .tb-u svg{
  color:#315EA8!important;
  stroke:#315EA8!important;
}
#hd-root .ms-bn-btn:hover,
#hd-root .ms-tb-btn:not(.pri):hover,
#hd-root .cp-chip:hover,
#hd-root .cx-tool-btn:hover,
#hd-root .hd-side-action:hover,
#hd-root .hd-btn:not(.hd-btn-primary):not(.hd-btn-upgrade):not(.hd-btn-danger):not(.tb-sv):not(.sv-s):hover,
#hd-root button[class*="secondary"]:hover,
#hd-root .zb:hover,
#hd-root .tb-b:hover{
  background:var(--heto-btn-blue-soft)!important;
  border-color:#9DBBFF!important;
  color:var(--heto-btn-blue)!important;
  -webkit-text-fill-color:var(--heto-btn-blue)!important;
}

/* Exceptions : boutons de déconnexion/destruction en rouge cohérent */
#hd-root .hd-btn-danger,
#hd-root .ms-bn-btn.danger,
#hd-root button[data-ms-act="disconnect"],
#hd-root button[class*="danger"],
#hd-root button[class*="delete"]{
  background:#fff!important;
  border-color:#FECACA!important;
  color:var(--heto-btn-danger)!important;
  -webkit-text-fill-color:var(--heto-btn-danger)!important;
  box-shadow:none!important;
}
#hd-root .hd-btn-danger:hover,
#hd-root .ms-bn-btn.danger:hover,
#hd-root button[data-ms-act="disconnect"]:hover,
#hd-root button[class*="danger"]:hover,
#hd-root button[class*="delete"]:hover{
  background:var(--heto-btn-danger-soft)!important;
  color:var(--heto-btn-danger)!important;
  -webkit-text-fill-color:var(--heto-btn-danger)!important;
}
#hd-root .hd-btn-danger svg,
#hd-root .ms-bn-btn.danger svg,
#hd-root button[data-ms-act="disconnect"] svg,
#hd-root button[class*="danger"] svg,
#hd-root button[class*="delete"] svg{stroke:var(--heto-btn-danger)!important;color:var(--heto-btn-danger)!important;}

/* Cartes plan / upgrade : texte blanc sur bouton bleu */
#hd-root .hd-plan-card .hd-btn-primary,
#hd-root .hd-plan-card [class*="upgrade"],
#hd-root [class*="plan"] button[style*="background:#5570F1"],
#hd-root [class*="plan"] button[style*="background:#0C55F4"]{
  background:linear-gradient(135deg,#5B6EF5,#0C55F4)!important;
  border-color:transparent!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}


/* HETO 2.1.177 — Mon Site compact + suppression Agent IA */
#hd-root [data-tab="agent"],
#heto-studio-editor [data-tab="agent"],
#hd-root .v11e-tab[data-tab="agent"],
#hd-root .hd-ed-tab[data-tab="agent"]{
  display:none!important;
}
#heto-mon-site-index .ms-disco-compact{padding-top:0!important;}
#heto-mon-site-index .ms-disco-compact .ms-cn-grid{margin-top:0!important;}
#heto-mon-site-index .ms-cn-btn-connected,
#heto-mon-site-index .ms-cn-btn-connected:hover,
#heto-studio-editor .ms-cn-btn-connected,
#heto-studio-editor .ms-cn-btn-connected:hover{
  background:#DCFCE7!important;
  color:#15803D!important;
  border-color:#BBF7D0!important;
  box-shadow:none!important;
  cursor:default!important;
}
#heto-mon-site-index #ms-prod-current-page,
#heto-studio-editor #ms-prod-current-page{
  min-width:56px!important;
  padding-left:12px!important;
  padding-right:12px!important;
}

/* HETO 2.1.178 — bouton du connecteur déjà actif = Connecté */
.heto-monsite-v2 .msv2-cn-btn.msv2-cn-btn-connected,
.heto-monsite-v2 .msv2-cn-btn.msv2-cn-btn-connected:hover,
.heto-monsite-v2 .msv2-cn-btn.msv2-cn-btn-connected:disabled,
#heto-mon-site-index .ms-cn-btn.ms-cn-btn-connected,
#heto-mon-site-index .ms-cn-btn.ms-cn-btn-connected:hover,
#heto-mon-site-index .ms-cn-btn.ms-cn-btn-connected:disabled,
#heto-studio-editor .ms-cn-btn.ms-cn-btn-connected,
#heto-studio-editor .ms-cn-btn.ms-cn-btn-connected:hover,
#heto-studio-editor .ms-cn-btn.ms-cn-btn-connected:disabled,
.msx .ms-cn-btn.ms-cn-btn-connected,
.msx .ms-cn-btn.ms-cn-btn-connected:hover,
.msx .ms-cn-btn.ms-cn-btn-connected:disabled{
  background:#DCFCE7!important;
  color:#15803D!important;
  -webkit-text-fill-color:#15803D!important;
  border-color:#BBF7D0!important;
  box-shadow:none!important;
  cursor:default!important;
  opacity:1!important;
}
.heto-monsite-v2 .msv2-cn-btn.msv2-cn-btn-connected svg,
#heto-mon-site-index .ms-cn-btn.ms-cn-btn-connected svg,
#heto-studio-editor .ms-cn-btn.ms-cn-btn-connected svg,
.msx .ms-cn-btn.ms-cn-btn-connected svg{
  color:#15803D!important;
  stroke:#15803D!important;
}
