/* SPDX-License-Identifier: AGPL-3.0-or-later */
/* Éditeur de texte enrichi (Toast UI WYSIWYG) — habillage SkillsCIEL */

textarea.sc-markdown-editor-source {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.sc-markdown-wysiwyg {
  margin-top: 0.25rem;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Boutons + au survol des bords d’un tableau (colonne à droite, ligne en bas). */
.sc-markdown-wysiwyg .sc-md-table-edges {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 45;
  overflow: visible;
}

.sc-markdown-wysiwyg .sc-md-table-edge-btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin: 0;
  padding: 0;
  border: 1px solid #94a3b8;
  border-radius: 9999px;
  background: #fff;
  color: #0f172a;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.92);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  transition:
    opacity var(--sc-motion-duration-quick, 220ms) var(--sc-motion-ease-settle, ease),
    transform var(--sc-motion-duration-quick, 220ms) var(--sc-motion-ease-grow, ease),
    visibility var(--sc-motion-duration-quick, 220ms);
}

.sc-markdown-wysiwyg .sc-md-table-edges.is-col .sc-md-table-edge-btn--col,
.sc-markdown-wysiwyg .sc-md-table-edges.is-row .sc-md-table-edge-btn--row,
.sc-markdown-wysiwyg .sc-md-table-edges.is-focus .sc-md-table-edge-btn {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.sc-markdown-wysiwyg .sc-md-table-edge-btn:hover,
.sc-markdown-wysiwyg .sc-md-table-edge-btn:focus-visible {
  background: #e2e8f0;
  border-color: #64748b;
  outline: none;
}

.sc-markdown-wysiwyg .toastui-editor-contents table {
  margin-right: 1.35rem;
  margin-bottom: 1.35rem;
}

.sc-markdown-wysiwyg .toastui-editor-context-menu {
  z-index: 70;
}

.sc-markdown-wysiwyg .toastui-editor-defaultUI {
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-family: inherit;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.sc-markdown-wysiwyg .toastui-editor-defaultUI-toolbar {
  border-radius: 0.5rem 0.5rem 0 0;
  border-color: #d1d5db;
  background: #f8fafc;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.sc-markdown-wysiwyg .toastui-editor-toolbar-icons {
  min-width: 2.25rem;
  min-height: 2.25rem;
}

/*
 * Icônes barre d’outils : SVG monochromes (style Lucide) via mask.
 * Remplace le sprite PNG Toast UI (filets bleus sous chaque glyphe).
 */
.sc-markdown-wysiwyg .toastui-editor-toolbar-icons {
  background-image: none !important;
  background-color: #475569;
  background-position: center !important;
  background-size: 1.125rem 1.125rem !important;
  background-repeat: no-repeat !important;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 1.125rem 1.125rem;
  mask-size: 1.125rem 1.125rem;
}

.sc-markdown-wysiwyg .toastui-editor-toolbar-icons:not(:disabled):hover {
  background-color: #234957;
}

.sc-markdown-wysiwyg .toastui-editor-toolbar-icons:not(:disabled).active {
  background-image: none !important;
  background-position: center !important;
  background-color: #2d6b5a;
}

.sc-markdown-wysiwyg .toastui-editor-toolbar-icons.heading {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%204v16M18%204v16M6%2012h12%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%204v16M18%204v16M6%2012h12%22%2F%3E%3C%2Fsvg%3E");
}

.sc-markdown-wysiwyg .toastui-editor-toolbar-icons.bold {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%204h8a4%204%200%200%201%200%208H6z%22%2F%3E%3Cpath%20d%3D%22M6%2012h9a4%204%200%200%201%200%208H6z%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%204h8a4%204%200%200%201%200%208H6z%22%2F%3E%3Cpath%20d%3D%22M6%2012h9a4%204%200%200%201%200%208H6z%22%2F%3E%3C%2Fsvg%3E");
}

.sc-markdown-wysiwyg .toastui-editor-toolbar-icons.italic {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M19%204h-9M14%2020H5M15%204%209%2020%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M19%204h-9M14%2020H5M15%204%209%2020%22%2F%3E%3C%2Fsvg%3E");
}

.sc-markdown-wysiwyg .toastui-editor-toolbar-icons.strike {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M16%204H9a3%203%200%200%200%200%206h6a3%203%200%200%201%200%206H8M4%2012h16%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M16%204H9a3%203%200%200%200%200%206h6a3%203%200%200%201%200%206H8M4%2012h16%22%2F%3E%3C%2Fsvg%3E");
}

.sc-markdown-wysiwyg .toastui-editor-toolbar-icons.hrline {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M4%2012h16%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M4%2012h16%22%2F%3E%3C%2Fsvg%3E");
}

.sc-markdown-wysiwyg .toastui-editor-toolbar-icons.quote {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%2010h5v5H5a3%203%200%200%201-2-2.8V7a4%204%200%200%201%204-4%22%2F%3E%3Cpath%20d%3D%22M14%2010h5v5h-3a3%203%200%200%201-2-2.8V7a4%204%200%200%201%204-4%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%2010h5v5H5a3%203%200%200%201-2-2.8V7a4%204%200%200%201%204-4%22%2F%3E%3Cpath%20d%3D%22M14%2010h5v5h-3a3%203%200%200%201-2-2.8V7a4%204%200%200%201%204-4%22%2F%3E%3C%2Fsvg%3E");
}

.sc-markdown-wysiwyg .toastui-editor-toolbar-icons.bullet-list {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9%206h12M9%2012h12M9%2018h12%22%2F%3E%3Ccircle%20cx%3D%224%22%20cy%3D%226%22%20r%3D%221.25%22%20fill%3D%22black%22%20stroke%3D%22none%22%2F%3E%3Ccircle%20cx%3D%224%22%20cy%3D%2212%22%20r%3D%221.25%22%20fill%3D%22black%22%20stroke%3D%22none%22%2F%3E%3Ccircle%20cx%3D%224%22%20cy%3D%2218%22%20r%3D%221.25%22%20fill%3D%22black%22%20stroke%3D%22none%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9%206h12M9%2012h12M9%2018h12%22%2F%3E%3Ccircle%20cx%3D%224%22%20cy%3D%226%22%20r%3D%221.25%22%20fill%3D%22black%22%20stroke%3D%22none%22%2F%3E%3Ccircle%20cx%3D%224%22%20cy%3D%2212%22%20r%3D%221.25%22%20fill%3D%22black%22%20stroke%3D%22none%22%2F%3E%3Ccircle%20cx%3D%224%22%20cy%3D%2218%22%20r%3D%221.25%22%20fill%3D%22black%22%20stroke%3D%22none%22%2F%3E%3C%2Fsvg%3E");
}

.sc-markdown-wysiwyg .toastui-editor-toolbar-icons.ordered-list {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M10%206h11M10%2012h11M10%2018h11%22%2F%3E%3Cpath%20d%3D%22M4%206h1v4M4%2010h2M6%2018H4c0-1%202-2%202-3s-1-1.5-2-1%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M10%206h11M10%2012h11M10%2018h11%22%2F%3E%3Cpath%20d%3D%22M4%206h1v4M4%2010h2M6%2018H4c0-1%202-2%202-3s-1-1.5-2-1%22%2F%3E%3C%2Fsvg%3E");
}

.sc-markdown-wysiwyg .toastui-editor-toolbar-icons.task-list {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%225%22%20width%3D%226%22%20height%3D%226%22%20rx%3D%221%22%2F%3E%3Cpath%20d%3D%22M4.5%208l1.2%201.2L8.5%206.5%22%2F%3E%3Cpath%20d%3D%22M12%208h9M12%2016h9%22%2F%3E%3Crect%20x%3D%223%22%20y%3D%2213%22%20width%3D%226%22%20height%3D%226%22%20rx%3D%221%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%225%22%20width%3D%226%22%20height%3D%226%22%20rx%3D%221%22%2F%3E%3Cpath%20d%3D%22M4.5%208l1.2%201.2L8.5%206.5%22%2F%3E%3Cpath%20d%3D%22M12%208h9M12%2016h9%22%2F%3E%3Crect%20x%3D%223%22%20y%3D%2213%22%20width%3D%226%22%20height%3D%226%22%20rx%3D%221%22%2F%3E%3C%2Fsvg%3E");
}

.sc-markdown-wysiwyg .toastui-editor-toolbar-icons.indent {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%208l4%204-4%204%22%2F%3E%3Cpath%20d%3D%22M21%2012H11M21%206H11M21%2018H11%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%208l4%204-4%204%22%2F%3E%3Cpath%20d%3D%22M21%2012H11M21%206H11M21%2018H11%22%2F%3E%3C%2Fsvg%3E");
}

.sc-markdown-wysiwyg .toastui-editor-toolbar-icons.outdent {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M7%208l-4%204%204%204%22%2F%3E%3Cpath%20d%3D%22M21%2012H11M21%206H11M21%2018H11%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M7%208l-4%204%204%204%22%2F%3E%3Cpath%20d%3D%22M21%2012H11M21%206H11M21%2018H11%22%2F%3E%3C%2Fsvg%3E");
}

.sc-markdown-wysiwyg .toastui-editor-toolbar-icons.table {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%223%22%20width%3D%2218%22%20height%3D%2218%22%20rx%3D%222%22%2F%3E%3Cpath%20d%3D%22M3%209h18M3%2015h18M9%203v18%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%223%22%20width%3D%2218%22%20height%3D%2218%22%20rx%3D%222%22%2F%3E%3Cpath%20d%3D%22M3%209h18M3%2015h18M9%203v18%22%2F%3E%3C%2Fsvg%3E");
}

.sc-markdown-wysiwyg .toastui-editor-toolbar-icons.image {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%223%22%20width%3D%2218%22%20height%3D%2218%22%20rx%3D%222%22%2F%3E%3Ccircle%20cx%3D%228.5%22%20cy%3D%228.5%22%20r%3D%221.5%22%20fill%3D%22black%22%20stroke%3D%22none%22%2F%3E%3Cpath%20d%3D%22M21%2015l-5-5L5%2021%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%223%22%20width%3D%2218%22%20height%3D%2218%22%20rx%3D%222%22%2F%3E%3Ccircle%20cx%3D%228.5%22%20cy%3D%228.5%22%20r%3D%221.5%22%20fill%3D%22black%22%20stroke%3D%22none%22%2F%3E%3Cpath%20d%3D%22M21%2015l-5-5L5%2021%22%2F%3E%3C%2Fsvg%3E");
}

.sc-markdown-wysiwyg .toastui-editor-toolbar-icons.link {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M10%2013a5%205%200%200%200%207.54.54l3-3a5%205%200%200%200-7.07-7.07l-1.72%201.71%22%2F%3E%3Cpath%20d%3D%22M14%2011a5%205%200%200%200-7.54-.54l-3%203a5%205%200%200%200%207.07%207.07l1.71-1.71%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M10%2013a5%205%200%200%200%207.54.54l3-3a5%205%200%200%200-7.07-7.07l-1.72%201.71%22%2F%3E%3Cpath%20d%3D%22M14%2011a5%205%200%200%200-7.54-.54l-3%203a5%205%200%200%200%207.07%207.07l1.71-1.71%22%2F%3E%3C%2Fsvg%3E");
}

.sc-markdown-wysiwyg .toastui-editor-toolbar-icons.code {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M16%2018l6-6-6-6M8%206l-6%206%206%206%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M16%2018l6-6-6-6M8%206l-6%206%206%206%22%2F%3E%3C%2Fsvg%3E");
}

.sc-markdown-wysiwyg .toastui-editor-toolbar-icons.codeblock {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M14%202H6a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h12a2%202%200%200%200%202-2V8z%22%2F%3E%3Cpath%20d%3D%22M14%202v6h6M10%2013l-2%202%202%202M14%2017l2-2-2-2%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M14%202H6a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h12a2%202%200%200%200%202-2V8z%22%2F%3E%3Cpath%20d%3D%22M14%202v6h6M10%2013l-2%202%202%202M14%2017l2-2-2-2%22%2F%3E%3C%2Fsvg%3E");
}

.sc-markdown-wysiwyg .toastui-editor-toolbar-icons.more {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%221.75%22%20fill%3D%22black%22%2F%3E%3Ccircle%20cx%3D%2219%22%20cy%3D%2212%22%20r%3D%221.75%22%20fill%3D%22black%22%2F%3E%3Ccircle%20cx%3D%225%22%20cy%3D%2212%22%20r%3D%221.75%22%20fill%3D%22black%22%2F%3E%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%221.75%22%20fill%3D%22black%22%2F%3E%3Ccircle%20cx%3D%2219%22%20cy%3D%2212%22%20r%3D%221.75%22%20fill%3D%22black%22%2F%3E%3Ccircle%20cx%3D%225%22%20cy%3D%2212%22%20r%3D%221.75%22%20fill%3D%22black%22%2F%3E%3C%2Fsvg%3E");
}


.sc-markdown-wysiwyg .toastui-editor-mode-switch,
.sc-markdown-wysiwyg .toastui-editor-md-tab-container {
  display: none !important;
}

.sc-markdown-wysiwyg .toastui-editor-main,
.sc-markdown-wysiwyg .toastui-editor-ww-container,
.sc-markdown-wysiwyg .toastui-editor-ww-container .toastui-editor {
  flex: 1;
  min-height: 0;
}

.sc-markdown-wysiwyg .toastui-editor-ww-container .toastui-editor,
.sc-markdown-wysiwyg .toastui-editor-contents {
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.5;
}

.sc-markdown-wysiwyg .toastui-editor-contents {
  overflow-wrap: anywhere;
}

/* Marge sous le dernier bloc : cliquable pour écrire après un bloc de code. */
.sc-markdown-wysiwyg .toastui-editor-defaultUI .ProseMirror {
  padding-bottom: 3rem;
}

/* Toast UI : filet double sous h1 / filet sous h2 — gênant (surtout titre + image). */
.sc-markdown-wysiwyg .toastui-editor-contents h1,
.sc-markdown-wysiwyg .toastui-editor-contents h2 {
  border-bottom: none;
  padding-bottom: 0;
}

.sc-markdown-wysiwyg .toastui-editor-contents h1 {
  margin: 0.75rem 0 0.4rem;
}

.sc-markdown-wysiwyg .toastui-editor-contents h2 {
  margin: 0.65rem 0 0.35rem;
}

/*
 * Hauteur auto : après les règles height/flex ci-dessus pour gagner en cascade.
 * Spécificité renforcée (.sc-markdown-wysiwyg.sc-markdown-wysiwyg--auto-height).
 */
.sc-markdown-wysiwyg.sc-markdown-wysiwyg--auto-height {
  flex: none;
  min-height: auto;
}

.sc-markdown-wysiwyg.sc-markdown-wysiwyg--auto-height .toastui-editor-defaultUI {
  height: auto;
}

.sc-markdown-wysiwyg.sc-markdown-wysiwyg--auto-height .toastui-editor-main,
.sc-markdown-wysiwyg.sc-markdown-wysiwyg--auto-height .toastui-editor-ww-container,
.sc-markdown-wysiwyg.sc-markdown-wysiwyg--auto-height .toastui-editor-ww-container .toastui-editor {
  flex: none;
  min-height: auto;
  height: auto !important;
  overflow: visible;
}

.sc-markdown-wysiwyg.sc-markdown-wysiwyg--auto-height .toastui-editor-contents,
.sc-markdown-wysiwyg.sc-markdown-wysiwyg--auto-height .ProseMirror {
  height: auto !important;
  min-height: var(--sc-md-min-height, 8rem);
  overflow: visible !important;
}

/* Tailwind Preflight retire list-style : le rétablir dans l’éditeur. */
.sc-markdown-wysiwyg .toastui-editor-contents ul {
  list-style-type: disc;
  list-style-position: outside;
  padding-left: 1.35rem;
  margin: 0.35rem 0 0.75rem;
}

.sc-markdown-wysiwyg .toastui-editor-contents ol {
  list-style-type: decimal;
  list-style-position: outside;
  padding-left: 1.35rem;
  margin: 0.35rem 0 0.75rem;
}

.sc-markdown-wysiwyg .toastui-editor-contents ul ul {
  list-style-type: circle;
}

.sc-markdown-wysiwyg .toastui-editor-contents ul ul ul {
  list-style-type: square;
}

.sc-markdown-wysiwyg .toastui-editor-contents li {
  display: list-item;
  margin: 0.15rem 0;
}

.sc-markdown-wysiwyg .toastui-editor-contents img,
.sc-md-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.sc-markdown-wysiwyg .toastui-editor-contents img.is-selected {
  outline: 2px solid #64748b;
  outline-offset: 2px;
}

/* Poignée coin bas-droit : redimensionner une image (largeur conservée). */
.sc-markdown-wysiwyg .sc-md-image-resize {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 46;
  overflow: visible;
}

.sc-markdown-wysiwyg .sc-md-image-resize-handle {
  position: absolute;
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 1px solid #64748b;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
  cursor: nwse-resize;
  touch-action: none;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transform: translate(-40%, -40%);
}

.sc-markdown-wysiwyg .sc-md-image-resize-handle::after {
  content: '';
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  width: 0.7rem;
  height: 0.7rem;
  border-right: 2px solid #334155;
  border-bottom: 2px solid #334155;
}

.sc-markdown-wysiwyg .sc-md-image-resize.is-active .sc-md-image-resize-handle {
  opacity: 1;
  visibility: visible;
}

.sc-markdown-wysiwyg .sc-md-image-resize-handle:hover,
.sc-markdown-wysiwyg .sc-md-image-resize-handle:focus-visible {
  background: #e2e8f0;
  outline: none;
}

@media (hover: hover) and (pointer: fine) {
  .sc-markdown-wysiwyg .sc-md-image-resize-handle {
    width: 1.75rem;
    height: 1.75rem;
  }

  .sc-markdown-wysiwyg .sc-md-image-resize-handle::after {
    right: 0.35rem;
    bottom: 0.35rem;
    width: 0.55rem;
    height: 0.55rem;
  }
}

/*
 * Empilement des popups Toast UI (image, lien, tableau…).
 * Elles sont en position:absolute dans l’éditeur. Les frères suivants avec
 * sc-flow-in (animation transform) créent un stacking context qui, sans
 * z-index sur l’éditeur, se peint par-dessus la popup — ex. bannière mission
 * « Continuer la mission » sur OK/Annuler de l’ajout d’image (quiz edit).
 * z-index: 2 bat les alertes en flux (auto) ; à l’ouverture de la popup on
 * monte à 70 pour passer aussi au-dessus de la barre flottante d’actions.
 */
.sc-markdown-wysiwyg {
  position: relative;
  z-index: 2;
}

.sc-markdown-wysiwyg:has(.toastui-editor-popup[style*='display: block']),
.sc-markdown-wysiwyg:has(.toastui-editor-popup[style*='display:block']) {
  z-index: 70;
}

.sc-markdown-wysiwyg .toastui-editor-popup {
  z-index: 70;
}

/* Popup détail événement : barre d’outils et menus au-dessus de la modale (z-110) */
.sc-cal-event-modal .sc-markdown-wysiwyg .toastui-editor-defaultUI-toolbar {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  visibility: visible;
  opacity: 1;
}

.sc-cal-event-modal .sc-markdown-wysiwyg .toastui-editor-popup,
.sc-cal-event-modal .toastui-editor-popup {
  z-index: 130;
}

.sc-cal-note-editor .sc-markdown-wysiwyg {
  min-height: 10.5rem;
}

.sc-cal-note-editor .sc-markdown-wysiwyg .toastui-editor-defaultUI {
  min-height: 10.5rem;
}

.sc-md-fs {
  position: relative;
}

.sc-md-fs__bar {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 0 0.35rem;
}

.sc-md-fs__header {
  flex: 1 1 14rem;
  min-width: 0;
}

.sc-md-fs__header .pfmp-form-select,
.sc-md-fs__header .pfmp-form-control {
  min-height: 2.75rem;
}

.sc-md-fs__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 0.9rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #334155;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.sc-md-fs__btn:hover,
.sc-md-fs__btn:focus-visible {
  border-color: #94a3b8;
  outline: none;
}

.sc-md-fs.is-fullscreen {
  position: fixed;
  inset: 0.5rem;
  z-index: 80;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem 1rem;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow:
    0 20px 45px rgba(35, 73, 87, 0.28),
    0 0 0 100vmax rgba(35, 73, 87, 0.45);
}

.sc-md-fs.is-fullscreen .sc-markdown-wysiwyg {
  flex: 1;
  min-height: 0;
}

/* —— Ouverture en fenêtre (~1/4 écran) + plein écran —— */
.sc-md-stage {
  position: relative;
}

.sc-md-stage__trigger {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  width: 100%;
  min-height: 5.5rem;
  text-align: left;
  padding: 0.85rem 1rem;
  border: 1px solid #ddd6fe;
  border-radius: 0.75rem;
  background: #faf5ff;
  color: #1f2937;
  cursor: pointer;
}

.sc-md-stage__trigger-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #6d28d9;
}

.sc-md-stage__trigger-preview {
  font-size: 0.875rem;
  color: #374151;
  overflow-wrap: anywhere;
  white-space: normal;
  width: 100%;
  max-height: 7.5rem;
  overflow: hidden;
  text-align: left;
}

.sc-md-stage__trigger-hint {
  font-size: 0.75rem;
  font-weight: 600;
  color: #7c3aed;
}

.sc-md-stage__overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.sc-md-stage__overlay.is-open {
  display: flex;
}

.sc-md-stage__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(35, 73, 87, 0.45);
  backdrop-filter: blur(2px);
}

.sc-md-stage__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(90vw, 72rem);
  height: min(85vh, 56rem);
  min-width: min(100%, 20rem);
  min-height: 20rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 20px 45px rgba(35, 73, 87, 0.28);
  overflow: hidden;
  transition:
    width var(--sc-motion-duration-quick, 220ms) var(--sc-motion-ease-settle, ease),
    height var(--sc-motion-duration-quick, 220ms) var(--sc-motion-ease-settle, ease);
}

