.sssa-widget,
.sssa-dock-root{
  --sssa-orange:#ff6b00;
  --sssa-ink:#121212;
  --sssa-muted:#6f6f73;
  --sssa-line:#ececf0;
  --sssa-bg:#ffffff;
  font-family:inherit;
  color:var(--sssa-ink);
}
.sssa-widget{width:100%}
.sssa-shell{
  max-width:980px;
  margin:0 auto;
  padding:28px;
  border:1px solid var(--sssa-line);
  border-radius:28px;
  background:rgba(255,255,255,.97);
  box-shadow:0 24px 70px rgba(20,20,25,.07);
}
.sssa-heading{
  display:flex;
  align-items:center;
  gap:12px;
  justify-content:center;
  margin-bottom:18px;
}
.sssa-heading-brand{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}
.sssa-heading-copy{min-width:0}
.sssa-heading h2{
  margin:0;
  font-size:clamp(24px,3vw,38px);
  line-height:1.1;
  letter-spacing:-.03em;
  text-align:center;
}
.sssa-brand-logo{
  display:block;
  max-width:132px;
  max-height:48px;
  object-fit:contain;
}
.sssa-avatar-img{
  width:42px;
  height:42px;
  display:block;
  border-radius:50%;
  object-fit:cover;
}
.sssa-spark{color:var(--sssa-orange);font-size:28px}
.sssa-online{
  display:block;
  margin-top:2px;
  color:var(--sssa-muted);
  font-size:12px;
}
.sssa-form{
  display:flex;
  align-items:flex-end;
  gap:10px;
  padding:8px 8px 8px 18px;
  border:1px solid #ddddE4;
  border-radius:18px;
  background:#fff;
  box-shadow:0 8px 24px rgba(20,20,25,.04);
}
.sssa-form:focus-within{
  border-color:color-mix(in srgb,var(--sssa-orange),white 52%);
  box-shadow:0 0 0 4px color-mix(in srgb,var(--sssa-orange),transparent 90%);
}
.sssa-input{
  flex:1;
  min-height:42px;
  max-height:140px;
  resize:none;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  padding:10px 0!important;
  background:transparent!important;
  font:inherit;
  font-size:16px;
  line-height:1.4;
}
.sssa-input::placeholder{color:#929299}
.sssa-send{
  width:46px;
  height:46px;
  flex:0 0 46px;
  border:0;
  border-radius:14px;
  background:var(--sssa-orange);
  color:#fff;
  font-size:24px;
  line-height:1;
  cursor:pointer;
  transition:transform .15s ease,opacity .15s ease;
}
.sssa-send:hover{transform:translateY(-1px)}
.sssa-send:disabled{opacity:.45;cursor:wait}
.sssa-suggestions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:center;
  margin-top:14px;
}
.sssa-chip{
  border:1px solid #e7e7eb;
  border-radius:999px;
  background:#fafafa;
  color:#34343a;
  padding:8px 13px;
  font:inherit;
  font-size:13px;
  cursor:pointer;
}
.sssa-chip:hover{
  border-color:color-mix(in srgb,var(--sssa-orange),white 65%);
  background:color-mix(in srgb,var(--sssa-orange),white 95%);
}
.sssa-chat{
  max-height:500px;
  overflow:auto;
  margin:0 0 16px;
  padding:6px 4px 12px;
  scrollbar-width:thin;
}
.sssa-message{display:flex;margin:10px 0}
.sssa-message.sssa-user{justify-content:flex-end}
.sssa-message.sssa-assistant,
.sssa-message.sssa-error{justify-content:flex-start}
.sssa-bubble{
  max-width:min(78%,720px);
  padding:12px 15px;
  border-radius:16px;
  white-space:pre-wrap;
  line-height:1.52;
  font-size:15px;
}
.sssa-user .sssa-bubble{
  background:#171717;
  color:#fff;
  border-bottom-right-radius:5px;
}
.sssa-assistant .sssa-bubble{
  background:#f6f6f8;
  color:#222;
  border-bottom-left-radius:5px;
}
.sssa-error .sssa-bubble{background:#fff2f0;color:#8f1d14}
.sssa-typing .sssa-bubble{color:var(--sssa-muted);font-style:italic}
.sssa-footer{text-align:center;margin-top:12px}
.sssa-new-chat{
  border:0;
  background:transparent;
  color:var(--sssa-muted);
  cursor:pointer;
  text-decoration:underline;
  font:inherit;
  font-size:13px;
}
.sssa-active .sssa-heading{justify-content:flex-start}
.sssa-active .sssa-heading h2{font-size:20px;text-align:left}

/* Automatic launcher */
.sssa-dock-root{
  position:fixed;
  z-index:999999;
  bottom:22px;
}
.sssa-position-right{right:22px}
.sssa-position-left{left:22px}
.sssa-launcher{
  display:flex;
  align-items:center;
  gap:10px;
  border:0;
  border-radius:999px;
  padding:8px 14px 8px 8px;
  background:#171717;
  color:#fff;
  box-shadow:0 16px 38px rgba(0,0,0,.22);
  cursor:pointer;
  font:inherit;
  font-weight:700;
}
.sssa-launcher-avatar{
  display:flex;
  width:48px;
  height:48px;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#fff;
  overflow:hidden;
}
.sssa-launcher-avatar .sssa-avatar-img{
  width:100%;
  height:100%;
}
.sssa-launcher-avatar .sssa-spark{
  color:var(--sssa-orange);
  font-size:28px;
}
.sssa-launcher-label{white-space:nowrap}
.sssa-dock-panel{
  position:absolute;
  bottom:72px;
  width:min(390px,calc(100vw - 28px));
}
.sssa-position-right .sssa-dock-panel{right:0}
.sssa-position-left .sssa-dock-panel{left:0}
.sssa-dock-panel .sssa-shell{
  padding:18px;
  border-radius:22px;
  box-shadow:0 30px 80px rgba(0,0,0,.18);
}
.sssa-dock-panel .sssa-heading{
  justify-content:flex-start;
  padding-right:28px;
}
.sssa-dock-panel .sssa-heading h2{
  font-size:20px;
  text-align:left;
}
.sssa-dock-panel .sssa-brand-logo{max-width:104px;max-height:38px}
.sssa-dock-panel .sssa-chat{max-height:min(46vh,420px)}
.sssa-dock-panel .sssa-suggestions{
  justify-content:flex-start;
  flex-wrap:nowrap;
  overflow-x:auto;
  padding-bottom:4px;
}
.sssa-dock-panel .sssa-chip{white-space:nowrap}
.sssa-close{
  position:absolute;
  z-index:3;
  top:12px;
  right:12px;
  width:32px;
  height:32px;
  border:0;
  border-radius:50%;
  background:#f3f3f5;
  color:#333;
  font-size:22px;
  cursor:pointer;
}

/* Sidebar */
.sssa-dock-sidebar .sssa-dock-panel{
  position:fixed;
  top:0;
  bottom:0;
  width:min(460px,100vw);
  height:100dvh;
}
.sssa-position-right.sssa-dock-sidebar .sssa-dock-panel{right:0;left:auto}
.sssa-position-left.sssa-dock-sidebar .sssa-dock-panel{left:0;right:auto}
.sssa-dock-sidebar .sssa-dock-panel .sssa-widget,
.sssa-dock-sidebar .sssa-dock-panel .sssa-shell{
  height:100%;
}
.sssa-dock-sidebar .sssa-dock-panel .sssa-shell{
  max-width:none;
  border-radius:0;
  border:0;
  display:flex;
  flex-direction:column;
  padding:24px;
}
.sssa-dock-sidebar .sssa-dock-panel .sssa-chat{
  flex:1;
  max-height:none;
  min-height:180px;
}
.sssa-backdrop{
  position:fixed;
  inset:0;
  background:rgba(8,8,12,.38);
  backdrop-filter:blur(2px);
  z-index:-1;
}
.sssa-dock-sidebar.sssa-open{z-index:1000000}
.sssa-dock-sidebar.sssa-open .sssa-backdrop{z-index:-1}

@media(max-width:640px){
  .sssa-shell{padding:18px;border-radius:20px}
  .sssa-heading{justify-content:flex-start}
  .sssa-heading h2{font-size:24px;text-align:left}
  .sssa-bubble{max-width:90%}
  .sssa-suggestions{
    justify-content:flex-start;
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:4px;
  }
  .sssa-chip{white-space:nowrap}
  .sssa-dock-root{bottom:14px}
  .sssa-position-right{right:14px}
  .sssa-position-left{left:14px}
  .sssa-launcher{padding-right:10px}
  .sssa-launcher-label{display:none}
  .sssa-dock-panel{bottom:66px}
  .sssa-dock-floating .sssa-dock-panel{
    width:calc(100vw - 28px);
  }
}
@media(prefers-reduced-motion:reduce){
  .sssa-send,.sssa-chat{scroll-behavior:auto!important;transition:none!important}
}

/* 0.2.2 — état d'ouverture explicite, indépendant des styles du thème. */
.sssa-dock-panel[hidden],
.sssa-backdrop[hidden]{
  display:none!important;
}
.sssa-dock-panel:not([hidden]){
  display:block!important;
}
.sssa-backdrop:not([hidden]){
  display:block!important;
}
