/* ==========================================================
   🎨 FACTURE CF7 PDF FULL — TinyMCE Styles + Toast System
   ========================================================== */

/* ===============================
   BARRE D’OUTILS DU FORMULAIRE
   =============================== */
.fcf7-form-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 8px 0 14px;
}
.fcf7-form-tools .button.small {
  font-size: 0.875rem;
  padding: 0.4rem 0.6rem;
  border-radius: 0.4rem;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #111;
  cursor: pointer;
  transition: all 0.25s ease;
}
.fcf7-form-tools .button.small:hover {
  background: #eef2ff;
}

/* 🧹 Rouge spécial pour le bouton "Effacer" */
.fcf7-form-tools .button.fcf7-clear {
  background: #e53935;
  color: #fff;
  border: 1px solid #c62828;
}
.fcf7-form-tools .button.fcf7-clear:hover {
  background: #c62828;
  border-color: #8e1c1c;
}

/* ===============================
   BLOCS ÉDITEURS / PRÉVISU
   =============================== */
.fcf7-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.fcf7-color-palette {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.fcf7-color-palette .color-swatch {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.fcf7-color-palette .color-swatch:hover {
  transform: scale(1.15);
}

.fcf7-preview {
  border: 1px dashed #ddd;
  padding: 8px;
  border-radius: 6px;
  background: #fff;
  margin-top: 4px;
}
.fcf7-counter {
  font-size: 0.82rem;
  color: #666;
  margin-top: 4px;
}

/* ===============================
   MESSAGES DE LIMITE
   =============================== */
.fcf7-limit-warning {
  display: none;
  font-size: 0.86rem;
  color: #b91c1c;
  margin: 6px 0;
}
.fcf7-limit-warning.visible {
  display: block;
}
.fcf7-limit-warning.shake {
  animation: fcf7-shake 0.35s linear;
}
@keyframes fcf7-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

/* ===============================
   TOASTS MODERNES
   =============================== */
.fcf7-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99999;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.4;
  min-width: 240px;
  max-width: 320px;
  pointer-events: none;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}
.fcf7-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.fcf7-toast .icon {
  font-size: 1.2rem;
}

/* Couleurs de toast */
.fcf7-toast.toast-success {
  background: #e7f9ef !important;
  border-left: 6px solid #22c55e !important;
  color: #14532d !important;
}
.fcf7-toast.toast-error {
  background: #fee2e2 !important;
  border-left: 6px solid #ef4444 !important;
  color: #7f1d1d !important;
}
.fcf7-toast.toast-warning {
  background: #fef9c3 !important;
  border-left: 6px solid #facc15 !important;
  color: #713f12 !important;
}
.fcf7-toast.toast-info {
  background: #dbeafe !important;
  border-left: 6px solid #3b82f6 !important;
  color: #1e3a8a !important;
}

/* ===============================
   MODE SOMBRE
   =============================== */
body.tinymce-dark .fcf7-preview {
  background: #0b1220;
  border-color: #213055;
  color: #dbe2ff;
}
body.tinymce-dark .fcf7-form-tools .button.small {
  background: #0b1220;
  border-color: #213055;
  color: #dbe2ff;
}
body.tinymce-dark .fcf7-form-tools .button.small:hover {
  background: #111a33;
}
body.tinymce-dark .fcf7-toast.toast-success {
  background: #0d1f14 !important;
  color: #bbf7d0 !important;
  border-left-color: #22c55e !important;
}
body.tinymce-dark .fcf7-toast.toast-error {
  background: #2b0b0b !important;
  color: #fecaca !important;
  border-left-color: #ef4444 !important;
}
body.tinymce-dark .fcf7-toast.toast-warning {
  background: #2b250c !important;
  color: #fde68a !important;
  border-left-color: #facc15 !important;
}
body.tinymce-dark .fcf7-toast.toast-info {
  background: #0b1220 !important;
  color: #dbe2ff !important;
  border-left-color: #3b82f6 !important;
}

/* ===============================
   RESPONSIVE
   =============================== */
@media (max-width: 600px) {
  .fcf7-toast {
    right: 10px !important;
    max-width: calc(100% - 20px);
    font-size: 0.88rem;
  }
}
