/* PAPAREIL — Forum Premium 1.0.1 | Toutes les règles sont confinées à .pfp-active. */
body.pfp-active #af-wrapper {
  --pfp-navy:#10274b; --pfp-deep:#0b2344; --pfp-ink:#182e4b;
  --pfp-muted:#64758d; --pfp-edge:#dfe8f1; --pfp-soft:#f3f8fc;
  --pfp-gold:#ffe5ad; --pfp-white:#fff; --pfp-rhythm:1;
  --pfp-reading-scale:1;
  font-family: system-ui,-apple-system,'Segoe UI',Arial,sans-serif;
  font-size:16px;
  color:var(--pfp-ink);
}
body.pfp-density-compact #af-wrapper {--pfp-rhythm:.82}
body.pfp-density-aere #af-wrapper {--pfp-rhythm:1.18}
body.pfp-theme-nuit #af-wrapper {--pfp-navy:#101a37;--pfp-deep:#090f27;--pfp-soft:#f5f4fa;--pfp-edge:#e4e4ed}
body.pfp-theme-clair #af-wrapper {--pfp-navy:#234969;--pfp-deep:#1a3f5c;--pfp-soft:#f4f9fb;--pfp-edge:#dfedf0}

/* Navigation existante : peau neuve, sans retirer aucune action */
body.pfp-active #af-wrapper #forum-header {
  border-radius:16px !important;
  box-shadow:0 10px 26px rgba(16,39,75,.10);
  overflow:visible;
}
body.pfp-active #af-wrapper #forum-navigation a {
  transition:background .18s ease, color .18s ease;
}
body.pfp-active #af-wrapper #forum-breadcrumbs {
  font-size:12px;
  line-height:1.55;
  padding-block:12px;
}
body.pfp-active #af-wrapper a:focus-visible,
body.pfp-active #af-wrapper button:focus-visible,
body.pfp-active #af-wrapper input:focus-visible,
body.pfp-active #af-wrapper .pfp-reading-tool:focus-visible {
  outline:3px solid var(--pfp-accent,#327cb5) !important;
  outline-offset:3px;
}

/* En-tête réel Asgaros : H1 SEO conservé */
body.pfp-view-topic.pfp-has-hero #af-wrapper h1.main-title-topic {
  box-sizing:border-box;
  display:block;
  position:relative;
  isolation:isolate;
  overflow:hidden;
  min-height:174px;
  padding:34px 320px 37px 38px !important;
  margin:12px 0 18px !important;
  color:#fff !important;
  background:linear-gradient(116deg,var(--pfp-deep),var(--pfp-navy) 65%,#195281) !important;
  border:1px solid rgba(255,255,255,.16) !important;
  border-radius:22px !important;
  box-shadow:0 18px 38px rgba(12,38,72,.13);
  font-size:clamp(24px,2.15vw,34px) !important;
  font-weight:760 !important;
  line-height:1.24 !important;
  text-wrap:balance;
  letter-spacing:-.035em;
}
body.pfp-view-topic.pfp-has-hero.pfp-has-artwork #af-wrapper h1.main-title-topic::after {
  content:"";
  position:absolute;
  right:-7px; top:0; bottom:0;
  width:318px;
  background-image:var(--pfp-art);
  background-repeat:no-repeat;
  background-size:contain;
  background-position:center right;
  opacity:.98;
  pointer-events:none;
  z-index:-1;
}
body.pfp-view-topic.pfp-has-hero #af-wrapper .pfp-hero-eyebrow {
  display:flex;align-items:center;gap:9px;
  color:var(--pfp-gold);
  font-size:11px !important;
  font-weight:760;
  letter-spacing:.19em;
  text-transform:uppercase;
  margin:0 0 13px;
  line-height:1.3;
}
body.pfp-view-topic.pfp-has-hero #af-wrapper .pfp-hero-eyebrow::before {
  content:"";display:block;width:21px;height:2px;background:var(--pfp-gold);border-radius:2px;
}
body.pfp-view-topic.pfp-has-hero #af-wrapper .pfp-hero-tagline {
  display:block;
  margin-top:13px;
  color:#dbe8f5;
  font-size:14px !important;
  font-weight:450;
  line-height:1.52;
  letter-spacing:0;
  text-wrap:pretty;
}
body.pfp-view-topic.pfp-has-hero #af-wrapper h1.main-title-topic .main-title-icon {color:#fff}