.sc-md-stage__panel.is-fullscreen {
  width: min(100vw - 1rem, 100%);
  height: min(100vh - 1rem, 100%);
  min-height: 0;
  border-radius: 0.75rem;
}

.sc-md-stage__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  padding: 0.75rem 1rem;
  background: linear-gradient(90deg, #5b21b6, #6d28d9);
  color: #fff;
}

.sc-md-stage__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.sc-md-stage__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.sc-md-stage__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 0.9rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.sc-md-stage__btn--ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.sc-md-stage__btn--primary {
  background: #fff;
  color: #5b21b6;
}

.sc-md-stage__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem 1rem;
  gap: 0.5rem;
}

.sc-md-stage__help {
  margin: 0;
  flex-shrink: 0;
  font-size: 0.75rem;
  color: #6b7280;
  overflow-wrap: anywhere;
}

html.sc-md-stage-open {
  overflow: hidden;
}

/* Masquer Brouillon / Soumettre tant que l’éditeur expansible est ouvert.
   Les laisser au-dessus (z-index) provoquait des POST incomplets : texte ou
   compétences absents, puis formulaire vidé après redirection d’erreur. */
html.sc-md-stage-open .sc-floating-form-actions--above-footer {
  display: none !important;
}

@media (max-width: 639px) {
  .sc-md-stage__panel {
    width: min(100vw - 1rem, 100%);
    height: min(85vh, 56rem);
  }

  .sc-md-stage__actions {
    width: 100%;
  }

  .sc-md-stage__btn {
    flex: 1;
  }
}

