/* Soniga Chatbot - styles. Variables modifiables en tête de fichier. */
.sgcb-root{
  --sg-navy:#0a2342; --sg-navy2:#16406d; --sg-gold:#d4a437; --sg-gold-d:#b98a22;
  --sg-blue:#086f9c; --sg-cyan:#0fa9d6; --sg-cyan-l:#7ee8fa; --sg-teal:#6fc4bf;
  --sg-bg:#f3f7fa; --sg-text:#12202f; --sg-muted:#51606f; --sg-line:#dbe6ee;
  --sg-radius:16px; --sg-font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --sg-fs:15px;
  font-family:var(--sg-font); font-size:var(--sg-fs); line-height:1.5; color:var(--sg-text);
}
.sgcb-root *, .sgcb-root *::before, .sgcb-root *::after{box-sizing:border-box;font-family:inherit}
:where(.sgcb-root) :is(button,input,textarea,select){font-size:inherit;line-height:1.4;margin:0;letter-spacing:normal;text-transform:none}
:where(.sgcb-root) button{cursor:pointer;border:0;background:none;padding:0;color:inherit;box-shadow:none;text-decoration:none}
:where(.sgcb-root) label{font-weight:400;margin:0}
.sgcb-root [hidden]{display:none !important}
.sgcb-root svg{display:block}

/* Position : gauche ou droite */
.sgcb-pos-right .sgcb-launcher,.sgcb-pos-right .sgcb-panel{right:var(--sg-x,20px)}
.sgcb-pos-left .sgcb-launcher,.sgcb-pos-left .sgcb-panel{left:var(--sg-x,20px)}
.sgcb-pos-right .sgcb-teaser{right:calc(var(--sg-x,20px) + 76px)}
.sgcb-pos-left .sgcb-teaser{left:calc(var(--sg-x,20px) + 76px);border-radius:14px 14px 14px 4px}
.sgcb-pos-left .sgcb-panel{transform-origin:bottom left}

/* Bouton rond */
.sgcb-launcher{position:fixed;bottom:var(--sg-y,20px);width:64px;height:64px;border-radius:50%;z-index:99998;
  box-shadow:0 6px 20px rgba(7,26,51,.35);transition:transform .2s ease, box-shadow .2s ease;background:var(--sg-navy)}
.sgcb-launcher:hover{transform:scale(1.06);box-shadow:0 8px 26px rgba(7,26,51,.45)}
.sgcb-launcher:focus-visible, .sgcb-root button:focus-visible, .sgcb-root a:focus-visible,
.sgcb-root input:focus-visible, .sgcb-root textarea:focus-visible, .sgcb-root select:focus-visible{outline:3px solid var(--sg-cyan);outline-offset:2px}
.sgcb-launcher svg{width:100%;height:100%}
.sgcb-launcher.sgcb-hide{display:none}
.sgcb-teaser{position:fixed;bottom:calc(var(--sg-y,20px) + 14px);max-width:230px;z-index:99998;background:#fff;color:var(--sg-text);
  padding:10px 30px 10px 14px;border-radius:14px 14px 4px 14px;box-shadow:0 6px 22px rgba(7,26,51,.25);
  font-size:14px;animation:sgcb-pop .35s ease both}
.sgcb-teaser button.sgcb-teaser-x{position:absolute;top:4px;right:6px;width:22px;height:22px;color:var(--sg-muted);font-size:18px;line-height:20px}
.sgcb-teaser .sgcb-teaser-t{cursor:pointer;display:block;text-align:left}

/* Fenêtre */
.sgcb-panel{position:fixed;bottom:var(--sg-y,20px);width:392px;height:min(640px,calc(100dvh - 40px));z-index:99999;
  display:flex;flex-direction:column;background:#fff;border-radius:var(--sg-radius);overflow:hidden;
  box-shadow:0 16px 48px rgba(7,26,51,.38);animation:sgcb-pop .25s ease both;transform-origin:bottom right}
.sgcb-head{display:flex;align-items:center;gap:10px;padding:12px 12px 12px 14px;color:#fff;
  background:linear-gradient(135deg,var(--sg-navy),var(--sg-navy2));border-bottom:3px solid var(--sg-gold);flex:0 0 auto}