/* Cartes, hauteurs et zones d'actions */
body.pfp-view-topic #af-wrapper .pages-and-menu {margin:10px 0 16px;min-height:40px}
body.pfp-view-topic #af-wrapper .post-element {
  background:#fff;
  border:1px solid var(--pfp-edge);
  border-radius:18px;
  margin:0 0 18px;
  box-shadow:0 10px 28px rgba(28,67,111,.055);
  overflow:hidden;
}
body.pfp-view-topic #af-wrapper .post-element.first-post {
  box-shadow:0 18px 48px rgba(28,67,111,.075);
}
body.pfp-view-topic #af-wrapper .forum-post-header-container {
  background:linear-gradient(100deg,#f1f7fd,#f9fbfe) !important;
  border-bottom:1px solid var(--pfp-edge);
  padding:14px 22px;
}
body.pfp-view-topic.pfp-has-compact-author #af-wrapper .post-author {
  padding:0 !important;gap:11px;min-height:48px;
  background:none !important;
}
body.pfp-view-topic.pfp-has-compact-author #af-wrapper .post-author img.avatar {
  width:46px !important;height:46px !important;
  border:2px solid #fff;
  box-shadow:0 0 0 2px #dcecf7;
  object-fit:cover;border-radius:50%;
}
body.pfp-view-topic #af-wrapper .post-author-block-name {font-size:14px;line-height:1.4}
body.pfp-view-topic #af-wrapper .post-author-block-meta {font-size:11px;color:var(--pfp-muted)}
body.pfp-view-topic #af-wrapper .post-author .pfp-official-badge {
  display:inline-flex;align-items:center;gap:4px;
  margin-top:3px;padding:3px 8px;
  border-radius:100px;background:#e4f3fb;color:#155a82;
  font-size:11px;font-weight:700;white-space:nowrap;
}
body.pfp-view-topic #af-wrapper .post-wrapper {padding:0 24px !important;background:#fff !important;min-width:0}
body.pfp-view-topic #af-wrapper .forum-post-header {
  margin:0 0 8px;
  padding:8px 0 5px;
  border-bottom:1px solid #e5edf5;
}
body.pfp-view-topic #af-wrapper .forum-post-date {color:var(--pfp-muted);font-size:12px;font-style:normal}
body.pfp-view-topic #af-wrapper .forum-post-menu a {font-size:12px}