.sc-md-prose {
  overflow-wrap: anywhere;
}

.sc-md-prose > :first-child {
  margin-top: 0;
}

.sc-md-prose > :last-child {
  margin-bottom: 0;
}

.sc-md-prose p + p {
  margin-top: 0.5rem;
}

/* Titres : hiérarchie lisible malgré Preflight (`h1…h6 { font-size/font-weight: inherit }`)
   et un parent éventuel `text-sm`. Pas de filet type éditeur Toast (gêne sous un titre
   suivi d’une image). */
.sc-md-prose h1,
.sc-md-prose h2,
.sc-md-prose h3,
.sc-md-prose h4 {
  font-weight: 700;
  line-height: 1.3;
  margin: 0.75rem 0 0.4rem;
  color: #0f172a;
}

.sc-md-prose h1 {
  font-size: 1.5rem; /* 24px — Titre 1 Toast */
  line-height: 1.25;
}

.sc-md-prose h2 {
  font-size: 1.375rem; /* 22px */
}

.sc-md-prose h3 {
  font-size: 1.25rem; /* 20px */
}

.sc-md-prose h4 {
  font-size: 1.125rem; /* 18px */
}

.sc-md-prose > h1:first-child,
.sc-md-prose > h2:first-child,
.sc-md-prose > h3:first-child,
.sc-md-prose > h4:first-child {
  margin-top: 0;
}

