/* Extrait de teacher-dashboard.html. Ordre historique : 19. */
#teacher-chat-panel {
  position: fixed;
  top: 0; right: -420px;
  width: 400px; height: 100vh;
  background: #ffffff;
  box-shadow: -4px 0 32px rgba(0,0,0,0.18);
  z-index: 99998;
  display: flex; flex-direction: column;
  transition: right 0.3s cubic-bezier(.4,0,.2,1);
  font-family: inherit;
}
#teacher-chat-panel.open { right: 0; }
#tcp-header {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  padding: 16px 18px;
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
#tcp-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
#tcp-name { color: #fff; font-weight: 800; font-size: 15px; }
#tcp-status { color: rgba(255,255,255,0.7); font-size: 11px; margin-top: 1px; }
#tcp-close {
  margin-left: auto; background: rgba(255,255,255,0.15);
  border: none; color: white; width: 32px; height: 32px;
  border-radius: 50%; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s; flex-shrink: 0;
}
#tcp-close:hover { background: rgba(255,255,255,0.3); }
#tcp-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  background: #f8fafc;
}
.tcp-msg { display: flex; gap: 8px; max-width: 85%; }
.tcp-msg.me { align-self: flex-end; flex-direction: row-reverse; }
.tcp-msg-bubble {
  padding: 9px 13px; border-radius: 4px 16px 16px 16px;
  font-size: 13px; line-height: 1.45; word-break: break-word;
  background: #ffffff; border: 1.5px solid #e2e8f0; color: #1e293b;
}
.tcp-msg.me .tcp-msg-bubble {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff; border-color: transparent;
  border-radius: 16px 4px 16px 16px;
}
.tcp-msg-time { font-size: 10px; color: #94a3b8; margin-top: 3px; }
.tcp-msg.me .tcp-msg-time { text-align: right; }
.tcp-msg-icon {
  width: 28px; height: 28px; border-radius: 50%;
  background: #dbeafe; display: flex; align-items: center;
  justify-content: center; font-size: 14px; flex-shrink: 0;
  align-self: flex-end;
}
.tcp-system-msg {
  text-align: center; font-size: 11px; color: #94a3b8;
  padding: 4px 0; font-style: italic;
}
#tcp-input-area {
  padding: 12px 14px; border-top: 1px solid #e2e8f0;
  display: flex; gap: 8px; align-items: flex-end;
  background: #fff; flex-shrink: 0;
}
#tcp-input {
  flex: 1; border: 2px solid #e2e8f0; border-radius: 12px;
  padding: 9px 13px; font-size: 13px; resize: none;
  outline: none; font-family: inherit; max-height: 100px;
  line-height: 1.4; transition: border-color 0.15s;
}
#tcp-input:focus { border-color: #3b82f6; }
#tcp-send {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border: none; color: white; font-size: 17px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: transform 0.15s, opacity 0.15s;
}
#tcp-send:hover { transform: scale(1.08); }
#tcp-send:disabled { opacity: 0.45; cursor: not-allowed; }
#tcp-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 99997; display: none; opacity: 0;
  transition: opacity 0.3s;
}
#tcp-overlay.open { display: block; opacity: 1; }

@media (max-width: 600px) { #teacher-chat-panel { width: 100vw; right: -100vw; } }

#tcp-onglets { display: flex; background: #1e3a8a; padding: 0 10px; gap: 4px; flex-shrink: 0; }
#tcp-onglets[hidden] { display: none; }
#tcp-onglets button { flex: 1; padding: 9px 6px; border: none; background: transparent; color: rgba(255,255,255,.75); font: 700 13px inherit; font-family: inherit; cursor: pointer; border-bottom: 3px solid transparent; }
#tcp-onglets button[aria-selected="true"] { color: #fff; border-bottom-color: #fff; }
#tcp-onglets button:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.tcp-collegue { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; cursor: pointer; text-align: left; font-family: inherit; color: #0f172a; }
.tcp-collegue:hover, .tcp-collegue:focus-visible { background: #eff6ff; border-color: #3b82f6; outline: none; }
.tcp-collegue-texte { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.tcp-collegue-texte strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcp-collegue-texte small { font-size: 12px; color: #475569; }
.tcp-collegue-point { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.tcp-collegue-point.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.25); }
.tcp-collegue-point.off { background: #cbd5e1; }

.tcp-suppr { background: none; border: 0; cursor: pointer; font-size: 11px; color: #94a3b8; padding: 0 2px; opacity: 0; transition: opacity .15s; }
.tcp-msg:hover .tcp-suppr, .tcp-suppr:focus-visible, .tcp-suppr--arme { opacity: 1; }
.tcp-suppr--arme { color: #dc2626; font-weight: 700; }
@media (hover: none) { .tcp-suppr { opacity: .7; } }

/* 01/10/2026 — emojis, autocollants, grosses bulles. */
#tcp-emoji-btn { width: 36px; height: 40px; border: 0; background: none; font-size: 22px; cursor: pointer; flex-shrink: 0; transition: transform .15s; }
#tcp-emoji-btn:hover { transform: scale(1.2) rotate(-8deg); }
#tcp-fun { background: #fff; border-top: 1px solid #e2e8f0; padding: 8px 12px 6px; flex-shrink: 0; }
#tcp-fun[hidden] { display: none; }
.tcp-fun-onglets { display: flex; gap: 4px; margin-bottom: 6px; }
.tcp-fun-onglets button { border: 0; background: #f1f5f9; border-radius: 8px; padding: 3px 10px; font-size: 16px; cursor: pointer; }
.tcp-fun-onglets button[aria-selected="true"] { background: #dbeafe; box-shadow: inset 0 0 0 2px #3b82f6; }
.tcp-fun-grille { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; }
.tcp-fun-grille button { border: 0; background: none; font-size: 20px; line-height: 1.5; cursor: pointer; border-radius: 6px; }
.tcp-fun-grille button:hover { background: #eff6ff; transform: scale(1.25); }
.tcp-fun-stick { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 6px; padding-top: 6px; border-top: 1px dashed #e2e8f0; font-size: 11px; color: #64748b; }
.tcp-sticker { border: 0; background: #f8fafc; border-radius: 10px; font-size: 22px; padding: 2px 6px; cursor: pointer; transition: transform .12s; }
.tcp-sticker:hover { transform: scale(1.3) rotate(6deg); background: #fef9c3; }
.tcp-msg-bubble.tcp-gros { font-size: 38px; line-height: 1.2; background: transparent !important; box-shadow: none !important; padding: 2px 6px; animation: tcpRebond .5s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes tcpRebond { 0% { transform: scale(.3) rotate(-12deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tcp-msg-bubble.tcp-gros, #tcp-emoji-btn:hover, .tcp-sticker:hover { animation: none; transform: none; } }
@media (max-width: 480px) { .tcp-fun-grille { grid-template-columns: repeat(7, 1fr); } }

.tcp-gif-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; padding-top: 6px; border-top: 1px dashed #e2e8f0; font-size: 11px; color: #64748b; }
.tcp-gif-ligne input { flex: 1; min-width: 120px; border: 1px solid #e2e8f0; border-radius: 8px; padding: 4px 8px; font-size: 12px; }
.tcp-gif-ligne button { border: 0; border-radius: 8px; background: #3b82f6; color: #fff; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.tcp-gif-ligne small { flex-basis: 100%; color: #dc2626; }
.tcp-msg-bubble.tcp-gif { padding: 4px; }
.tcp-msg-bubble.tcp-gif img { display: block; max-width: 100%; max-height: 220px; border-radius: 10px; }