/* Texte : aucune contrainte arbitraire à 780px ; colonnes seulement si rail présent */
body.pfp-view-topic #af-wrapper .post-message {
  box-sizing:border-box;display:block;
  width:100% !important;max-width:none !important;
  min-width:0;min-height:0 !important;
  padding:22px 5px 26px !important;
  margin:0 !important;
  color:var(--pfp-ink);
  font-size:calc(16px * var(--pfp-reading-scale));
  line-height:1.72;
  overflow-wrap:break-word;
}
body.pfp-view-topic #af-wrapper .post-message > p,
body.pfp-view-topic #af-wrapper .post-message > div:not([id^="post-quote-container"]),
body.pfp-view-topic #af-wrapper .post-message > ul,
body.pfp-view-topic #af-wrapper .post-message > ol {
  width:auto !important;max-width:none !important;
}
body.pfp-view-topic #af-wrapper .post-message p {
  font-size:inherit;
  line-height:1.72;
  margin:0 0 calc(15px * var(--pfp-rhythm)) !important;
  font-weight:400;
  color:inherit;
}
body.pfp-view-topic #af-wrapper .first-post .post-message p.pfp-lead {
  font-size:calc(18px * var(--pfp-reading-scale));
  line-height:1.57;
  font-weight:650;
  letter-spacing:-.008em;
  color:var(--pfp-navy);
  margin:3px 0 21px !important;
}
body.pfp-view-topic #af-wrapper .post-message h2,
body.pfp-view-topic #af-wrapper .post-message h3 {
  display:block;
  margin:calc(26px * var(--pfp-rhythm)) 0 13px;
  padding:13px 16px;
  background:var(--pfp-soft);
  color:var(--pfp-navy) !important;
  font-size:calc(18px * var(--pfp-reading-scale));
  line-height:1.4;
  font-weight:750;
  border:0;border-left:3px solid var(--pfp-accent,#327cb5);
  border-radius:0 10px 10px 0;
}
body.pfp-view-topic #af-wrapper .post-message h2.pfp-question-heading,
body.pfp-view-topic #af-wrapper .post-message h3.pfp-question-heading {
  background:#fff9e9;
  border-left-color:#e6ae4c;
}
body.pfp-view-topic #af-wrapper .post-message strong {color:var(--pfp-navy);font-weight:720}
body.pfp-view-topic #af-wrapper .post-message ul,
body.pfp-view-topic #af-wrapper .post-message ol {margin:12px 0 20px;padding-left:24px !important}
body.pfp-view-topic #af-wrapper .post-message li {line-height:1.65;margin-bottom:7px}
body.pfp-view-topic #af-wrapper .post-message blockquote {
  padding:13px 17px;margin:20px 0;
  border-radius:0 10px 10px 0;border-left:3px solid var(--pfp-accent,#327cb5);
  background:var(--pfp-soft);
}
body.pfp-view-topic #af-wrapper .post-message img {max-width:100%;height:auto}
body.pfp-view-topic #af-wrapper .post-footer {padding:5px 0 13px}
body.pfp-view-topic #af-wrapper .post-element:not(.first-post) .post-message h2,
body.pfp-view-topic #af-wrapper .post-element:not(.first-post) .post-message h3 {
  background:transparent;border-left:0;padding:4px 0;
}

