
#aicw-icon{
 position:fixed;
 bottom:20px;
 right:20px;
 width:64px;
 height:64px;
 background:var(--btn);
 border-radius:50%;
 box-shadow:0 6px 18px rgba(0,0,0,.25);
 cursor:pointer;
 z-index:9999
}
#aicw-chat{
 position:fixed;
 bottom:100px;
 right:20px;
 width:420px;
 height:580px;
 background:#fff;
 border-radius:18px;
 box-shadow:0 10px 40px rgba(0,0,0,.3);
 display:none;
 flex-direction:column;
 z-index:9999;
 overflow:hidden
}
#aicw-chat.full{
 top:0;left:0;right:0;bottom:0;
 width:100%;height:100%;border-radius:0
}
.header{
 display:flex;
 justify-content:space-between;
 align-items:flex-start;
 padding:16px;
 background:var(--h);
 color:#fff;
 min-height:64px;
 position:relative;
}
.h-text{
 flex:1;
 margin-right:80px;
}
/* MODIFICATION : Utilisation des variables CSS personnalisées pour le titre */
.h-title{
 font-size:var(--title-size, 18px);
 font-weight:var(--title-weight, 600);
 margin-bottom:4px;
 color:var(--title-color, #fff);
}
/* MODIFICATION : Utilisation des variables CSS personnalisées pour le sous-titre */
.h-sub{
 font-size:var(--subtitle-size, 13px);
 font-weight:var(--subtitle-weight, 400);
 opacity:0.85;
 color:var(--subtitle-color, #fff);
}
.h-actions{
 position:absolute;
 top:12px;
 right:12px;
 display:flex;
 gap:2px;
 align-items:center;
}
.h-actions span{
 width:32px;
 height:32px;
 display:flex;
 align-items:center;
 justify-content:center;
 cursor:pointer;
 font-size:18px;
 font-weight:bold;
 border-radius:4px;
 transition:background 0.2s;
 color:#fff;
 line-height:1;
}
#aicw-close{
 font-size:16px;
 font-weight:bold;
}
.h-actions span:hover{
 background:rgba(255,255,255,0.2);
}
#aicw-msgs{flex:1;overflow:auto;padding:10px}
.msg{margin:8px 0;display:flex;align-items:flex-start}
.msg img{width:28px;height:28px;border-radius:50%;margin-right:6px}
.bot-content{background:var(--b);border-radius:10px;padding:6px 8px;color:var(--tb)}
.bot-name{font-size:11px;font-weight:600;margin-bottom:2px;opacity:.8}
.bot-text{font-size:14px}
.user-text{background:var(--u);color:var(--tu);padding:8px 10px;border-radius:10px}
.typing{display:none;padding:10px;font-size:13px;color:#666;font-style:italic}
.input{display:flex;border-top:1px solid #eee}
.input input{
 flex:1;
 border:none;
 padding:16px;
 font-size:14px;
 color:var(--ti);
 background:var(--ib)
}
.input button{border:none;background:var(--btn);color:#fff;padding:0 18px;cursor:pointer}
.disc{font-size:11px;padding:6px;color:#666}
@media(max-width:600px){
 #aicw-chat{width:95%;height:70%;right:2.5%;bottom:15%}
}

/* Clean B-3 launcher */
#aicw-icon {
  width: 68px;
  height: 68px;
  position: fixed;
  bottom: 32px;
  right: 24px;
  z-index: 999999;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#aicw-icon:hover {
  transform: translateY(-4px) scale(1.04);
}

/* Fullscreen: hide launcher icon on all devices */
body.aicw-fullscreen #aicw-icon,
body.aicw-fullscreen .aicw-launcher {
  display: none !important;
}

/* Mobile: agrandir les boutons +/− pour égaler le × */
@media (max-width: 768px) {
  .h-actions span {
    font-size: 24px !important;
  }
  #aicw-close {
    font-size: 16px !important;
  }
}

/* ---- Zone de fichier en attente ---- */
#aicw-file-preview {
 display: none;
 align-items: center;
 gap: 8px;
 padding: 6px 12px;
 background: #f8fafc;
 border-top: 1px solid #e2e8f0;
 font-size: 13px;
 color: #334155;
}
.file-preview-img {
 max-height: 48px;
 max-width: 64px;
 border-radius: 4px;
 object-fit: cover;
 flex-shrink: 0;
}
.file-preview-icon {
 font-size: 22px;
 flex-shrink: 0;
}
.file-preview-name {
 flex: 1;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}
.file-preview-remove {
 background: none;
 border: none;
 cursor: pointer;
 font-size: 14px;
 color: #94a3b8;
 padding: 0 4px;
 flex-shrink: 0;
 line-height: 1;
}
.file-preview-remove:hover { color: #ef4444; }

/* ---- Bouton pièce jointe ---- */
#aicw-attach-btn {
 display: flex;
 align-items: center;
 justify-content: center;
 width: 42px;
 font-size: 18px;
 cursor: pointer;
 color: #94a3b8;
 transition: color 0.2s;
 flex-shrink: 0;
 border-right: 1px solid #eee;
}
#aicw-attach-btn:hover { color: var(--btn); }

/* ---- Bulle fichier non-image dans le chat ---- */
.file-bubble {
 display: inline-flex;
 align-items: center;
 gap: 6px;
 background: rgba(0,0,0,0.07);
 border-radius: 6px;
 padding: 4px 8px;
 font-size: 13px;
 margin-top: 2px;
}
