/* =========================================================
   COBAT V2.1.12 — correction graphique du sélecteur de chat
   - proportions CHANTIER / COBAT harmonisées
   - aucun chevauchement avec les messages
   - titre, présence et onglets correctement espacés
   ========================================================= */

/* En-tête du chat : neutralise les anciennes hauteurs forcées. */
#v1200Shell .v2107-chat-column .chat-panel .side-panel-header.chat-header{
  box-sizing:border-box!important;
  height:auto!important;
  min-height:74px!important;
  padding:7px 11px 7px!important;
  overflow:visible!important;
  flex:0 0 auto!important;
  position:relative!important;
  z-index:6!important;
  align-items:stretch!important;
}
#v1200Shell .v2107-chat-column .chat-panel .chat-header-main{
  width:100%!important;
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
}
#v1200Shell .v2107-chat-column .chat-panel .chat-title-line{
  min-height:13px!important;
  margin:0!important;
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  line-height:1.1!important;
}
#v1200Shell .v2107-chat-column .chat-panel .side-panel-title.chat-title-line{
  font-size:9.5px!important;
}

/* Sélecteur deux salons : même largeur, même hauteur, contour propre. */
#v1200Shell .v2107-chat-column .chat-panel .chat-tabs{
  box-sizing:border-box!important;
  width:100%!important;
  height:33px!important;
  min-height:33px!important;
  margin:5px 0 0!important;
  padding:2px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:2px!important;
  border:1px solid #d8e5f2!important;
  border-radius:9px!important;
  background:#eef4fa!important;
  overflow:hidden!important;
  position:relative!important;
  z-index:8!important;
  pointer-events:auto!important;
}
#v1200Shell .v2107-chat-column .chat-panel .chat-tab{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  height:27px!important;
  min-height:27px!important;
  margin:0!important;
  padding:0 8px!important;
  border:0!important;
  border-radius:7px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  background:transparent!important;
  color:#61758a!important;
  font-size:9px!important;
  font-weight:800!important;
  line-height:1!important;
  letter-spacing:.15px!important;
  white-space:nowrap!important;
  cursor:pointer!important;
  position:relative!important;
  z-index:9!important;
  pointer-events:auto!important;
  touch-action:manipulation!important;
  box-shadow:none!important;
}
#v1200Shell .v2107-chat-column .chat-panel .chat-tab.active{
  background:#fff!important;
  color:#075db9!important;
  box-shadow:0 1px 3px rgba(22,68,108,.12)!important;
}
#v1200Shell .v2107-chat-column .chat-panel .chat-tab:hover:not(.active){
  background:rgba(255,255,255,.55)!important;
  color:#315f88!important;
}
#v1200Shell .v2107-chat-column .chat-panel .chat-tab:focus-visible{
  outline:2px solid rgba(11,93,184,.35)!important;
  outline-offset:-2px!important;
}
#v1200Shell .v2107-chat-column .chat-panel .chat-tab-badge,
#v1200Shell .v2107-chat-column .chat-panel .chat-unread-badge{
  box-sizing:border-box!important;
  min-width:16px!important;
  height:16px!important;
  padding:0 4px!important;
  border-radius:999px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:7.5px!important;
  line-height:1!important;
}
#v1200Shell .v2107-chat-column .chat-panel .chat-tab-badge[hidden],
#v1200Shell .v2107-chat-column .chat-panel .chat-unread-badge[hidden]{display:none!important}

/* Le nom du salon est redondant avec les deux onglets : on garde l'information
   pour le JS/accessibilité, mais on ne consomme pas de hauteur visuelle. */
#v1200Shell .v2107-chat-column .chat-panel .chat-channel-name{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}
#v1200Shell .v2107-chat-column .chat-panel .chat-online{
  box-sizing:border-box!important;
  min-height:12px!important;
  margin:4px 0 0!important;
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  font-size:7.5px!important;
  line-height:1.15!important;
  color:#7d8d9c!important;
}
#v1200Shell .v2107-chat-column .chat-panel .chat-online .live-dot{
  width:7px!important;
  height:7px!important;
  flex:0 0 7px!important;
}

/* La liste des messages commence après l'en-tête, sans couche superposée. */
#v1200Shell .v2107-chat-column .chat-panel .chat-messages{
  position:relative!important;
  z-index:1!important;
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
  padding:10px 11px!important;
}

/* Conserve la lisibilité du chat introduite précédemment. */
#v1200Shell .v2107-chat-column .chat-panel .chat-message{margin-bottom:8px!important}
#v1200Shell .v2107-chat-column .chat-panel .chat-bubble{
  font-size:10px!important;
  line-height:1.35!important;
  padding:7px 9px!important;
  border-radius:9px!important;
}
#v1200Shell .v2107-chat-column .chat-panel .chat-author{font-size:8px!important}
#v1200Shell .v2107-chat-column .chat-panel .chat-role{font-size:6.8px!important}
#v1200Shell .v2107-chat-column .chat-panel .chat-time{font-size:6.8px!important}
#v1200Shell .v2107-chat-column .chat-panel .chat-composer{
  position:relative!important;
  grid-template-columns:minmax(0,1fr) 36px!important;
  padding:8px!important;
  overflow:visible!important;
}
#v1200Shell .v2107-chat-column .chat-panel .chat-composer input{
  height:36px!important;
  font-size:9.5px!important;
  padding:0 11px!important;
}
#v1200Shell .v2107-chat-column .chat-panel .chat-composer button{height:36px!important}

/* Mentions @ */
.chat-mention{display:inline;padding:1px 4px;border-radius:5px;background:rgba(28,108,199,.12);color:#0b5db8;font-weight:800}
.chat-message.me .chat-mention{background:rgba(255,255,255,.22);color:inherit}
.chat-mention-pop{position:absolute;left:8px;right:50px;bottom:52px;z-index:45;max-height:220px;overflow:auto;background:#fff;border:1px solid #d5e4f2;border-radius:11px;box-shadow:0 12px 30px rgba(18,53,87,.18);padding:5px}
.chat-mention-pop[hidden]{display:none!important}
.chat-mention-option{width:100%;border:0;background:#fff;border-radius:8px;display:grid;grid-template-columns:30px minmax(0,1fr);gap:8px;align-items:center;padding:7px 8px;text-align:left;cursor:pointer;color:#263d52}
.chat-mention-option:hover,.chat-mention-option.active{background:#edf5ff}
.chat-mention-avatar{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#0b5db8;color:#fff;font-size:8px;font-weight:900}
.chat-mention-option strong{display:block;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-mention-option small{display:block;margin-top:2px;font-size:8px;color:#75879a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

@media (max-height:800px){
  #v1200Shell .v2107-chat-column .chat-panel .side-panel-header.chat-header{
    min-height:70px!important;
    padding:5px 9px 6px!important;
  }
  #v1200Shell .v2107-chat-column .chat-panel .chat-tabs{
    height:31px!important;
    min-height:31px!important;
    margin-top:4px!important;
  }
  #v1200Shell .v2107-chat-column .chat-panel .chat-tab{
    height:25px!important;
    min-height:25px!important;
    font-size:8.7px!important;
  }
  #v1200Shell .v2107-chat-column .chat-panel .chat-bubble{font-size:9.5px!important}
  .chat-mention-pop{max-height:165px}
}

@media (max-width:700px){
  #v1200Shell .v2107-chat-column .chat-panel .chat-tab{font-size:9px!important}
}