/* Colonne latérale : ajout progressif seulement après validation DOM dans JS */
@media (min-width:1060px) {
  body.pfp-view-topic.pfp-has-reading-rail #af-wrapper .first-post[data-pfp-enhanced="1"] .post-wrapper {
    display:grid;
    grid-template-columns:minmax(0,1fr) 265px;
    column-gap:28px;
    align-items:start;
  }
  body.pfp-view-topic.pfp-has-reading-rail #af-wrapper .first-post[data-pfp-enhanced="1"] .forum-post-header {grid-column:1 / -1}
  body.pfp-view-topic.pfp-has-reading-rail #af-wrapper .first-post[data-pfp-enhanced="1"] .post-message {grid-column:1;grid-row:2}
  body.pfp-view-topic.pfp-has-reading-rail #af-wrapper .first-post[data-pfp-enhanced="1"] .pfp-reading-aside {grid-column:2;grid-row:2}
  body.pfp-view-topic.pfp-has-reading-rail #af-wrapper .first-post[data-pfp-enhanced="1"] .post-footer,
  body.pfp-view-topic.pfp-has-reading-rail #af-wrapper .first-post[data-pfp-enhanced="1"] .post-reactions-summary,
  body.pfp-view-topic.pfp-has-reading-rail #af-wrapper .first-post[data-pfp-enhanced="1"] .signature {grid-column:1 / -1}
}
body.pfp-view-topic #af-wrapper .pfp-reading-aside {
  display:block;
  margin:18px 0 24px;
  padding:0;
}
/* Le panneau n'est jamais perdu : a droite sur grand ecran, sous le message ailleurs. */
@media (max-width:1059px) {
  body.pfp-view-topic #af-wrapper .first-post[data-pfp-enhanced="1"] .pfp-reading-aside {
    width:100%;
    margin:0 0 18px;
  }
  body.pfp-view-topic #af-wrapper .pfp-aside-card {
    position:static;
    display:grid;
    grid-template-columns:45px minmax(0,1fr);
    column-gap:15px;
    padding:15px 18px;
  }
  body.pfp-view-topic #af-wrapper .pfp-aside-symbol {grid-row:1 / 4;margin:0}
  body.pfp-view-topic #af-wrapper .pfp-aside-eyebrow {margin:0}
  body.pfp-view-topic #af-wrapper .pfp-aside-card h2 {margin:3px 0 5px}
  body.pfp-view-topic #af-wrapper .pfp-aside-copy {margin:0}
  body.pfp-view-topic #af-wrapper .pfp-aside-note,
  body.pfp-view-topic #af-wrapper .pfp-reading-tools {grid-column:1 / -1}
}
@media (max-width:767px) {
  body.pfp-view-topic #af-wrapper .pfp-aside-card {padding:14px}
  body.pfp-view-topic #af-wrapper .pfp-aside-note {margin-bottom:0}
}
body.pfp-view-topic #af-wrapper .pfp-aside-card {
  position:sticky;top:25px;
  border:1px solid #dce8f5;
  border-radius:16px;
  padding:22px 18px 18px;
  background:linear-gradient(180deg,#f2f8fc 0%,#fff 78%);
  box-shadow:0 9px 27px rgba(18,50,92,.06);
}
body.pfp-view-topic #af-wrapper .pfp-aside-symbol {
  display:grid;place-items:center;
  width:45px;height:45px;
  border-radius:14px;
  background:#e0eef9;color:var(--pfp-accent,#327cb5);
  margin-bottom:17px;
}
body.pfp-view-topic #af-wrapper .pfp-aside-symbol svg {width:26px;height:26px;display:block}
body.pfp-view-topic #af-wrapper .pfp-aside-eyebrow {
  text-transform:uppercase;letter-spacing:.14em;font-size:10px;font-weight:800;
  color:#44749c;margin:0 0 8px;
}
body.pfp-view-topic #af-wrapper .pfp-aside-card h2 {
  margin:0 0 10px;font-size:19px;line-height:1.3;color:var(--pfp-navy);font-weight:760;
}
body.pfp-view-topic #af-wrapper .pfp-aside-copy {
  margin:0 0 15px;font-size:13px;line-height:1.65;color:#526987;
}
body.pfp-view-topic #af-wrapper .pfp-aside-note {
  border-top:1px solid var(--pfp-edge);padding:14px 0 2px;
  color:#365373;font-size:12px;line-height:1.6;
}
body.pfp-view-topic #af-wrapper .pfp-reading-tools {
  display:flex;flex-wrap:wrap;align-items:center;gap:6px;
  padding:12px 0 0;
  margin-top:10px;border-top:1px solid var(--pfp-edge);
}
body.pfp-view-topic #af-wrapper .pfp-reading-tools__title {
  color:#526987;font-size:11px;flex-basis:100%;margin-bottom:4px;font-weight:650;
}
body.pfp-view-topic #af-wrapper button.pfp-reading-tool {
  appearance:none;background:#fff;border:1px solid #cbdcea;
  color:#173858;border-radius:9px;padding:7px 9px;
  min-width:37px;min-height:34px;
  font:700 12px/1.2 system-ui,-apple-system,'Segoe UI',sans-serif;
  cursor:pointer;transition:background .15s,border .15s;
}
body.pfp-view-topic #af-wrapper button.pfp-reading-tool:hover {background:#e8f3fc;border-color:#8bb7d6}
body.pfp-view-topic #af-wrapper button.pfp-reading-tool[aria-pressed="true"] {background:var(--pfp-navy);color:#fff}
body.pfp-view-topic #af-wrapper button.pfp-reading-tool.pfp-reading-focus {flex:1}
body.pfp-view-topic #af-wrapper.pfp-focus-mode .pfp-reading-aside {display:none !important}
body.pfp-view-topic #af-wrapper.pfp-focus-mode .first-post[data-pfp-enhanced="1"] .post-wrapper {display:flex !important;flex-direction:column}
body.pfp-view-topic #af-wrapper.pfp-focus-mode .first-post .post-message {max-width:820px !important;margin:auto !important}
body.pfp-view-topic #af-wrapper.pfp-focus-mode .first-post .forum-post-header,
body.pfp-view-topic #af-wrapper.pfp-focus-mode .first-post .post-footer {width:100%}
body.pfp-view-topic #af-wrapper .pfp-floating-focus {
  display:none;position:fixed;right:20px;bottom:20px;z-index:999;
  background:var(--pfp-navy);color:#fff;border:0;border-radius:100px;
  box-shadow:0 10px 28px #061a3a33;padding:11px 16px;cursor:pointer;font-size:13px;font-weight:700;
}
body.pfp-view-topic #af-wrapper.pfp-focus-mode .pfp-floating-focus {display:block}

