/* Outils de rédaction et code — PC Confort. Les couleurs suivent le thème sombre. */
.f-editor { overflow:visible; isolation:isolate; }
.f-editor > label { padding:16px 18px 0; color:#e8e8e8; }
.f-editor-group { display:inline-flex; align-items:center; gap:2px; min-width:0; }
.f-editor-toolbar { position:relative; align-items:center; gap:6px; padding:8px 10px; border-top:1px solid #363636; }
.f-editor-toolbar button { min-width:38px; min-height:42px; padding:8px 10px; color:#cecece; font-size:13px; }
.f-editor-toolbar button:disabled { opacity:.35; cursor:default; }
.f-editor-toolbar button > .f-icon { width:17px; height:17px; }
.f-editor-toolbar button[data-format="bold"],.f-editor-toolbar button[data-format="italic"],.f-editor-toolbar button[data-format="underline"],.f-editor-toolbar button[data-format="strike"] { font-size:16px; }
.f-editor-separator { width:1px; height:22px; background:#454545; margin-inline:2px; }
.f-editor-code-group { gap:5px; }
.f-editor-toolbar .f-editor-code-button { color:#e6db74; font-weight:650; }
.f-editor-code-button > span { font:600 15px ui-monospace,Consolas,monospace; }
.f-editor-toolbar select[data-code-language] { width:145px; min-width:0; max-width:100%; min-height:38px; padding:6px 24px 6px 10px; background:#191919; color:#c8c8c8; border:1px solid #454545; border-radius:7px; font-size:12px; }
.f-editor-history { margin-left:auto; }
.f-editor-toolbar .f-editor-preview-button { color:#f1aaa3; border:1px solid #64423d; padding-inline:12px; margin-left:5px; }
.f-editor-toolbar .f-editor-preview-button[aria-pressed="true"] { background:#3b2724; color:#ffe1dd; }
.f-editor-more { position:relative; }
.f-editor-more > summary { display:flex; align-items:center; justify-content:center; gap:6px; min-height:42px; padding:8px 11px; border-radius:6px; color:#c8c8c8; cursor:pointer; font-size:13px; list-style:none; }
.f-editor-more > summary::-webkit-details-marker { display:none; }
.f-editor-more[open] > summary,.f-editor-more > summary:hover { background:#3a3a3a; color:#fff; }
.f-editor-menu { position:absolute; top:calc(100% + 8px); right:0; display:grid; min-width:230px; padding:7px; background:#292929; border:1px solid #505050; box-shadow:0 10px 28px #0007; border-radius:10px; z-index:20; }
.f-editor-menu button { justify-content:flex-start; min-height:43px; padding:9px 12px; text-align:left; white-space:nowrap; }
.f-editor textarea[name="contenu"] { display:block; width:100%; min-height:230px; border-radius:0; border:0; resize:vertical; padding:18px; font-size:15px; line-height:1.8; tab-size:2; box-shadow:none; }
.f-editor textarea[name="contenu"]:focus { box-shadow:none; outline:0; }
.f-editor-footer { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 18px; padding:11px 16px; background:#202020; border-top:1px solid #363636; border-radius:0 0 10px 10px; }
.f-editor-footer .f-help { font-size:11px; color:#aaa; }
.f-editor-footer .f-counter { flex:0 0 auto; font:11px ui-monospace,Consolas,monospace; color:#b3b3b3; }
.f-editor-footer .f-counter.is-warning { color:#e8b575; }
.f-editor-footer .f-counter.is-error { color:#ffaca3; }
.f-editor-preview { padding:18px; min-height:230px; max-height:640px; overflow:auto; overflow-wrap:anywhere; }
.f-format-help { margin:-6px 0 24px; font-size:12px; }
.f-format-help > summary { display:inline-flex; align-items:center; gap:7px; min-height:42px; color:#c4a29e; cursor:pointer; }
.f-format-help > summary::before { content:"?"; display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; border:1px solid #79615d; border-radius:50%; font-size:11px; }
.f-format-help-content { padding:18px; border:1px solid #414141; border-radius:10px; background:#202020; }
.f-format-help-content > p { color:#bdbdbd; font-size:13px; line-height:1.8; margin:0 0 12px; }
.f-format-help-content > p:last-child { margin-bottom:0; }
.f-format-reference { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:16px 0; }
.f-format-reference > div { min-width:0; background:#181818; border:1px solid #363636; border-radius:7px; padding:12px; }
.f-format-reference strong { display:block; font-size:12px; color:#d1d1d1; margin-bottom:7px; }
.f-format-reference code { display:block; overflow-wrap:anywhere; font:12px/1.8 ui-monospace,Consolas,monospace; color:#e6db74; }
.f-format-help-content .f-help { font-size:11px; }

/* Blocs de code : palette inspirée des éditeurs Monokai, aucune exécution. */
.f-prose .f-code-block,.f-code-block { margin:20px 0; overflow:hidden; max-width:100%; min-width:0; background:#272822; border:1px solid #51524a; border-radius:10px; color:#f8f8f2; text-align:left; }
.f-code-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px 18px; min-height:46px; padding:8px 13px; background:#20211d; border-bottom:1px solid #44463d; color:#c3c5b8; font:12px/1.5 "Segoe UI",system-ui,sans-serif; }
.f-code-language { display:inline-flex; align-items:center; gap:8px; font-weight:650; color:#e4e7d5; }
.f-code-language::before { content:"</>"; color:#a6e22e; font:600 12px ui-monospace,Consolas,monospace; }
.f-code-meta { margin-right:auto; color:#a8ab9b; font-size:11px; }
.f-code-tools { display:flex; align-items:center; flex-wrap:wrap; gap:3px; margin-left:auto; }
.f-code-tools .f-code-tool { display:inline-flex; align-items:center; justify-content:center; min-height:34px; min-width:35px; gap:5px; padding:6px 9px; border:1px solid transparent; border-radius:5px; background:transparent; color:#b9bdac; font:11px/1.4 "Segoe UI",system-ui,sans-serif; cursor:pointer; }
.f-code-tools .f-code-tool:hover,.f-code-tools .f-code-tool:focus-visible { color:#f8f8f2; border-color:#55584c; background:#34362d; }
.f-code-tools .f-code-tool[aria-pressed="true"],.f-code-tools .f-code-tool.is-active { color:#c4ee74; background:#354028; border-color:#4b5a36; }
.f-code-content { display:flex; align-items:stretch; min-width:0; overflow:auto; overscroll-behavior-x:contain; scrollbar-color:#646658 #24251f; }
.f-code-gutter { display:none; flex:0 0 auto; padding:15px 10px 15px 13px; border-right:1px solid #414339; background:#24251f; color:#a0a48e; font:12px/1.75 ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace; user-select:none; text-align:right; }
.f-code-gutter > span { display:block; min-width:2ch; }
.has-line-numbers .f-code-gutter { display:block; }
.f-code-block pre,.f-prose .f-code-block pre { min-width:0; flex:1; overflow:auto; margin:0; padding:15px 17px; border:0; border-radius:0; background:#272822; color:#f8f8f2; tab-size:2; white-space:pre; font:12px/1.75 ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace; text-shadow:none; scrollbar-color:#646658 #272822; }
.f-code-block pre:focus-visible { outline:2px solid #a6e22e; outline-offset:-3px; }
.f-code-block pre code,.f-prose .f-code-block pre code { display:block; margin:0; padding:0; border:0; background:transparent; color:inherit; white-space:inherit; font:inherit; text-shadow:none; overflow-wrap:normal; word-break:normal; }
.f-code-block.is-collapsed .f-code-content,.f-code-block.is-collapsed > pre { max-height:390px; }
.f-code-block.is-collapsed .f-code-content > pre { overflow-y:hidden; }
.f-code-block.is-wrapped pre,.f-code-block.is-wrapped pre code { white-space:pre-wrap; overflow-wrap:anywhere; }
.f-code-block.is-wrapped .f-code-gutter { display:none; }
.f-code-block .token.comment,.f-code-block .token.prolog,.f-code-block .token.doctype,.f-code-block .token.cdata { color:#a6aa98; font-style:italic; }
.f-code-block .token.punctuation { color:#e0e2d4; }
.f-code-block .token.property,.f-code-block .token.tag,.f-code-block .token.constant,.f-code-block .token.symbol,.f-code-block .token.deleted,.f-code-block .token.keyword { color:#ff6b9f; }
.f-code-block .token.boolean,.f-code-block .token.number { color:#c3a1ff; }
.f-code-block .token.selector,.f-code-block .token.attr-name,.f-code-block .token.char,.f-code-block .token.builtin,.f-code-block .token.inserted { color:#b9e870; }
.f-code-block .token.string,.f-code-block .token.attr-value,.f-code-block .token.regex { color:#e6db74; }
.f-code-block .token.operator,.f-code-block .token.entity,.f-code-block .token.url,.f-code-block .token.variable,.f-code-block .token.parameter { color:#8be0f3; }
.f-code-block .token.atrule,.f-code-block .token.function,.f-code-block .token.class-name { color:#b9e870; }
.f-code-block .token.important,.f-code-block .token.bold { font-weight:700; }
.f-code-block .token.italic { font-style:italic; }

/* Citations, détails repliables, tableaux et vérifications. */
.f-prose .f-quote { border-left:3px solid #898078; padding:14px 17px; margin:18px 0; border-radius:0 7px 7px 0; background:#252422; color:#cfcdc7; }
.f-quote-author { display:block; color:#d3aca2; font-size:12px; font-weight:650; margin-bottom:7px; }
.f-prose .f-quote > :last-child { margin-bottom:0; }
.f-prose .f-spoiler { margin:18px 0; border:1px solid #48433f; border-radius:8px; background:#242220; overflow:hidden; }
.f-spoiler > summary { padding:12px 15px; color:#e0d5cf; cursor:pointer; font:600 13px/1.6 "Segoe UI",system-ui,sans-serif; min-height:44px; }
.f-spoiler[open] > summary { border-bottom:1px solid #48433f; }
.f-spoiler-body { padding:15px 17px; font-size:14px; }
.f-spoiler-body > :last-child { margin-bottom:0; }
.f-prose .f-task-list { list-style:none; padding-left:0; }
.f-task-item { display:flex; align-items:baseline; gap:9px; margin:5px 0; }
.f-task-marker { display:inline-flex; align-items:center; justify-content:center; flex:0 0 17px; width:17px; height:17px; border:1px solid #a2a597; border-radius:4px; color:#b9e870; font:600 12px/1 "Segoe UI",sans-serif; }
.f-task-marker.is-checked { border-color:#859b55; background:#344126; }
.f-table-wrap { max-width:100%; overflow-x:auto; margin:18px 0; border:1px solid #464646; border-radius:8px; scrollbar-color:#646464 #202020; }
.f-table-wrap:focus-visible { outline:2px solid #dc8c81; outline-offset:3px; }
.f-prose .f-table-wrap table { width:100%; border-collapse:collapse; border-spacing:0; margin:0; font-size:13px; text-align:left; }
.f-table-wrap th { padding:11px 14px; background:#2d2b29; color:#e8dfdb; font-weight:650; }
.f-table-wrap td { padding:10px 14px; background:#202020; color:#c8c8c8; }
.f-table-wrap tr + tr td { border-top:1px solid #3d3d3d; }
.f-table-wrap tbody tr:first-child td { border-top:1px solid #4d4844; }
.f-table-wrap th + th,.f-table-wrap td + td { border-left:1px solid #3d3d3d; }
.f-prose hr { border:0; border-top:1px solid #53504b; margin:24px 0; }
.f-prose del,.f-prose s { color:#aaa; }
.f-prose u { text-underline-offset:3px; text-decoration-thickness:1px; }
@media(max-width:1100px) {
  .f-editor-toolbar { gap:4px; }
  .f-editor-history { margin-left:0; }
  .f-editor-toolbar select[data-code-language] { width:130px; }
}
@media(max-width:680px) {
  .f-editor-toolbar { gap:4px; padding:7px; }
  .f-editor-toolbar button,.f-editor-more > summary { min-height:44px; padding:8px 9px; }
  .f-editor-toolbar .f-editor-code-button { padding-inline:9px; }
  .f-editor-code-group { flex:1 1 auto; }
  .f-editor-toolbar select[data-code-language] { width:145px; min-height:40px; }
  .f-editor-separator { display:none; }
  .f-editor-history { margin-left:auto; }
  .f-editor-menu { right:0; min-width:220px; }
  .f-editor textarea[name="contenu"] { padding:15px; min-height:250px; font-size:16px; }
  .f-editor-footer { padding:10px 13px; }
  .f-editor-footer .f-help { font-size:10px; }
  .f-editor-preview { padding:14px; }
  .f-format-reference { grid-template-columns:1fr; }
  .f-code-header { padding:9px 10px; gap:6px 10px; }
  .f-code-tools { width:100%; justify-content:flex-start; padding-top:5px; border-top:1px solid #3c3e34; }
  .f-code-tools .f-code-tool { min-height:40px; padding-inline:9px; }
  .f-code-block pre,.f-prose .f-code-block pre { padding:13px; font-size:12px; }
  .f-code-gutter { padding-top:13px; padding-bottom:13px; }
}
@media print {
  .f-editor,.f-format-help,.f-code-tools { display:none!important; }
  .f-code-block,.f-prose .f-code-block,.f-code-header,.f-code-block pre { background:#fff!important; color:#111!important; border-color:#aaa; }
  .f-code-block .token { color:#111!important; }
  .f-code-block.is-collapsed .f-code-content { max-height:none; overflow:visible; }
}


.f-code-gutter { white-space:pre; }
