/* =============================
   FX.css — Flux / fils de discussion (sans toucher au cartouche)
   ============================= */

/* --- Wrapper global du flux --- */
.FX-wrapper {
  margin-top: 24px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--bd, rgba(0, 0, 0, .06));
  border-radius: 12px;
  padding: 16px;
}

.FX-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text, #1f2a44);
}

/* --- Formulaire de saisie --- */
.FX-form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.FX-form textarea {
  width: 100%;
  border: 1px solid var(--bd, rgba(16,24,40,.10));
  border-radius: 10px;
  padding: 10px;
  resize: vertical;
  min-height: 72px;
  font: inherit;
}

.FX-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.FX-btn {
  background: var(--brand, #20466e);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
}

.FX-link {
  background: none;
  border: none;
  color: var(--muted, #64748b);
  cursor: pointer;
  text-decoration: underline;
}

.FX-login-hint {
  color: var(--muted, #64748b);
  font-size: .9em;
}

/* --- Item du flux (message) --- */
.FX-item {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--bd, rgba(0, 0, 0, .05));
}
.FX-item:first-child { border-top: none; }

/* Container texte + actions (ne touche pas le cartouche) */
.FX-body { flex: 1; }

/* En-tête : place le cartouche + l’heure (sans styler le cartouche) */
.FX-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Horodatage uniquement */
.FX-time {
  font-size: .85em;
  color: var(--muted, #64748b);
}

/* Contenu du message (hors cartouche) */
.FX-content {
  margin-top: 6px;
  line-height: 1.35;
}

/* Liens dans le contenu du message (n’affecte pas le cartouche) */
.FX-content a {
  text-decoration: underline;
  color: inherit;
}

/* Actions message */
.FX-ops {
  margin-top: 6px;
  display: flex;
  gap: 10px;
  font-size: .9em;
  color: var(--muted, #64748b);
}
.FX-ops button {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  padding: 0;
}

/* --- Réponses imbriquées --- */
.FX-replyTo {
  display: inline-block;
  background: rgba(0, 0, 0, .03);
  border: 1px dashed var(--bd, rgba(0, 0, 0, .1));
  padding: 4px 8px;
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: .9em;
}

/* Indentation de l’arbre de réponses */
.FX-children { margin-left: 50px; }
@media (max-width:640px) {
  .FX-children { margin-left: 32px; }
}
/* Compose */
.FX-compose { border-top: 1px solid #2a2a2a; padding: 10px; display: grid; gap: 8px; }
.FX-compose textarea { width: 100%; min-height: 70px; resize: vertical; padding: 8px; border-radius: 8px; border: 1px solid #3a3a3a; background:#141414; color:#eee; }
.FX-tools { display: flex; gap: 10px; align-items: center; }
.FX-fileBtn { cursor: pointer; padding: 6px 10px; border: 1px solid #3a3a3a; border-radius: 8px; user-select: none; }
.FX-sendBtn { padding: 8px 14px; border-radius: 8px; border: 0; background: #2e7dff; color: #fff; cursor: pointer; }

.FX-previews { display: flex; gap: 8px; flex-wrap: wrap; }
.FX-prevItem { position: relative; width: 84px; height: 84px; border: 1px solid #333; border-radius: 8px; overflow: hidden; }
.FX-prevImg { width: 100%; height: 100%; object-fit: cover; display: block; }
.FX-prevFile { display: block; padding: 6px; font-size: 12px; }
.FX-prevDel { position: absolute; top: 2px; right: 2px; border: 0; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; background:#0008; color:#fff; }

/* Galerie dans les messages */
.FX-gallery { margin-top: 8px; display: grid; grid-template-columns: repeat(auto-fill,minmax(120px,1fr)); gap: 6px; }
.FX-gItem { display: block; border-radius: 8px; overflow: hidden; border: 1px solid #333; }
.FX-gItem img { display: block; width: 100%; height: 120px; object-fit: cover; }

/* YouTube embed */
.FX-ytWrap { margin-top: 8px; position: relative; width: 100%; padding-top: 56.25%; border-radius: 10px; overflow: hidden; border: 1px solid #333; }
.FX-yt { position: absolute; inset: 0; width: 100%; height: 100%; }