/* Tailwind Preflight : menu,ol,ul { list-style: none } — puces / numéros obligatoires. */
.sc-md-prose ul {
  list-style-type: disc;
  list-style-position: outside;
  margin: 0.35rem 0 0.75rem;
  padding-left: 1.35rem;
}

.sc-md-prose ol {
  list-style-type: decimal;
  list-style-position: outside;
  margin: 0.35rem 0 0.75rem;
  padding-left: 1.35rem;
}

.sc-md-prose ul ul {
  list-style-type: circle;
  margin-top: 0.15rem;
  margin-bottom: 0.15rem;
}

.sc-md-prose ul ul ul {
  list-style-type: square;
}

.sc-md-prose ol ol {
  list-style-type: lower-alpha;
  margin-top: 0.15rem;
  margin-bottom: 0.15rem;
}

.sc-md-prose li {
  display: list-item;
  margin: 0.15rem 0;
}

.sc-md-prose li > p {
  margin: 0;
}

.sc-md-prose li + li {
  margin-top: 0.2rem;
}

.sc-md-prose strong,
.sc-md-prose b {
  font-weight: 700;
}

.sc-md-prose em,
.sc-md-prose i {
  font-style: italic;
}

.sc-md-prose a {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sc-md-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0;
  font-size: 0.875rem;
}