.sgcb-head-ico{width:40px;height:40px;flex:0 0 40px}
.sgcb-head-ico svg{width:100%;height:100%}
.sgcb-head-t{flex:1;min-width:0}
.sgcb-head-n{font-weight:700;font-size:16px;line-height:1.2}
.sgcb-head-s{font-size:12px;opacity:.85;line-height:1.2}
.sgcb-hbtn{width:34px;height:34px;border-radius:8px;display:flex;align-items:center;justify-content:center;color:#fff;opacity:.9}
.sgcb-hbtn:hover{background:rgba(255,255,255,.14);opacity:1}
.sgcb-hbtn svg{width:20px;height:20px}

.sgcb-msgs{flex:1 1 auto;overflow-y:auto;padding:14px;background:var(--sg-bg);display:flex;flex-direction:column;gap:10px;
  scroll-behavior:smooth;overscroll-behavior:contain}
.sgcb-welcome{text-align:center;padding:6px 6px 2px}
.sgcb-welcome-ico{width:84px;height:84px;margin:0 auto 6px}
.sgcb-welcome-ico svg{width:100%;height:100%}
.sgcb-welcome-n{font-weight:700;color:var(--sg-navy);font-size:17px}
.sgcb-welcome-t{margin:6px 0 12px;color:var(--sg-text);white-space:pre-line}
.sgcb-chips{display:flex;flex-direction:column;gap:8px;align-items:stretch}
.sgcb-chip{padding:9px 12px;border:1.5px solid var(--sg-blue);color:var(--sg-blue);background:#fff;border-radius:999px;text-align:center;font-weight:600;font-size:14px;transition:background .15s,color .15s}
.sgcb-chip:hover{background:var(--sg-blue);color:#fff}

.sgcb-row{display:flex;flex-direction:column;max-width:88%;animation:sgcb-in .25s ease both}
.sgcb-row.sgcb-user{align-self:flex-end;align-items:flex-end}
.sgcb-row.sgcb-bot{align-self:flex-start;align-items:flex-start}
.sgcb-bubble{padding:10px 13px;border-radius:14px;word-wrap:break-word;overflow-wrap:anywhere}
.sgcb-user .sgcb-bubble{background:var(--sg-blue);color:#fff;border-bottom-right-radius:4px;white-space:pre-wrap}
.sgcb-bot .sgcb-bubble{background:#fff;color:var(--sg-text);border:1px solid var(--sg-line);border-bottom-left-radius:4px}
.sgcb-bot .sgcb-bubble{padding:12px 15px;line-height:1.6}
.sgcb-bubble p{margin:0 0 12px}.sgcb-bubble p:last-child{margin-bottom:0}
.sgcb-bubble ul{margin:0 0 12px;padding-left:0;list-style:none}.sgcb-bubble ul:last-child{margin-bottom:0}
.sgcb-bubble li{margin:0 0 8px;padding:8px 10px 8px 12px;background:var(--sg-bg);border-left:3px solid var(--sg-cyan);border-radius:0 8px 8px 0}
.sgcb-bubble li:last-child{margin-bottom:0}
.sgcb-bubble strong{font-weight:700;color:var(--sg-navy)}
.sgcb-root .sgcb-bubble a.sgcb-inline,.sgcb-root .sgcb-bubble a.sgcb-inline:is(:hover,:focus,:active,:visited){font-weight:700;color:var(--sg-blue);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:2px}
.sgcb-root .sgcb-bubble a.sgcb-inline:hover{color:var(--sg-navy);background:rgba(15,169,214,.12);border-radius:3px}

.sgcb-extras{display:flex;flex-direction:column;gap:6px;margin-top:8px;align-items:flex-start;max-width:100%}
.sgcb-link{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;background:#fff;border:1.5px solid var(--sg-teal);color:var(--sg-navy) !important;
  border-radius:10px;font-weight:600;font-size:14px;text-decoration:none !important;max-width:100%}
.sgcb-link:hover{background:var(--sg-teal);color:#fff !important}
.sgcb-link svg{width:14px;height:14px;flex:0 0 14px}
.sgcb-link span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sgcb-cta{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:9px 14px;background:var(--sg-gold);color:var(--sg-navy) !important;
  border-radius:10px;font-weight:700;font-size:14px;text-decoration:none !important;transition:background .15s}
.sgcb-cta:hover{background:var(--sg-gold-d)}
.sgcb-fb{display:flex;gap:4px;margin-top:2px}
.sgcb-fb button{width:30px;height:30px;border-radius:8px;color:var(--sg-muted);display:flex;align-items:center;justify-content:center}
.sgcb-fb button:hover{background:#e3edf3;color:var(--sg-navy)}
.sgcb-fb button[aria-pressed="true"]{color:var(--sg-blue);background:#e3edf3}
.sgcb-fb svg{width:16px;height:16px}

/* Indicateur : Nao qui écrit */
.sgcb-typing{display:inline-flex;align-items:center;gap:9px;padding:9px 13px;background:#fff;border:1px solid var(--sg-line);border-radius:14px;border-bottom-left-radius:4px}
.sgcb-eyes{display:flex;gap:5px}
.sgcb-eyes i{width:9px;height:9px;border-radius:50%;background:var(--sg-navy);animation:sgcb-blink 2.4s infinite}
.sgcb-eyes i:nth-child(2){animation-delay:.05s}
.sgcb-wave{width:34px;height:10px;overflow:hidden;border-radius:5px;background:var(--sg-cyan-l)}
.sgcb-wave svg{width:68px;height:10px;animation:sgcb-wave 1.1s linear infinite}
.sgcb-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Cartes formulaires */
.sgcb-card{align-self:stretch;max-width:100%;background:#fff;border:1.5px solid var(--sg-gold);border-radius:14px;padding:12px;animation:sgcb-in .25s ease both}
.sgcb-card h3{margin:0 0 8px;font-size:15px;font-weight:700;color:var(--sg-navy)}
.sgcb-f{margin-bottom:8px}
.sgcb-f label{display:block;font-size:13px;font-weight:600;margin-bottom:3px;color:var(--sg-navy)}
.sgcb-f input[type=text],.sgcb-f input[type=tel],.sgcb-f input[type=email],.sgcb-f textarea,.sgcb-f select{width:100%;padding:8px 10px;border:1.5px solid #b9c9d6;border-radius:8px;background:#fff;color:var(--sg-text);font-size:16px}
.sgcb-f textarea{resize:vertical;min-height:54px}
.sgcb-two{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.sgcb-f.sgcb-err input,.sgcb-f.sgcb-err textarea,.sgcb-f.sgcb-err select{border-color:#c0392b}
.sgcb-em{color:#c0392b;font-size:12.5px;margin-top:3px}
.sgcb-chk{font-weight:400 !important;display:flex;gap:8px;align-items:flex-start;font-size:12.5px;color:var(--sg-muted);margin:4px 0 8px}
.sgcb-chk input{margin-top:3px;flex:0 0 auto;width:16px;height:16px}
.sgcb-chk a{color:var(--sg-blue);text-decoration:underline}
.sgcb-hp{position:absolute !important;left:-9999px !important;width:1px;height:1px;opacity:0}
.sgcb-btns{display:flex;gap:8px;flex-wrap:wrap}
.sgcb-btn{padding:9px 14px;border-radius:10px;font-weight:700;font-size:14px}
.sgcb-btn.sgcb-p{background:var(--sg-gold);color:var(--sg-navy)}
.sgcb-btn.sgcb-p:hover{background:var(--sg-gold-d)}
.sgcb-btn.sgcb-p[disabled]{opacity:.6;cursor:wait}
.sgcb-btn.sgcb-s{color:var(--sg-muted);border:1.5px solid var(--sg-line);background:#fff}
.sgcb-fmsg{font-size:13px;margin-top:6px}

/* Bas de fenêtre */
.sgcb-tools{display:flex;gap:6px;flex-wrap:wrap;padding:6px 12px 0;padding-bottom:6px;background:#fff;border-top:1px solid var(--sg-line);flex:0 0 auto}
.sgcb-tool{font-size:12.5px;font-weight:600;color:var(--sg-blue);padding:4px 8px;border-radius:999px;border:1px solid var(--sg-line);background:#fff}
.sgcb-tool:hover{background:var(--sg-bg)}
.sgcb-form{display:flex;gap:8px;align-items:flex-end;padding:8px 12px;background:#fff;flex:0 0 auto}
.sgcb-form{border-top:1px solid var(--sg-line)}
.sgcb-input{flex:1;resize:none;max-height:110px;min-height:42px;padding:10px 12px;border:1.5px solid #b9c9d6;border-radius:12px;background:#fff;color:var(--sg-text);font-size:16px;line-height:1.35}
.sgcb-input:focus{border-color:var(--sg-cyan)}
.sgcb-send{width:42px;height:42px;border-radius:50%;background:var(--sg-gold);color:var(--sg-navy);display:flex;align-items:center;justify-content:center;flex:0 0 42px}
.sgcb-send:hover{background:var(--sg-gold-d)}
.sgcb-send[disabled]{opacity:.5;cursor:default}
.sgcb-send svg{width:20px;height:20px}
.sgcb-foot{padding:0 12px 8px;background:#fff;font-size:11.5px;color:var(--sg-muted);text-align:center;flex:0 0 auto}

@keyframes sgcb-pop{from{opacity:0;transform:scale(.92) translateY(10px)}to{opacity:1;transform:none}}
@keyframes sgcb-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes sgcb-blink{0%,92%,100%{transform:scaleY(1)}95%{transform:scaleY(.1)}}
@keyframes sgcb-wave{from{transform:translateX(0)}to{transform:translateX(-34px)}}

@media (max-width:600px){
  .sgcb-root .sgcb-panel{inset:0;width:100%;height:100dvh;border-radius:0;transform-origin:center bottom}
  .sgcb-launcher{width:60px;height:60px}
  .sgcb-pos-right .sgcb-launcher{right:max(14px,calc(var(--sg-x,20px) - 6px))}
  .sgcb-pos-left .sgcb-launcher{left:max(14px,calc(var(--sg-x,20px) - 6px))}
  .sgcb-teaser{max-width:200px}
  .sgcb-pos-right .sgcb-teaser{right:84px}
  .sgcb-pos-left .sgcb-teaser{left:84px}
  .sgcb-row{max-width:92%}
  .sgcb-form{padding-bottom:max(8px,env(safe-area-inset-bottom))}
}
@media (prefers-reduced-motion:reduce){
  .sgcb-root *,.sgcb-root *::before{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition:none !important;scroll-behavior:auto !important}
}

/* Protection contre les styles de boutons du thème (survol, focus, clic) */
.sgcb-root .sgcb-launcher,.sgcb-root .sgcb-launcher:is(:hover,:focus,:active){background:var(--sg-navy);color:#fff;border:0;border-radius:50%;padding:0;text-decoration:none}
.sgcb-root .sgcb-hbtn,.sgcb-root .sgcb-hbtn:is(:focus,:active){background:transparent;color:#fff;border:0;text-decoration:none}
.sgcb-root .sgcb-hbtn:hover{background:rgba(255,255,255,.14);color:#fff}
.sgcb-root .sgcb-chip,.sgcb-root .sgcb-chip:is(:focus,:active){background:#fff;color:var(--sg-blue)}
.sgcb-root .sgcb-chip:hover{background:var(--sg-blue);color:#fff}
.sgcb-root .sgcb-tool,.sgcb-root .sgcb-tool:is(:focus,:active){background:#fff;color:var(--sg-blue)}
.sgcb-root .sgcb-tool:hover{background:var(--sg-bg);color:var(--sg-blue)}
.sgcb-root .sgcb-send,.sgcb-root .sgcb-send:is(:focus,:active){background:var(--sg-gold);color:var(--sg-navy)}
.sgcb-root .sgcb-send:hover{background:var(--sg-gold-d);color:var(--sg-navy)}
.sgcb-root button.sgcb-cta,.sgcb-root button.sgcb-cta:is(:focus,:active){background:var(--sg-gold);color:var(--sg-navy);border:0}
.sgcb-root button.sgcb-cta:hover{background:var(--sg-gold-d);color:var(--sg-navy)}
.sgcb-root .sgcb-btn.sgcb-p,.sgcb-root .sgcb-btn.sgcb-p:is(:focus,:active){background:var(--sg-gold);color:var(--sg-navy)}
.sgcb-root .sgcb-btn.sgcb-p:hover{background:var(--sg-gold-d);color:var(--sg-navy)}
.sgcb-root .sgcb-btn.sgcb-s,.sgcb-root .sgcb-btn.sgcb-s:is(:hover,:focus,:active){background:#fff;color:var(--sg-muted)}
.sgcb-root .sgcb-fb button,.sgcb-root .sgcb-fb button:is(:focus,:active){background:transparent;color:var(--sg-muted)}
.sgcb-root .sgcb-fb button:hover,.sgcb-root .sgcb-fb button[aria-pressed="true"]{background:#e3edf3;color:var(--sg-navy)}
.sgcb-root .sgcb-teaser button,.sgcb-root .sgcb-teaser button:is(:hover,:focus,:active){background:transparent;color:var(--sg-text);border:0}
.sgcb-root .sgcb-teaser button.sgcb-teaser-x,.sgcb-root .sgcb-teaser button.sgcb-teaser-x:is(:hover,:focus,:active){color:var(--sg-muted)}
.sgcb-root a.sgcb-link,.sgcb-root a.sgcb-link:is(:focus,:active){color:var(--sg-navy) !important}
.sgcb-root a.sgcb-link:hover{color:#fff !important}
.sgcb-root button.sgcb-tool{border:1px solid var(--sg-line);border-radius:999px;padding:4px 8px}
.sgcb-root button.sgcb-chip{border:1.5px solid var(--sg-blue);border-radius:999px;padding:9px 12px}
.sgcb-root button.sgcb-send{border:0;border-radius:50%;padding:0}
.sgcb-root button.sgcb-hbtn{border:0;border-radius:8px;padding:0}
.sgcb-root .sgcb-fb button{border:0;border-radius:8px;padding:0}
.sgcb-root button.sgcb-btn{border-radius:10px;padding:9px 14px;border:0}
.sgcb-root button.sgcb-btn.sgcb-s{border:1.5px solid var(--sg-line)}
.sgcb-root button.sgcb-cta{border-radius:10px;padding:9px 14px}
.sgcb-root .sgcb-teaser button{border:0;border-radius:0;padding:0}
.sgcb-root .sgcb-teaser button.sgcb-teaser-x{padding:0}
.sgcb-root .sgcb-bubble a.sgcb-inline[href^="tel:"]{white-space:nowrap}

.sgcb-contact{width:100%;box-sizing:border-box;background:#fff;border:1.5px solid var(--sg-teal);border-left-width:4px;border-radius:12px;padding:11px 13px;display:flex;flex-direction:column;gap:6px;font-size:14px;line-height:1.4;color:var(--sg-navy)}
.sgcb-contact-t{font-weight:700;font-size:14px}
.sgcb-contact-r{display:flex;gap:8px;align-items:baseline}
.sgcb-contact-k{flex:0 0 74px;color:var(--sg-muted);font-size:13px}
.sgcb-contact-v{font-weight:600;flex:1 1 auto;min-width:0;overflow-wrap:anywhere}
.sgcb-contact-v a{color:var(--sg-navy) !important;text-decoration:underline !important;white-space:nowrap}
.sgcb-contact-a{display:flex;gap:8px;flex-wrap:wrap;margin-top:4px}
.sgcb-contact-a .sgcb-cta{flex:1 1 120px}
.sgcb-root .sgcb-cta.sgcb-cta2{background:#fff;border:1.5px solid var(--sg-navy);color:var(--sg-navy) !important}
.sgcb-root .sgcb-cta.sgcb-cta2:hover{background:var(--sg-navy);color:#fff !important}

/* Formulaires (rappel, envoi de la conversation) : plus compacts, titres décollés des champs, bouton d'envoi centré */
.sgcb-root .sgcb-card{padding:14px;box-sizing:border-box}
.sgcb-root .sgcb-card h3{margin:0 0 10px;padding:0;line-height:1.3}
.sgcb-root .sgcb-f{margin:0 0 10px;padding:0}
.sgcb-root .sgcb-f label{display:block;margin:0 0 5px;padding:0;line-height:1.3;font-size:13px}
.sgcb-root .sgcb-f input[type=text],.sgcb-root .sgcb-f input[type=tel],.sgcb-root .sgcb-f input[type=email],.sgcb-root .sgcb-f select{box-sizing:border-box;display:block;margin:0;height:38px;padding:0 10px;line-height:1.3}
.sgcb-root .sgcb-f textarea{box-sizing:border-box;display:block;margin:0;min-height:44px;padding:8px 10px;line-height:1.35}
.sgcb-root .sgcb-two{gap:10px}
.sgcb-root .sgcb-chk{margin:2px 0 10px;line-height:1.35;align-items:flex-start}
.sgcb-root .sgcb-chk input{margin:2px 0 0}
.sgcb-root .sgcb-btns{gap:8px;margin-top:2px}
.sgcb-root button.sgcb-btn{padding:8px 14px;line-height:1.25}
.sgcb-root .sgcb-fmsg{margin-top:8px;line-height:1.35}
.sgcb-root button.sgcb-send{display:flex;align-items:center;justify-content:center;padding:0;line-height:0}
.sgcb-root button.sgcb-send svg{display:block;flex:none;margin:0;width:20px;height:20px;transform:translateX(1px)}
.sgcb-root .sgcb-f label.sgcb-chk{display:flex;gap:8px;align-items:flex-start;margin:0;font-size:12.5px;line-height:1.35;font-weight:400}
.sgcb-root .sgcb-f label.sgcb-chk input{flex:0 0 16px;width:16px;height:16px;margin:1px 0 0;padding:0}
