/* PAPAREIL Forum Premium 1.4 — actions rendues en PHP, sans flash JS.
   Les classes Asgaros natives restent responsables des permissions et interactions. */
body.pfp-active #af-wrapper {
  --pfp-community-night:#10274b;
  --pfp-community-accent:#2d7fb4;
  --pfp-community-stroke:#dce8f3;
}
body.pfp-view-topic #af-wrapper .pages-and-menu:has(.pfp-conversation-bar) {
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:12px;
  margin:18px 0 24px;
}
body.pfp-view-topic #af-wrapper .pfp-conversation-bar {
  position:relative;
  isolation:isolate;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:22px;
  box-sizing:border-box;
  margin:0;
  padding:22px 26px;
  border:1px solid #d8e6f0;
  border-radius:20px;
  color:#163454;
  background:linear-gradient(110deg,#f0f7fd 0%,#fff 53%,#f9fcff 100%);
  box-shadow:0 14px 36px rgba(15,45,81,.065);
}
body.pfp-view-topic #af-wrapper .pfp-conversation-bar::before {
  content:"";
  position:absolute;
  left:0;top:20px;bottom:20px;
  width:4px;border-radius:0 6px 6px 0;
  background:linear-gradient(180deg,#327cb5,#8bc9e8);
}
body.pfp-view-topic #af-wrapper .pfp-conversation-intro {min-width:0}
body.pfp-view-topic #af-wrapper .pfp-conversation-label {
  display:inline-flex;align-items:center;gap:8px;
  font-size:10px;font-weight:800;letter-spacing:.14em;
  color:#387ea9;text-transform:uppercase;
}
body.pfp-view-topic #af-wrapper .pfp-conversation-label::before {
  content:"";display:block;width:7px;height:7px;border-radius:50%;
  background:#3e97bc;box-shadow:0 0 0 4px rgba(62,151,188,.10);
}
body.pfp-view-topic #af-wrapper p.pfp-conversation-title {
  margin:8px 0 5px;
  font-size:clamp(19px,1.6vw,23px);
  font-weight:800;line-height:1.25;
  color:#10274b;letter-spacing:-.025em;
}
body.pfp-view-topic #af-wrapper p.pfp-conversation-description {
  max-width:52ch;margin:0;
  color:#5d7188;font-size:13px;line-height:1.6;
}
body.pfp-view-topic #af-wrapper .pfp-conversation-controls {
  display:flex;justify-content:flex-end;align-items:center;
  gap:8px;flex-wrap:wrap;min-width:0;
}
body.pfp-view-topic #af-wrapper .pfp-conversation-controls > a,
body.pfp-view-topic #af-wrapper .pfp-conversation-controls > button,
body.pfp-view-topic #af-wrapper .pfp-conversation-controls > details > summary,
body.pfp-view-topic #af-wrapper .pfp-footer-actions > a {
  appearance:none;
  box-sizing:border-box;
  display:inline-flex !important;
  align-items:center;justify-content:center;gap:8px;
  white-space:nowrap;
  min-height:44px;padding:11px 15px;
  border:1px solid #d3e1ec;
  border-radius:12px;
  background:#fff;
  color:#244668;
  font:700 13px/1.25 system-ui,-apple-system,'Segoe UI',Arial,sans-serif;
  text-decoration:none !important;
  box-shadow:0 2px 6px rgba(21,50,84,.025);
  transition:transform .14s ease,background .14s ease,box-shadow .14s ease;
  cursor:pointer;
}
body.pfp-view-topic #af-wrapper .pfp-conversation-controls > a:hover,
body.pfp-view-topic #af-wrapper .pfp-conversation-controls > button:hover,
body.pfp-view-topic #af-wrapper .pfp-conversation-controls > details > summary:hover {
  transform:translateY(-1px);background:#ecf5fc;
}
body.pfp-view-topic #af-wrapper .pfp-conversation-controls > .pfp-primary-action,
body.pfp-view-topic #af-wrapper .pfp-footer-actions > .pfp-primary-action {
  min-height:48px;padding:12px 21px;
  background:#10274b !important;
  color:#fff !important;border-color:#10274b;
  border-radius:13px;
  box-shadow:0 8px 20px rgba(14,41,77,.13);
  font-weight:800;
}
body.pfp-view-topic #af-wrapper .pfp-conversation-controls > .pfp-primary-action:hover,
body.pfp-view-topic #af-wrapper .pfp-footer-actions > .pfp-primary-action:hover {
  background:#1c4979 !important;box-shadow:0 10px 24px rgba(14,41,77,.20);
}
body.pfp-view-topic #af-wrapper .pfp-conversation-controls .menu-icon {padding-right:0;line-height:1.2}
body.pfp-view-topic #af-wrapper .pfp-conversation-controls .pfp-ui-icon {font-size:18px;line-height:1}
body.pfp-view-topic #af-wrapper .pfp-admin-native {position:relative;flex:0 0 auto}
body.pfp-view-topic #af-wrapper .pfp-conversation-controls > details > summary {
  list-style:none;
  background:#f7f9fb;
  font-size:12px;color:#5d7085;
  min-height:40px;
}
body.pfp-view-topic #af-wrapper .pfp-admin-native > summary::-webkit-details-marker {display:none}
body.pfp-view-topic #af-wrapper .pfp-admin-native > summary::before {content:'⚙';font-size:14px}
body.pfp-view-topic #af-wrapper .pfp-admin-native > summary::after {content:'⌄';font-size:14px}
body.pfp-view-topic #af-wrapper .pfp-admin-native-list {
  position:absolute;right:0;top:calc(100% + 8px);z-index:30;
  display:flex;flex-direction:column;gap:3px;
  min-width:200px;padding:7px;
  border:1px solid #dbe6ee;border-radius:12px;
  background:#fff;box-shadow:0 14px 38px rgba(18,43,76,.15);
}
body.pfp-view-topic #af-wrapper .pfp-admin-native-list > a {
  display:flex !important;gap:8px;align-items:center;
  padding:10px 12px;border:0;border-radius:8px;
  color:#23415f;background:#fff;text-decoration:none !important;
  font-size:12px;font-weight:650;
}
body.pfp-view-topic #af-wrapper .pfp-admin-native-list > a:hover {background:#f1f7fc}
body.pfp-view-topic #af-wrapper .pfp-admin-native-list > a:has(.fa-trash-alt) {color:#a43d55}
body.pfp-view-topic #af-wrapper .pfp-share-feedback {
  position:absolute;bottom:-22px;right:22px;
  font-size:11px;font-weight:600;color:#2d6e91;
}
body.pfp-view-topic #af-wrapper .pfp-share-feedback:empty {display:none}
body.pfp-view-topic #af-wrapper .pfp-share-field {
  width:min(290px,65vw);padding:6px 9px;
  border-radius:6px;border:1px solid #a8bfd3;
  background:#fff;color:#173655;
}
body.pfp-view-topic #af-wrapper .pfp-footer-actions {
  display:flex;justify-content:flex-end;gap:8px;
  padding:12px 0;margin-top:12px;
}
body.pfp-view-topic #af-wrapper .pfp-conversation-controls a:focus-visible,
body.pfp-view-topic #af-wrapper .pfp-conversation-controls button:focus-visible,
body.pfp-view-topic #af-wrapper .pfp-admin-native summary:focus-visible {
  outline:3px solid #337eb2;outline-offset:3px;
}
@media(max-width:1120px) {
  body.pfp-view-topic #af-wrapper .pfp-conversation-bar {grid-template-columns:1fr;gap:15px}
  body.pfp-view-topic #af-wrapper .pfp-conversation-controls {justify-content:flex-start}
}
@media(max-width:650px) {
  body.pfp-view-topic #af-wrapper .pfp-conversation-bar {padding:17px 17px 20px;border-radius:15px}
  body.pfp-view-topic #af-wrapper p.pfp-conversation-title {font-size:20px}
  body.pfp-view-topic #af-wrapper .pfp-conversation-controls {gap:7px}
  body.pfp-view-topic #af-wrapper .pfp-conversation-controls > .pfp-primary-action {flex:1;min-width:108px}
  body.pfp-view-topic #af-wrapper .pfp-conversation-controls > a,
  body.pfp-view-topic #af-wrapper .pfp-conversation-controls > button {min-height:42px;padding:10px 12px}
  body.pfp-view-topic #af-wrapper .pfp-admin-native {margin-left:auto}
}
@media(prefers-reduced-motion:reduce) {
  body.pfp-view-topic #af-wrapper .pfp-conversation-controls * {transition:none !important}
}
/* Réactions sociales : même API, vrais votes, plus chaleureuses et lisibles */
body.pfp-view-topic #af-wrapper .post-reactions {
  display:flex;
  gap:9px;
  flex-wrap:wrap;
  align-items:center;
  padding:8px 0 11px;
}
body.pfp-view-topic #af-wrapper .post-reactions a,
body.pfp-view-topic #af-wrapper .post-reactions > span.reaction {
  display:inline-flex !important;
  align-items:center;
  gap:7px;
  min-height:38px;
  border:1px solid #d8e7f3;
  border-radius:999px;
  padding:7px 12px;
  box-sizing:border-box;
  background:#f6fafe;
  color:#254869 !important;
  text-decoration:none !important;
  font-size:12px;
  font-weight:700;
  line-height:1.3;
  transition:background .2s,border-color .2s;
}
body.pfp-view-topic #af-wrapper .post-reactions a:hover {background:#e5f3fe;border-color:#89b7d9}
body.pfp-view-topic #af-wrapper .post-reactions .reaction {
  display:inline-flex;
  align-items:center;
  margin:0;
  gap:5px;
}
body.pfp-view-topic #af-wrapper .post-reactions .reaction-number {
  background:#e4eff8;
  border-radius:999px;
  min-width:19px;
  padding:2px 5px;
  box-sizing:border-box;
  font-size:11px;
  font-variant-numeric:tabular-nums;
  text-align:center;
}
body.pfp-view-topic #af-wrapper .post-reactions .reaction-icon.reaction-active {
  color:#1d76b0 !important;
}
body.pfp-view-topic #af-wrapper .post-reactions a:has(.reaction-active) {
  border-color:#77b2dc !important;
  background:#e5f4ff !important;
}
body.pfp-view-topic #af-wrapper .post-reactions .pfp-reaction-label {
  white-space:nowrap;
}
body.pfp-view-topic #af-wrapper .post-reactions a[data-reaction="down"] {
  background:#fff;
  border-color:#e7eaf0;
  color:#677787 !important;
}
/* Sondages natives : des vrais résultats et des choix faciles à toucher */
body.pfp-view-topic.pfp-has-poll-premium #af-wrapper #poll-panel {
  background:linear-gradient(140deg,#f4f9fd 0%,#fff 85%);
  border:1px solid #d9e7f3;
  border-radius:20px;
  padding:23px;
  margin:18px 0 26px;
  box-shadow:0 12px 32px rgba(16,39,75,.055);
}
body.pfp-view-topic.pfp-has-poll-premium #af-wrapper #poll-headline {
  font-weight:800;
  font-size:20px;
  color:#112e51;
  line-height:1.4;
  margin-bottom:16px;
}
body.pfp-view-topic.pfp-has-poll-premium #af-wrapper #poll-headline .fas {
  color:#2e80bb;
  margin-right:8px;
}
body.pfp-view-topic.pfp-has-poll-premium #af-wrapper #poll-results .poll-result-row {
  padding:12px 14px;
  border:1px solid #e1eaf4;
  border-radius:12px;
  background:#fff;
  margin:0 0 10px;
}
body.pfp-view-topic.pfp-has-poll-premium #af-wrapper #poll-results .poll-result-row:hover {border-color:#a8cbe3}
body.pfp-view-topic.pfp-has-poll-premium #af-wrapper #poll-results .poll-result-bar {
  border-radius:99px;
  height:9px;
  background:#e9f1f8;
  overflow:hidden;
  margin:10px 0 3px;
}
body.pfp-view-topic.pfp-has-poll-premium #af-wrapper #poll-results .poll-result-filling {
  border-radius:99px;
  background:linear-gradient(90deg,#296ca8,#56a5d6) !important;
  height:100%;
}
body.pfp-view-topic.pfp-has-poll-premium #af-wrapper #poll-results .poll-result-numbers {
  color:#5b7892;
  font-size:11px;
}
body.pfp-view-topic.pfp-has-poll-premium #af-wrapper #poll-panel .actions input[type="submit"] {
  min-height:42px;
  padding:10px 21px;
  border-radius:11px;
  background:#10274b;
  color:#fff;
  font-weight:700;
}
/* Sidebar utile : pas de statistiques fictives, pas de pression à poster */
body.pfp-view-topic #af-wrapper .pfp-side-question {
  display:grid;
  grid-template-columns:24px minmax(0,1fr);
  column-gap:7px;
  row-gap:5px;
  margin:17px 0 0;
  padding:17px 13px;
  background:#eaf5fd;
  border:1px solid #d6e9f6;
  border-radius:13px;
}
body.pfp-view-topic #af-wrapper .pfp-side-question > svg {color:#2d83bd;grid-row:1/3}
body.pfp-view-topic #af-wrapper .pfp-side-question-kicker {
  font-size:10px;
  font-weight:800;
  letter-spacing:.12em;
  color:#27668e;
  text-transform:uppercase;
}
body.pfp-view-topic #af-wrapper .pfp-side-question-text {
  grid-column:2;
  color:#183c5b;
  font-size:13px;
  font-weight:700;
  line-height:1.5;
  margin:0;
}
body.pfp-view-topic #af-wrapper .pfp-side-reply {
  grid-column:1 / -1;
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:12px;
  font-weight:750;
  color:#195c8d;
  text-decoration:none;
  padding-top:6px;
}
body.pfp-view-topic #af-wrapper .pfp-side-nav {
  display:flex;
  flex-direction:column;
  gap:5px;
  margin-top:14px;
  padding-top:11px;
  border-top:1px solid #dbe8f3;
}
body.pfp-view-topic #af-wrapper .pfp-side-nav a {
  display:flex;
  align-items:center;
  gap:8px;
  padding:7px;
  border-radius:9px;
  color:#305577;
  font-size:12px;
  font-weight:650;
  text-decoration:none;
}
body.pfp-view-topic #af-wrapper .pfp-side-nav a:hover {background:#ebf5fc}
@media (max-width:767px) {
  body.pfp-view-topic #af-wrapper .pages-and-menu > .forum-menu.pfp-actionbar {gap:7px;justify-content:flex-start;width:100%}
  body.pfp-view-topic #af-wrapper .pfp-actionbar > a.pfp-reply-button {flex:1;min-width:105px}
  body.pfp-view-topic #af-wrapper .pfp-actionbar > .pfp-action-button,
  body.pfp-view-topic #af-wrapper .pfp-actionbar > button.pfp-action-button,
  body.pfp-view-topic #af-wrapper .pfp-admin-summary {padding:9px 11px !important;font-size:12px}
  body.pfp-view-topic #af-wrapper .pfp-admin-actions-list {right:0;width:min(220px,85vw)}
  body.pfp-view-topic.pfp-has-poll-premium #af-wrapper #poll-panel {padding:15px;border-radius:14px}
}
@media (prefers-reduced-motion:reduce) {
  body.pfp-view-topic #af-wrapper .pfp-actionbar *,body.pfp-view-topic #af-wrapper .post-reactions a {transition:none !important;transform:none !important}
}

