/* Discussion : question identifiable, réponses en fil et actions de proximité. */
.f-discussion-head { margin-bottom:24px; }
.f-discussion-actions { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-start; gap:8px; margin-top:20px; }
.f-discussion-actions > form { display:inline-flex; margin:0; }
.f-discussion-actions .f-link,.f-discussion-actions .f-button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:39px; padding:8px 13px; margin:0; border:1px solid #3c3c3c; border-radius:999px; background:#222; color:#dedede!important; font-size:12px; font-weight:600; line-height:1.4; text-decoration:none; }
.f-discussion-actions .f-link:hover,.f-discussion-actions .f-button:hover { background:#303030; border-color:#5a5a5a; color:#fff!important; }
.f-discussion-actions > .f-button { background:#e0382e; border-color:#e0382e; color:#fff!important; }
.f-discussion-actions > .f-button:hover { background:#c72a21; border-color:#c72a21; }
.f-discussion-actions .f-icon { width:16px; height:16px; }
.f-discussion-actions .is-active,.f-discussion-actions [aria-pressed="true"] { background:#3b2724; border-color:#76413a; color:#ffc0b8!important; }

.f-thread { display:grid; gap:0; min-width:0; }
.f-thread .f-post { position:relative; min-width:0; overflow:visible; scroll-margin-top:30px; }
.f-thread .f-post-question { margin:0; background:#201c1b; border:1px solid #4c3733; border-top:3px solid #e24a3f; border-radius:15px; box-shadow:0 4px 22px #00000012; }
.f-question-label { display:flex; align-items:center; gap:7px; margin:0; padding:18px 23px 0; color:#f7a399; font-size:10px; font-weight:700; letter-spacing:.09em; line-height:1.5; text-transform:uppercase; }
.f-question-label .f-icon { width:14px; height:14px; }
.f-thread .f-post-author { display:flex; align-items:center; gap:11px; min-width:0; padding:21px 23px 0; }
.f-question-label + .f-post-author { padding-top:14px; }
.f-thread .f-post-author > .f-avatar { position:relative; z-index:1; width:38px; height:38px; border:1px solid #ffffff12; font-size:14px; font-weight:750; }
.f-thread .f-avatar-tone-0 { color:#f4b9ab; background:#533a33; }
.f-thread .f-avatar-tone-1 { color:#cbbaff; background:#3d355b; }
.f-thread .f-avatar-tone-2 { color:#b0ddf7; background:#29465c; }
.f-thread .f-avatar-tone-3 { color:#c2e1b1; background:#3b4b32; }
.f-thread .f-avatar-tone-4 { color:#f0cf9e; background:#51432e; }
.f-thread .f-avatar-tone-5 { color:#a8e0d5; background:#2c4d47; }
.f-post-identity { flex:1; min-width:0; }
.f-post-name { display:flex; align-items:center; flex-wrap:wrap; gap:5px 8px; min-width:0; }
.f-thread .f-post-name > strong { display:inline; color:#f0f0f0; font-size:14px; font-weight:700; line-height:1.5; letter-spacing:-.01em; overflow-wrap:anywhere; }
.f-author-badge { display:inline-flex; align-items:center; gap:4px; padding:1px 7px; border:1px solid #71473f; border-radius:5px; background:#3b2824; color:#ffb9ae; font-size:10px; font-weight:650; line-height:1.7; white-space:nowrap; }
.f-author-badge .f-icon { width:11px; height:11px; }
.f-self-badge { display:inline-flex; align-items:center; padding:1px 6px; border:1px solid #515151; border-radius:5px; background:#303030; color:#c8c8c8; font-size:10px; font-weight:600; line-height:1.7; white-space:nowrap; }
.f-thread .f-post-author .f-topic-meta { gap:6px; margin-top:2px; color:#aaa; font-size:11px; line-height:1.6; }
.f-thread .f-post-author time { color:#aaa; font-size:11px; }
.f-thread .f-post-kind { display:inline-flex; align-items:center; gap:5px; align-self:flex-start; flex:0 0 auto; margin:3px 0 0 auto; padding:3px 7px; border-radius:5px; color:#aaa; font-size:10px; line-height:1.5; white-space:nowrap; }
.f-thread .f-post-kind > .f-icon { width:12px; height:12px; }
.f-thread .f-post-kind:hover { background:#333; color:#eee; }
.f-thread .f-post-question .f-post-kind { background:#352623; color:#e5a99f; }
.f-thread .f-post-body { min-width:0; padding:17px 23px 16px 72px; }
.f-thread .f-post-body > .f-prose { color:#dedede; font-size:15px; line-height:1.85; }
.f-thread .f-post-body > .f-prose > :first-child { margin-top:0; }
.f-thread .f-post-body > .f-prose > :last-child { margin-bottom:0; }
.f-thread .f-post-body .f-details { margin-bottom:2px; }
.f-thread .f-post-body .f-attachments { margin-top:18px; padding-top:15px; }
.f-thread .f-post-body > .f-topic-meta { margin-top:13px; font-size:11px; }

/* Un fil plus léger garde les noms et le début des messages sur le même axe. */
.f-replies { min-width:0; margin-top:32px; }
.f-replies-heading { display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:10px; margin:0 0 8px; padding-bottom:15px; border-bottom:1px solid #353535; }
.f-replies-heading h2,.f-replies > h2.f-replies-heading { color:#ebebeb; font-size:18px; font-weight:700; letter-spacing:-.02em; }
.f-replies-heading > p { color:#9f9f9f; font-size:11px; }
.f-thread .f-post-reply { margin:0; padding:0 0 19px; border:0; border-bottom:1px solid #2f2f2f; border-radius:0; background:transparent; box-shadow:none; }
.f-thread .f-post-reply:last-child { border-bottom:0; }
.f-thread .f-post-reply::before { content:""; position:absolute; left:19px; top:65px; bottom:20px; width:1px; background:#363636; pointer-events:none; }
.f-thread .f-post-reply .f-post-author { padding:22px 0 0; }
.f-thread .f-post-reply .f-post-body { padding:12px 8px 12px 49px; }
.f-thread .f-post-reply .f-post-kind { margin-top:4px; }
.f-thread .f-post-by-op .f-post-name > strong { color:#f2c4bc; }
.f-thread .f-post-reply.f-solution { margin:17px 0; padding:0 18px 18px; border:1px solid #3d6248; border-radius:12px; background:#18221c; box-shadow:none; }
.f-thread .f-post-reply.f-solution::before { left:37px; top:105px; bottom:20px; background:#42634a; }
.f-thread .f-post.f-solution > .f-notice.success { margin:0 -18px; padding:10px 18px; border:0; border-bottom:1px solid #34533c; border-radius:11px 11px 0 0; background:#203026; color:#a8e1b9; font-size:12px; line-height:1.6; }
.f-thread .f-post.f-solution > .f-notice.success strong { font-size:12px; font-weight:650; }

/* Les actions restent près du message, jamais réparties sur toute sa largeur. */
.f-thread .f-post-actions { position:relative; display:flex; flex-wrap:wrap; justify-content:flex-start; align-items:center; gap:5px; min-width:0; margin:0; padding:0 23px 19px 72px; border:0; border-radius:0 0 14px 14px; background:transparent; }
.f-thread .f-post-reply .f-post-actions { padding:0 8px 0 49px; }
.f-thread .f-post-actions > .f-action-group { display:flex; flex:0 1 auto; flex-wrap:wrap; align-items:center; gap:5px; min-width:0; }
.f-thread .f-post-actions .f-action-group > form { display:inline-flex; flex:0 0 auto; margin:0; padding:0; border:0; background:transparent; }
.f-thread .f-post-actions .f-action,.f-thread .f-post-actions .f-action-more,.f-thread .f-post-actions .f-vote-count { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:35px; margin:0; padding:7px 10px; border:1px solid transparent; border-radius:999px; background:transparent; color:#bdbdbd!important; font-size:12px; font-weight:600; line-height:1.45; text-decoration:none; white-space:nowrap; transition:background .15s,border-color .15s,color .15s; }
.f-thread .f-post-actions .f-action:hover,.f-thread .f-post-actions .f-action-more:hover { background:#303030; border-color:#454545; color:#f5f5f5!important; text-decoration:none; }
.f-thread .f-post-actions .f-action-reply { background:#2a2a2a; border-color:#404040; color:#e3e3e3!important; }
.f-thread .f-post-actions .f-action-reply:hover { background:#383838; border-color:#595959; }
.f-thread .f-post-actions .f-action-vote { background:#242424; border-color:#373737; }
.f-thread .f-post-actions .f-action-vote.is-active,.f-thread .f-post-actions .f-action-vote[aria-pressed="true"] { background:#422a25; border-color:#835044; color:#ffc3b4!important; }
.f-thread .f-post-actions .f-action-solution { color:#a1d5b0!important; }
.f-thread .f-post-actions .f-action-solution:hover,.f-thread .f-post-actions .f-action-solution.is-active { background:#253b2b; border-color:#42694c; color:#c5efcf!important; }
.f-thread .f-post-actions .f-vote-count { padding-inline:8px; color:#a0a0a0!important; font-weight:400; }
.f-thread .f-post-actions .f-icon { width:16px; height:16px; }
.f-thread .f-post-actions :is(.f-action,.f-action-more,.f-menu-item):focus-visible,.f-discussion-actions :is(.f-link,.f-button):focus-visible { outline:2px solid #f6a096; outline-offset:3px; }

/* Le menu secondaire et son signalement restent utilisables au clavier. */
.f-thread .f-post-actions .f-post-menu { position:static; display:block; flex:0 0 auto; min-width:0; margin:0; padding:0; font-size:12px; }
.f-thread .f-post-actions .f-post-menu[open] { flex-basis:auto; }
.f-thread .f-post-actions .f-action-more { min-width:36px; padding:7px 9px; list-style:none; cursor:pointer; }
.f-thread .f-post-actions .f-action-more::-webkit-details-marker,.f-thread .f-post-actions .f-report-menu > summary::-webkit-details-marker { display:none; }
.f-thread .f-post-actions .f-action-more::marker,.f-thread .f-post-actions .f-report-menu > summary::marker { content:""; }
.f-thread .f-post-actions .f-post-menu[open] > .f-action-more { background:#353535; border-color:#555; color:#eee!important; }
.f-post-menu-panel { position:absolute; z-index:30; top:calc(100% + 6px); left:72px; display:grid; gap:2px; width:290px; max-width:calc(100% - 95px); padding:7px; border:1px solid #4b4b4b; border-radius:11px; background:#252525; box-shadow:0 12px 36px #0008; }
.f-thread .f-post-reply .f-post-menu-panel { left:49px; max-width:calc(100% - 57px); }
.f-thread .f-post-actions .f-menu-item,.f-thread .f-post-actions .f-report-menu > summary { display:flex; align-items:center; justify-content:flex-start; gap:9px; width:100%; min-height:42px; padding:10px 11px; border:0; border-radius:6px; background:transparent; color:#d6d6d6; font-size:12px; font-weight:500; line-height:1.5; text-align:left; white-space:normal; list-style:none; cursor:pointer; }
.f-thread .f-post-actions .f-menu-item:hover,.f-thread .f-post-actions .f-report-menu > summary:hover { background:#393939; color:#fff; }
.f-thread .f-post-actions .f-report-menu { min-width:0; }
.f-thread .f-post-actions .f-report-menu[open] { flex-basis:auto; }
.f-thread .f-post-actions .f-report-menu[open] > summary { color:#ffb0a5; background:#3b2a27; }
.f-thread .f-post-actions .f-report-menu .f-form { display:grid; grid-template-columns:minmax(0,1fr); gap:11px; width:100%; min-width:0; margin:6px 0 0; padding:11px; border:1px solid #48403d; border-radius:8px; background:#1d1d1d; }
.f-thread .f-post-actions .f-report-menu .f-field { width:100%; min-width:0; margin:0; }
.f-thread .f-post-actions .f-report-menu label { display:block; margin:0 0 6px; color:#d0d0d0; font-size:12px; line-height:1.5; }
.f-thread .f-post-actions .f-report-menu textarea,.f-thread .f-post-actions .f-report-menu input:not([type="hidden"]),.f-thread .f-post-actions .f-report-menu select { display:block; width:100%; min-width:0; max-width:100%; min-height:44px; padding:9px 10px; border:1px solid #56504c; border-radius:6px; background:#161616; color:#eee; font-size:13px; line-height:1.6; resize:vertical; }
.f-thread .f-post-actions .f-report-menu textarea { min-height:100px; }
.f-thread .f-post-actions .f-report-menu .f-button { justify-self:start; min-height:38px; padding:8px 12px; border:1px solid #6d4840; border-radius:7px; background:#3c2b27; color:#ffd0c5; font-size:12px; font-weight:600; }
.f-thread .f-post-actions .f-report-menu .f-button:hover { background:#50342d; }

/* Les actions qui demandent JavaScript restent masquées quand il est absent. */
html:not(.f-js) .f-thread .f-post-actions [data-copy],
html:not(.f-js) .f-thread .f-post-actions [data-quote],
html:not(.f-js) .f-thread .f-post-actions .f-post-menu-share-only { display:none; }

@media (max-width:900px) {
  .f-thread .f-post-body { padding-left:23px; }
  .f-thread .f-post-question .f-post-actions { padding-left:23px; }
  .f-thread .f-post-question .f-post-menu-panel { left:23px; max-width:calc(100% - 46px); }
  .f-thread .f-post-reply .f-post-body,.f-thread .f-post-reply .f-post-actions { padding-left:49px; }
}
@media (max-width:680px) {
  .f-discussion-head { margin-bottom:20px; }
  .f-discussion-actions { gap:7px; margin-top:17px; }
  .f-discussion-actions .f-link,.f-discussion-actions .f-button { min-height:42px; padding-inline:11px; font-size:11px; }
  .f-thread .f-post-question { border-radius:12px; }
  .f-question-label { padding:15px 16px 0; font-size:9px; }
  .f-thread .f-post-author { gap:9px; padding:17px 16px 0; }
  .f-question-label + .f-post-author { padding-top:12px; }
  .f-thread .f-post-author > .f-avatar { width:34px; height:34px; font-size:12px; }
  .f-thread .f-post-name > strong { font-size:13px; }
  .f-author-badge,.f-self-badge { font-size:9px; padding-inline:5px; }
  .f-thread .f-post-author time { font-size:10px; }
  .f-thread .f-post-kind { font-size:9px; padding:3px 4px; }
  .f-thread .f-post-body { padding:16px; }
  .f-thread .f-post-body > .f-prose { font-size:14px; line-height:1.85; }
  .f-thread .f-post-question .f-post-actions { gap:4px; padding:0 12px 12px; }
  .f-thread .f-post-actions > .f-action-group { gap:2px; }
  .f-thread .f-post-actions .f-action,.f-thread .f-post-actions .f-action-more,.f-thread .f-post-actions .f-vote-count { min-height:42px; padding:9px 8px; font-size:11px; }
  .f-thread .f-post-actions .f-action-more { min-width:40px; }
  .f-thread .f-post-actions .f-icon { width:15px; height:15px; }
  .f-replies { margin-top:27px; }
  .f-replies-heading { padding-bottom:13px; }
  .f-replies-heading h2,.f-replies > h2.f-replies-heading { font-size:17px; }
  .f-thread .f-post-reply { padding-bottom:16px; }
  .f-thread .f-post-reply .f-post-author { padding-top:18px; }
  .f-thread .f-post-reply::before { left:16px; top:57px; bottom:17px; }
  .f-thread .f-post-reply .f-post-body { padding:11px 0 9px 43px; }
  .f-thread .f-post-reply .f-post-actions { gap:3px; padding:0 0 0 36px; }
  .f-thread .f-post-reply.f-solution { margin-block:14px; padding:0 11px 13px; }
  .f-thread .f-post-reply.f-solution::before { left:27px; top:98px; }
  .f-thread .f-post.f-solution > .f-notice.success { margin-inline:-11px; padding:10px 12px; font-size:11px; }
  .f-thread .f-post.f-solution > .f-notice.success strong { font-size:11px; }
  .f-thread .f-post-actions .f-post-menu[open] { flex-basis:100%; width:100%; }
  .f-thread .f-post-actions .f-post-menu[open] > .f-action-more { width:40px; }
  .f-post-menu-panel,.f-thread .f-post-question .f-post-menu-panel,.f-thread .f-post-reply .f-post-menu-panel { position:static; width:100%; max-width:none; margin-top:6px; box-shadow:none; }
  .f-thread .f-post-actions .f-report-menu textarea,.f-thread .f-post-actions .f-report-menu input:not([type="hidden"]),.f-thread .f-post-actions .f-report-menu select { font-size:16px; }
}
@media (max-width:380px) {
  .f-thread .f-post-name { gap:3px 6px; }
  .f-thread .f-post-kind { padding-inline:2px; font-size:8px; }
  .f-thread .f-post-reply .f-post-body { padding-left:0; padding-top:13px; }
  .f-thread .f-post-reply::before { display:none; }
  .f-thread .f-post-reply .f-post-actions { padding-left:0; }
}
@media (prefers-reduced-motion:reduce) {
  .f-thread .f-post-actions .f-action,.f-thread .f-post-actions .f-action-more { transition:none; }
}
@media print {
  .f-discussion-actions,.f-thread .f-post-actions { display:none!important; }
  .f-thread .f-post-question,.f-thread .f-post-reply,.f-thread .f-post-reply.f-solution { background:#fff; border-color:#bbb; box-shadow:none; }
  .f-thread .f-post-body > .f-prose,.f-thread .f-post-name > strong { color:#111; }
  .f-thread .f-post-kind,.f-thread .f-post-author time,.f-thread .f-post-author .f-topic-meta { color:#444; }
  .f-thread .f-post-reply::before { background:#bbb; }
  .f-author-badge { background:#fff; border-color:#aaa; color:#333; }
}

/* Vote d'une réponse : haut, score signé, bas. */
.f-thread .f-post-actions .f-post-voting { display:inline-flex; flex:0 0 auto; align-items:center; gap:0; min-height:35px; padding:0 2px; border:1px solid #3e3e3e; border-radius:999px; background:#252525; color:#ddd; }
.f-thread .f-post-actions .f-post-voting > form { display:inline-flex; margin:0; padding:0; border:0; background:transparent; }
.f-thread .f-post-actions .f-vote-button { display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; width:34px; min-width:34px; min-height:33px; margin:0; padding:6px; border:0; border-radius:50%; background:transparent; color:#bbb; text-decoration:none; transition:background .15s,color .15s; }
.f-thread .f-post-actions .f-vote-button > .f-icon { width:19px; height:19px; stroke-width:1.65; }
.f-thread .f-post-actions .f-vote-up:not(:disabled):hover { background:#4b3028; color:#ffa88e; }
.f-thread .f-post-actions .f-vote-down:not(:disabled):hover { background:#2c3850; color:#acc8ff; }
.f-thread .f-post-actions .f-vote-up[aria-pressed="true"] { color:#ff9a7c; background:#4a3027; }
.f-thread .f-post-actions .f-vote-down[aria-pressed="true"] { color:#a8c6ff; background:#2c3b54; }
.f-thread .f-post-actions .f-vote-button[aria-pressed="true"] > .f-icon { fill:currentColor; stroke:#252525; }
.f-thread .f-post-actions .f-vote-button:focus-visible { outline:2px solid #f6a096; outline-offset:3px; }
.f-thread .f-post-actions .f-vote-button:disabled { opacity:.38; cursor:not-allowed; }
.f-thread .f-post-actions .f-vote-score { min-width:24px; padding:0 3px; color:#e5e5e5; font-size:12px; font-weight:750; line-height:1.4; text-align:center; font-variant-numeric:tabular-nums; }
.f-thread .f-post-actions .has-upvote .f-vote-score { color:#ffb199; }
.f-thread .f-post-actions .has-downvote .f-vote-score { color:#b5ceff; }
.f-thread .f-post-voting[aria-busy="true"] { opacity:.72; }
.f-thread .f-post-voting[aria-busy="true"] .f-vote-button { cursor:progress; }
@media (max-width:680px), (pointer:coarse) {
  .f-thread .f-post-actions .f-post-voting { min-height:42px; }
  .f-thread .f-post-actions .f-vote-button { min-height:40px; min-width:39px; width:39px; }
}
@media (prefers-reduced-motion:reduce) { .f-thread .f-post-actions .f-vote-button { transition:none; } }

