/*
Fichier : ensemble_messagerie.css
Chemin  : D:\speedclicV2\www\assets\css\ensemble_messagerie.css
Rôle    : LA MESSAGERIE D'ENSEMBLE (26/09/2026) : les cases des présents et leur barre,
          la fenêtre « Écrire », la fenêtre « Messages » (conversations / fil / réponse),
          les boutons Ami / Bloquer, le compteur de non-lus. Ne touche pas à ensemble.css.
Créé    : 26/09/2026
*/

/* ── les présents cochés ── */
.ens-membres-liste li { display: flex; align-items: center; gap: 5px; }
.ens-pres-cb { margin: 0; flex: 0 0 auto; accent-color: #1c5fbe; }
.ens-pres-bar { padding: 6px 10px; background: #eaf2fb; border-top: 1px solid #c9dbf0; }
.ens-pres-bar[hidden] { display: none; }
.ens-pres-bar .ens-organiser { width: 100%; }

/* ── le compteur du menu ── */
#ens-msg-bt.ens-msg-nonlus { background: #c0362c; }
#ens-msg-bt.ens-msg-nonlus:hover { background: #a3231b; }

/* ── écrire ── */
#ens-msg-ecrire .ens-msg-ecrire-boite { width: 94%; max-width: 620px; }
.ens-msg-a { margin: 0 0 8px; font-size: 13px; line-height: 1.8; }
.ens-msg-dest { display: inline-block; border: 1px solid #c9dbf0; border-radius: 12px; padding: 1px 8px; background: #f5f9fc; font-weight: 700; font-size: 12px; }
.ens-msg-dest-x { border: 0; background: none; color: #c0362c; cursor: pointer; font-size: 11px; padding: 0 0 0 2px; }
.ens-msg-sortie { margin: 0 0 8px; font-size: 12px; color: #13496a; font-style: italic; }
.ens-msg-sortie[hidden] { display: none; }
.ens-msg-texte { width: 100%; box-sizing: border-box; resize: vertical; font: inherit; font-size: 13px; padding: 6px; border: 1px solid #b9c7d6; border-radius: 4px; }

/* ── messages ── */
#ens-msgs .ens-msgs-boite { width: 94%; max-width: 900px; }
.ens-msgs-corps { display: flex; gap: 0; height: min(70vh, 600px); max-height: 70vh; padding: 0 !important; }
.ens-msgs-gauche { flex: 0 0 300px; border-right: 1px solid #c9dbf0; display: flex; flex-direction: column; min-width: 0; }
.ens-msgs-onglets { display: flex; gap: 4px; padding: 6px; border-bottom: 1px solid #c9dbf0; background: #f5f9fc; }
.ens-msgs-onglets .ens-bt-bleu { flex: 1 1 0; padding: 5px 6px; font-size: 12px; }
.ens-msgs-fils { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1 1 auto; }
.ens-msgs-fils .ens-vide { padding: 12px; }
.ens-msgs-fil-item { display: grid; grid-template-columns: 1fr auto; gap: 0 6px; padding: 7px 10px; border-bottom: 1px solid #e3ebf4; cursor: pointer; font-size: 12px; }
.ens-msgs-fil-item:hover { background: #eaf2fb; }
.ens-msgs-fil-item.ens-on { background: #dbe8f8; }
.ens-msgs-fil-item.ens-nonlu .ens-msgs-fil-qui { font-weight: 800; }
.ens-msgs-fil-qui { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ens-msgs-badge { background: #c0362c; color: #fff; border-radius: 10px; padding: 0 6px; font-size: 11px; font-weight: 700; align-self: center; }
.ens-msgs-fil-quand { grid-column: 1 / -1; color: #6b7c8f; font-size: 11px; }
.ens-msgs-fil-extrait { grid-column: 1 / -1; color: #3c4a5a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ens-msgs-droite { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.ens-msgs-fil-tete { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid #c9dbf0; background: #f5f9fc; flex-wrap: wrap; }
.ens-msgs-fil-tete[hidden] { display: none; }
.ens-msgs-retour { display: none; }
.ens-msgs-fil-nom { font-weight: 800; font-size: 14px; flex: 1 1 auto; }
.ens-msgs-fil-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ens-msgs-fil-actions .ens-bt-bleu, .ens-msgs-fil-actions .ep-btn { padding: 4px 10px; font-size: 12px; }
.ens-msgs-fil { flex: 1 1 auto; overflow: auto; padding: 10px; background: #fff; }
.ens-msgs-fil .ens-vide { padding: 12px; }
.ens-msgs-m { max-width: 78%; margin: 0 auto 8px 0; background: #f0f4f8; border-radius: 10px 10px 10px 2px; padding: 6px 10px; font-size: 13px; }
.ens-msgs-m.ens-msgs-moi { margin: 0 0 8px auto; background: #dbe8f8; border-radius: 10px 10px 2px 10px; }
.ens-msgs-m.ens-msgs-prop { border-left: 3px solid #e8862b; }
.ens-msgs-m-sortie { display: block; font-weight: 700; color: #13496a; font-size: 12px; margin-bottom: 3px; text-decoration: none; }
.ens-msgs-m-sortie:hover { text-decoration: underline; }
.ens-msgs-m-texte { white-space: normal; word-break: break-word; }
.ens-msgs-m-quand { color: #6b7c8f; font-size: 11px; text-align: right; margin-top: 2px; }
.ens-msgs-reponse { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid #c9dbf0; background: #f5f9fc; align-items: flex-end; }
.ens-msgs-reponse[hidden] { display: none; }
.ens-msgs-reponse textarea { flex: 1 1 auto; resize: vertical; font: inherit; font-size: 13px; padding: 6px; border: 1px solid #b9c7d6; border-radius: 4px; min-height: 44px; }
#ens-msgs-msg { display: block; padding: 0 10px 6px; min-height: 0; }

/* ── la fiche d'un participant ── */
.ens-profil-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 12px; border-top: 1px solid #c9dbf0; background: #f5f9fc; }
.ens-profil-actions:empty { display: none; }
.ens-profil-rel { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ens-profil-rel .ens-bt-bleu, .ens-profil-rel .ep-btn { padding: 4px 10px; font-size: 12px; }

/* ── téléphone / étroit : une colonne à la fois ── */
@media (max-width: 700px) {
    .ens-msgs-corps { flex-direction: column; max-height: 80vh; }
    .ens-msgs-gauche { flex: 1 1 auto; border-right: 0; }
    .ens-msgs-droite { display: none; }
    .ens-msgs-droite.ens-msgs-fil-ouvert { display: flex; }
    .ens-msgs-fil-ouvert ~ .ens-msgs-gauche, .ens-msgs-corps:has(.ens-msgs-fil-ouvert) .ens-msgs-gauche { display: none; }
    .ens-msgs-retour { display: inline-block; }
}
/* === FIN DU FICHIER : D:\speedclicV2\www\assets\css\ensemble_messagerie.css === */