/* PAPAREIL 1.2 — guidage discret et rendu adaptatif */
body.pfp-active .pfp-reading-progress {
  position:fixed;z-index:1001;top:0;left:0;width:100%;height:3px;
  opacity:0;pointer-events:none;background:transparent;
  transition:opacity .18s ease;
}
body.pfp-active .pfp-reading-progress.pfp-progress-visible {opacity:1}
body.pfp-active .pfp-reading-progress-fill {
  width:0;height:100%;background:linear-gradient(90deg,#2a82bf,#e8b966);
}



body.pfp-view-topic #af-wrapper .post-element .post-author-block-name a,
body.pfp-view-topic #af-wrapper .post-element .post-author-block-name {
  color:#143c65 !important;
}
body.pfp-view-topic #af-wrapper .post-element .forum-post-header-container {
  border-bottom-color:#dce8f1;
}
body.pfp-view-topic #af-wrapper .post-element .forum-post-menu a:hover {
  background:#edf5fc !important;border-radius:6px;
}
body.pfp-view-topic #af-wrapper .post-element .pfp-reaction-label {
  font-size:12px;line-height:1.3;color:inherit;font-weight:680;
}
body.pfp-view-topic #af-wrapper .post-reactions a:focus-visible {
  outline:2px solid #327cb5;
  outline-offset:3px;
}