.sc-md-prose th,
.sc-md-prose td {
  border: 1px solid #e2e8f0;
  padding: 0.35rem 0.5rem;
  vertical-align: top;
}

.sc-md-prose th {
  background: #f1f5f9;
}

.sc-md-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.85em;
  background: #f1f5f9;
  color: #0f172a;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
}

.sc-md-prose pre {
  background: #f1f5f9;
  padding: 0.75rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  font-size: 0.8rem;
}

.sc-md-prose pre code {
  display: block;
  padding: 0;
  background: transparent;
  font-size: inherit;
  color: inherit;
}

.sc-md-prose blockquote {
  border-left: 3px solid #94a3b8;
  padding-left: 0.75rem;
  color: #475569;
  margin: 0.5rem 0;
}

@media (prefers-reduced-motion: reduce) {
  .sc-markdown-wysiwyg .toastui-editor-defaultUI,
  .sc-markdown-wysiwyg .toastui-editor-toolbar,
  .sc-markdown-wysiwyg .toastui-editor-contents,
  .sc-markdown-wysiwyg .sc-md-table-edge-btn,
  .sc-markdown-wysiwyg .sc-md-image-resize-handle,
  .sc-md-stage__panel,
  .sc-md-fs.is-fullscreen {
    transition: none !important;
  }
}
