/* =====================================================================
   KitCHAT - mise en page des salons et conversations
   ===================================================================== */

/* Page "plein écran" : la discussion occupe toute la hauteur restante */
body.kc-plein-ecran { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.kc-principal-plein { flex: 1; min-height: 0; padding: 0; position: relative; }
.kc-salon { height: 100%; }
.kc-salon > * { min-height: 0; height: 100%; }

.kc-colonne { background: #FAF3E8; }
.kc-colonne-gauche { border-right: 1px solid var(--kc-sable-fonce); }
.kc-colonne-droite { border-left: 1px solid var(--kc-sable-fonce); }
.kc-colonne-titre {
    padding: .7rem 1rem; font-weight: 700; color: var(--kc-palmeraie);
    border-bottom: 1px solid var(--kc-sable-fonce); background: #F1E5D2;
}
.kc-colonne .list-group-item { background: transparent; border-color: rgba(0,0,0,.05); }
.kc-colonne .list-group-item.active { background: var(--kc-ocre); color: #fff; }
.kc-colonne-centre { background: var(--kc-sable); }

.kc-entete-salon {
    padding: .6rem 1rem; background: var(--kc-blanc);
    border-bottom: 1px solid var(--kc-sable-fonce);
}

/* Fil des messages */
.kc-messages { overflow-y: auto; padding: 1rem; scroll-behavior: smooth; }
.kc-msg { display: flex; margin-bottom: .45rem; }
.kc-msg .kc-bulle {
    max-width: min(78%, 680px); padding: .45rem .75rem; border-radius: .9rem;
    background: var(--kc-bulle-autre); box-shadow: 0 1px 1px rgba(59, 42, 30, .08);
    position: relative; word-wrap: break-word; overflow-wrap: anywhere;
}
.kc-msg.moi { justify-content: flex-end; }
.kc-msg.moi .kc-bulle { background: var(--kc-bulle-moi); border-bottom-right-radius: .25rem; }
.kc-msg:not(.moi) .kc-bulle { border-bottom-left-radius: .25rem; }
.kc-msg .kc-auteur { font-weight: 700; font-size: .85rem; color: var(--kc-palmeraie); cursor: pointer; }
.kc-msg .kc-auteur:hover { text-decoration: underline; }
.kc-msg .kc-auteur.admin { color: var(--kc-ocre-fonce); }
.kc-msg .kc-texte { white-space: pre-wrap; }
.kc-msg .kc-heure { font-size: .7rem; color: #9a8a78; margin-left: .5rem; white-space: nowrap; }
.kc-msg .kc-actions { position: absolute; top: -.6rem; right: .3rem; display: none; }
.kc-msg .kc-bulle:hover .kc-actions { display: block; }
.kc-msg .kc-actions button { padding: 0 .35rem; font-size: .75rem; line-height: 1.4; }
.kc-msg.supprime .kc-texte { font-style: italic; color: #9a8a78; }
.kc-msg.mention .kc-bulle { box-shadow: 0 0 0 2px var(--kc-or); }
.kc-msg .kc-vu { font-size: .7rem; color: var(--kc-palmeraie-clair); }

.kc-msg.systeme { justify-content: center; }
.kc-msg.systeme .kc-bulle {
    background: transparent; box-shadow: none; font-size: .82rem; color: #7a6a58;
    font-style: italic; text-align: center; max-width: 90%;
}

.kc-separateur { text-align: center; font-size: .75rem; color: #9a8a78; margin: .75rem 0; }

/* Saisie */
.kc-zone-saisie { padding: .6rem 1rem .5rem; background: var(--kc-blanc); border-top: 1px solid var(--kc-sable-fonce); }
.kc-zone-saisie textarea { resize: none; max-height: 140px; }

/* Présents */
.kc-presents .list-group-item { display: flex; align-items: center; justify-content: space-between; padding: .45rem 1rem; }
.kc-presents .kc-pseudo { cursor: pointer; }
.kc-presents .dropdown-toggle::after { display: none; }

@media (max-width: 991.98px) {
    .kc-msg .kc-bulle { max-width: 90%; }
    .kc-msg .kc-actions { display: block; position: static; float: right; margin-left: .4rem; }
}