@media (max-width:767px) {
  body.pfp-view-topic #af-wrapper .pfp-copy-status:has(.pfp-copy-input) {
    left:0;right:0;
  }
  body.pfp-view-topic #af-wrapper .pfp-copy-input {width:100%}
  body.pfp-view-topic #af-wrapper .pfp-actionbar > a.pfp-jump-replies {order:6}
}
@media (prefers-reduced-motion:reduce) {
  body.pfp-active .pfp-reading-progress {transition:none}
}

/* Les blocs de la colonne gardent toute la largeur sous 1060px :
   évite le texte comprimé dans la seconde colonne de la carte. */
@media (max-width:1059px) {
  body.pfp-view-topic #af-wrapper .pfp-aside-card > .pfp-side-question,
  body.pfp-view-topic #af-wrapper .pfp-aside-card > .pfp-side-nav {
    grid-column:1 / -1;
    min-width:0;
  }
  body.pfp-view-topic #af-wrapper .pfp-aside-card > .pfp-side-question {
    margin-top:14px;
  }
}


@media (max-width:1100px) {
  body.pfp-view-topic.pfp-has-community-toolbar #af-wrapper .pfp-topic-deck {
    grid-template-columns:1fr;
  }
}
@media (max-width:767px) {
  body.pfp-view-topic.pfp-has-community-toolbar #af-wrapper .pfp-topic-deck {
    padding:14px;
    gap:14px;
    border-radius:16px;
  }
  body.pfp-view-topic #af-wrapper .pfp-topic-meta-title {font-size:21px}
  body.pfp-view-topic #af-wrapper .pfp-topic-meta-copy {font-size:13px}
  body.pfp-view-topic #af-wrapper .pages-and-menu > .forum-menu.pfp-actionbar {
    padding:10px;
    border-radius:14px;
  }
}