/* Rubriques et listes, sans modifier les liens et la structure */
body.pfp-has-enhance-overview #af-wrapper .title-element {
  border-radius:12px 12px 0 0;
  font-weight:730;
  letter-spacing:-.01em;
}
body.pfp-has-enhance-overview #af-wrapper .content-container {
  border:1px solid #e1eaf3;
  border-radius:0 0 14px 14px;
  overflow:hidden;
  margin-bottom:18px;
}
body.pfp-has-enhance-overview #af-wrapper .content-element {
  transition:background-color .18s ease;
}
body.pfp-has-enhance-overview #af-wrapper .content-element:hover {background-color:#f2f8fd !important}
body.pfp-has-enhance-overview #af-wrapper .forum-title {font-weight:750;letter-spacing:-.013em}
body.pfp-has-enhance-overview #af-wrapper .forum-description {line-height:1.55}

/* Petits écrans : pas de colonne artificielle ni de décor gênant */
@media (max-width:1059px) {
  body.pfp-view-topic.pfp-has-hero #af-wrapper h1.main-title-topic {padding-right:220px !important}
  body.pfp-view-topic.pfp-has-hero.pfp-has-artwork #af-wrapper h1.main-title-topic::after {width:200px;opacity:.75}
}
@media (max-width:767px) {
  body.pfp-view-topic.pfp-has-hero #af-wrapper h1.main-title-topic {
    min-height:0;margin:10px 0 15px !important;padding:25px 22px 26px !important;
    border-radius:17px !important;font-size:25px !important;
  }
  body.pfp-view-topic.pfp-has-hero.pfp-has-artwork #af-wrapper h1.main-title-topic::after {
    right:-44px;top:auto;bottom:-39px;width:155px;height:145px;opacity:.18;
  }
  body.pfp-view-topic #af-wrapper .post-element {border-radius:13px;margin-bottom:13px}
  body.pfp-view-topic #af-wrapper .post-wrapper {padding:0 15px !important}
  body.pfp-view-topic #af-wrapper .forum-post-header-container {padding:12px 15px}
  body.pfp-view-topic #af-wrapper .post-message {padding:18px 0 22px !important;font-size:calc(16px * var(--pfp-reading-scale));line-height:1.65}
  body.pfp-view-topic #af-wrapper .post-message p {line-height:1.65}
  body.pfp-view-topic #af-wrapper .post-message h2,
  body.pfp-view-topic #af-wrapper .post-message h3 {font-size:calc(17px * var(--pfp-reading-scale));padding:12px 13px;margin:24px 0 12px}
  body.pfp-view-topic #af-wrapper .first-post .post-message p.pfp-lead {font-size:calc(17px * var(--pfp-reading-scale))}
  body.pfp-view-topic #af-wrapper .forum-post-menu {max-width:100%;display:flex;flex-wrap:wrap;justify-content:flex-end}
  body.pfp-view-topic #af-wrapper .forum-post-menu a {padding:0 6px}
}
@media (prefers-reduced-motion:reduce) {
  body.pfp-active #af-wrapper *, body.pfp-active #af-wrapper *::before, body.pfp-active #af-wrapper *::after {
    animation-duration:.01ms !important;transition-duration:.01ms !important;
  }
}