/* V1.3.1 — Rubriques : ne jamais agrandir les SVG d'une action isolée.
   La barre de partage de la V1.3 n'est volontairement créée que sur les sujets. */
body.pfp-view-forum #af-wrapper .pages-and-menu .forum-menu svg,
body.pfp-view-overview #af-wrapper .pages-and-menu .forum-menu svg {
  width:18px !important;
  height:18px !important;
  flex:0 0 18px;
  vertical-align:middle;
}
body.pfp-view-forum #af-wrapper .pages-and-menu .forum-menu button,
body.pfp-view-forum #af-wrapper .pages-and-menu .forum-menu a.button {
  max-width:100%;
  min-height:42px;
  box-sizing:border-box;
  border-radius:12px !important;
  padding:10px 17px !important;
  font-size:13px;
  font-weight:750;
}
body.pfp-view-forum #af-wrapper .pages-and-menu {
  min-height:0;
  margin:14px 0 20px;
}
body.pfp-view-forum #af-wrapper .pages-and-menu > .forum-menu {
  float:none;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
  width:auto;
}
body.pfp-view-forum #af-wrapper .pages-and-menu > .forum-menu .forum-editor-button {
  display:inline-flex;
  gap:8px;
  align-items:center;
  background:#10274b !important;
  color:#fff !important;
  box-shadow:0 7px 18px rgba(16,39,75,.10);
}
body.pfp-view-forum #af-wrapper .pages-and-menu > .forum-menu .forum-editor-button:hover {
  background:#1d4773 !important;
}
body.pfp-view-forum #af-wrapper .content-container {
  margin-top:0;
}
@media (max-width:767px) {
  body.pfp-view-forum #af-wrapper .pages-and-menu > .forum-menu {
    justify-content:stretch;
  }
  body.pfp-view-forum #af-wrapper .pages-and-menu > .forum-menu .forum-editor-button {
    width:100%;
    justify-content:center;
  }
}
