/* Surfaces de page et composants dont le module ne fournit que la structure. */
.ptfr-2027 {
  --surface-edge: #9aadc1;
  --surface-inset: clamp(14px, 2.3vw, 28px);
  --section-fill: #eaf1f9;
  --nested-fill: #e9eff6;
  --accent-teal: #21645d;
  --accent-teal-hover: #2c776e;
}
.ptfr-2027 .site-context {
  padding: 10px 14px;
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  background: var(--surface);
}
.ptfr-2027 .site-page-content {
  display: flow-root;
  min-width: 0;
}
.ptfr-2027 .site-page-content:empty { display: none; }

/* Les vues déjà organisées en cartes conservent leur propre cadre. */
.ptfr-2027 .site-page-content:not(:has(> :is(#module-forum, .news-page, .mmfr-profile, .ptfr-dashboard, .ptfr-login-page, .trux-store))) {
  padding: clamp(12px, 1.5vw, 20px);
  border: 1px solid var(--surface-edge);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.ptfr-2027 .site-page-content > :is(section, article):not(:is(#module-forum, .news-page, .mmfr-profile, .ptfr-dashboard, .ptfr-login-page, .trux-store)) > header:not(.ptfr-user-hero):has(:is(h1, h2)) {
  margin-block-end: var(--panel-gap);
  padding: 11px 14px;
  border: 1px solid var(--surface-edge);
  border-radius: 12px;
  background: var(--heading-fill);
}
.ptfr-2027 .site-page-content > :is(section, article) > header:not(.ptfr-user-hero) > h1:last-child { margin-bottom: 0; }
.ptfr-2027 .site-page-content > :is(section, article):not(.news-page) > footer:has(> :not(.spacer):not([hidden])) { margin-top: var(--panel-gap); }

.ptfr-2027 .site-page-content :is(
  .article-calendar, .article-download, .article-faq, .article-media, .article-shoutbox, .article-web,
  .subcat-element, .ptfr-moderation-tracking-item, .base2020-search-results-panel,
  #module-stats .elements-container > .block
) {
  min-width: 0;
  padding: clamp(11px, 1.4vw, 17px);
  border: 1px solid var(--surface-edge);
  border-radius: 12px;
  background: var(--nested-fill);
  overflow-wrap: anywhere;
}
.ptfr-2027 .site-page-content .elements-container > :is(article.article-several, .subcat-element) {
  margin-block-start: 0;
  margin-block-end: var(--panel-gap);
}
.ptfr-2027 .site-page-content .ptfr-moderation-tracking-item + .ptfr-moderation-tracking-item { margin-block-start: var(--panel-gap); }
.ptfr-2027 .site-page-content .ptfr-moderation-tracking-item.ptfr-moderation-pending {
  border-color: #ca9c70;
  background: var(--warning-bg);
}
.ptfr-2027 .site-page-content :is(
  .base2020-search-results-header,
  .event-display-dates, .participants-calendar, .faq-answer-container
) {
  padding: clamp(11px, 1.4vw, 17px);
  border: 1px solid var(--surface-edge);
  border-radius: 12px;
  background: var(--section-fill);
}
.ptfr-2027 .site-page-content .base2020-search-results-header { margin-block-end: var(--panel-gap); }
.ptfr-2027 .site-page-content #cssmenu-pmactions a.pm-action-button {
  background: var(--brand);
  color: #fff;
  border: 1px solid var(--brand);
  border-radius: var(--control-radius);
  text-decoration: none;
}
.ptfr-2027 .site-page-content #cssmenu-pmactions a.pm-action-button:is(:hover, :focus-visible) {
  background: var(--brand-hover);
  color: #fff;
}

/* Les sous-pages du forum ont aussi un cadre, en plus des sujets et des listes. */
.ptfr-2027 .site-page-content > #module-forum > article:not(:has(.forum-table, .forum-topic-toolbar, .forum-topic-header)),
.ptfr-2027 .site-page-content > #module-forum #forum-bottom .forum-online,
.ptfr-2027 .site-page-content .news-page .news-entry-extras:has(> :not([hidden])) {
  padding: clamp(12px, 1.5vw, 20px);
  border: 1px solid var(--surface-edge);
  border-radius: var(--radius);
  background: var(--surface);
}
.ptfr-2027 .site-page-content > #module-forum #forum-bottom .forum-online {
  display: flow-root;
  margin-top: var(--panel-gap);
}
.ptfr-2027 .site-page-content > #module-forum #forum-bottom .forum-online:not(:has(> :not(.spacer):not([hidden]))) { display: none; }

/* Profil public et zones privées visibles selon les droits du visiteur. */
.ptfr-2027 #module-user-view-profile.mmfr-profile {
  display: grid;
  min-width: 0;
  gap: var(--panel-gap);
}
.ptfr-2027 #module-user-view-profile :is(.mmfr-profile-hero, .mmfr-profile-stat, .mmfr-profile-panel) {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--surface-edge);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.ptfr-2027 #module-user-view-profile .mmfr-profile-hero {
  flex-wrap: wrap;
  gap: var(--panel-gap);
  padding: clamp(12px, 1.5vw, 20px);
}
.ptfr-2027 #module-user-view-profile .mmfr-profile-identity { max-width: 100%; }
.ptfr-2027 #module-user-view-profile .mmfr-profile-kicker {
  margin: 0 0 4px;
  color: var(--brand);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ptfr-2027 #module-user-view-profile .mmfr-profile-heading h2 {
  font-size: clamp(1.45rem, 2.75vw, 2.2rem);
}
.ptfr-2027 #module-user-view-profile :is(.mmfr-profile-avatar, .mmfr-profile-stat-icon, .mmfr-profile-panel-icon) {
  border-radius: 11px;
  background: var(--brand);
  color: #fff;
}
.ptfr-2027 #module-user-view-profile .mmfr-profile-avatar { font-size: 1.55rem; }
.ptfr-2027 #module-user-view-profile .mmfr-profile-level {
  border: 1px solid var(--surface-edge);
  border-radius: var(--control-radius);
  background: var(--section-fill);
  color: var(--brand);
  font-size: .88rem;
  font-weight: 650;
}
.ptfr-2027 #module-user-view-profile .mmfr-profile-group {
  border-radius: var(--control-radius);
  color: var(--brand);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.ptfr-2027 #module-user-view-profile .mmfr-profile-group:not(:has(img)) {
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--surface-edge);
  background: var(--surface);
  font-size: .86rem;
}
.ptfr-2027 #module-user-view-profile .mmfr-profile-actions { max-width: 100%; }
.ptfr-2027 #module-user-view-profile a.mmfr-profile-action {
  border: 1px solid var(--brand);
  border-radius: var(--control-radius);
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 650;
}
.ptfr-2027 #module-user-view-profile a.mmfr-profile-action:is(:hover, :focus-visible) {
  background: var(--brand-hover);
  color: #fff;
}
.ptfr-2027 #module-user-view-profile a.mmfr-profile-action > * { color: inherit; }
.ptfr-2027 #module-user-view-profile .mmfr-profile-actions:not(:has(> a)) { display: none; }
.ptfr-2027 #module-user-view-profile .mmfr-profile-stats {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 228px), 1fr));
  margin: 0;
  gap: var(--panel-gap);
}
.ptfr-2027 #module-user-view-profile .mmfr-profile-stat {
  padding: clamp(14px, 1.6vw, 20px);
  border-radius: 12px;
}
.ptfr-2027 #module-user-view-profile .mmfr-profile-stat-value {
  font-size: clamp(1.05rem, 1.55vw, 1.32rem);
  line-height: 1.28;
}
.ptfr-2027 #module-user-view-profile :is(.mmfr-profile-stat-label, .mmfr-profile-list-label, .mmfr-profile-stat small) {
  color: var(--muted);
  font-size: .88rem;
}
.ptfr-2027 #module-user-view-profile .mmfr-profile-stat-link { color: var(--link); font-size: .88rem; font-weight: 650; }
.ptfr-2027 #module-user-view-profile .mmfr-profile-grid { align-items: start; gap: var(--panel-gap); }
.ptfr-2027 #module-user-view-profile .mmfr-profile-grid:not(:has(> .mmfr-profile-panel + .mmfr-profile-panel)) { grid-template-columns: minmax(0, 1fr); }
.ptfr-2027 #module-user-view-profile .mmfr-profile-panel {
  padding: 0;
}
.ptfr-2027 #module-user-view-profile .mmfr-profile-panel-header {
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--surface-edge);
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  background: var(--section-fill);
}
.ptfr-2027 #module-user-view-profile .mmfr-profile-panel-header :is(h3, p) { overflow-wrap: anywhere; }
.ptfr-2027 #module-user-view-profile .mmfr-profile-panel-header h3 { color: var(--brand); }
.ptfr-2027 #module-user-view-profile .mmfr-profile-panel-header p { color: var(--muted); font-size: .88rem; }
.ptfr-2027 #module-user-view-profile :is(.mmfr-profile-list, .mmfr-profile-history, .mmfr-profile-extra-list) {
  display: grid;
  gap: 9px;
  padding: 13px;
}
.ptfr-2027 #module-user-view-profile :is(.mmfr-profile-list-item, .mmfr-profile-history > li) {
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--panel-line);
  border-radius: var(--control-radius);
  background: var(--soft);
  overflow-wrap: anywhere;
}
.ptfr-2027 #module-user-view-profile .mmfr-profile-list-icon { border-radius: 8px; background: var(--tint); color: var(--brand); }
.ptfr-2027 #module-user-view-profile a.mmfr-profile-history-link {
  padding: 0;
  color: var(--link);
  text-decoration: none;
  font-weight: 650;
}
.ptfr-2027 #module-user-view-profile a.mmfr-profile-history-link:hover { color: var(--ink); }
.ptfr-2027 #module-user-view-profile .mmfr-profile-history-date { margin-top: 2px; color: var(--muted); font-size: .82rem; }
.ptfr-2027 #module-user-view-profile :is(.mmfr-profile-history-empty, .mmfr-profile-history-locked) {
  margin: 13px;
  padding: 12px;
  border: 1px solid var(--surface-edge);
  border-radius: var(--control-radius);
  background: var(--section-fill);
  color: var(--ink);
}
.ptfr-2027 #module-user-view-profile :is(.mmfr-profile-history-locked, .mmfr-profile-history-empty[role="alert"]) {
  border-color: #ca9c70;
  background: var(--warning-bg);
  color: var(--warning);
}
.ptfr-2027 #module-user-view-profile .mmfr-profile-history-lock-icon {
  border-radius: 9px;
  background: var(--warning);
  color: #fff;
}

/* Les cartes internes restent distinctes du panneau principal. */
.ptfr-2027 :is(.module-mini-top, .cell-header) {
  background: var(--heading-fill);
  color: var(--ink);
}
.ptfr-2027 .site-page-content :is(.ptfr-comments-filter, .ptfr-comments-empty, .message-container) {
  background: var(--nested-fill);
}
.ptfr-2027 .site-page-content fieldset { background: var(--nested-fill); }
.ptfr-2027 .site-page-content :is(footer, fieldset):empty,
.ptfr-2027 .site-page-content fieldset[id$="_captcha_fieldset"]:not(:has(> .fieldset-inset > .form-element)) {
  display: none;
}
.ptfr-2027 .site-page-content :is(.module-contents, .block-container, .cell) :is(.module-contents, .block-container, .cell) {
  background: var(--nested-fill);
  border-color: var(--surface-edge);
}
.ptfr-2027 #module-user-comments .ptfr-comments-filter fieldset { margin: 0; padding: 10px 14px; border: 0; }
.ptfr-2027 #module-user-comments .ptfr-comments-filter .form-element {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 7px 12px;
  margin: 0;
  padding: 0;
}
.ptfr-2027 #module-user-comments .ptfr-comments-filter .form-element > :is(label, .form-field) {
  width: auto;
  margin: 0;
  padding: 0;
  text-align: start;
}
.ptfr-2027 article.message[itemtype$="/Comment"] .message-container {
  border-color: var(--surface-edge);
  color: var(--ink);
}
.ptfr-2027 article.message[itemtype$="/Comment"] .message-date {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}
.ptfr-2027 article.message[itemtype$="/Comment"] .message-date .actions { margin: 0; }
.ptfr-2027 article.message[itemtype$="/Comment"] .message-content { color: var(--ink); }
/* PTFR-2027 V34 : boutons des commentaires et du verrouillage dans TOUS les modules.
   Les classes natives PHPBoost et le gabarit personnalisé sont tous deux pris en charge.
   IMPORTANT : ne pas dépendre de .site-page-content (absent autour du bugtracker). */
body.ptfr-2027 :is(#comments-list, #module-user-comments) :is(.ptfr-comment-actions, .message-date .actions, .message-actions) {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
}
body.ptfr-2027 :is(#comments-list, #module-user-comments) :is(.ptfr-comment-actions, .message-date .actions, .message-actions) > a,
body.ptfr-2027 :is(#comments-list, #module-user-comments) .ptfr-comment-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 37px;
  min-height: 37px;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid #bdd3e9;
  border-radius: 9px;
  background: #e7f1fc;
  color: #245a88;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: none;
  vertical-align: middle;
}
/* ID / permalien : bleu. */
body.ptfr-2027 :is(#comments-list, #module-user-comments) a:is(.ptfr-comment-action--anchor, [href^="#com"]),
body.ptfr-2027 :is(#comments-list, #module-user-comments) :is(.message-date .actions, .message-actions) > a[itemprop="url"] {
  background: #eaf2ff;
  border-color: #c8d8ef;
  color: #2b5b92;
  font-variant-numeric: tabular-nums;
}
/* Modifier : vert clair, même si l'ancien gabarit n'utilise pas nos classes. */
body.ptfr-2027 :is(#comments-list, #module-user-comments) a:is(.ptfr-comment-action--edit, [href*="edit_comment"], [href*="edit-comment"]),
body.ptfr-2027 :is(#comments-list, #module-user-comments) :is(.message-date .actions, .message-actions) > a:has(i:is(.fa-edit,.fa-pen-to-square,.fa-pencil,.fa-pencil-alt)) {
  background: #ccf1db;
  border-color: #98d4b1;
  color: #18613e;
}
/* Supprimer : rouge doux. */
body.ptfr-2027 :is(#comments-list, #module-user-comments) a:is(.ptfr-comment-action--delete, [href*="delete_comment"], [href*="delete-comment"]),
body.ptfr-2027 :is(#comments-list, #module-user-comments) :is(.message-date .actions, .message-actions) > a:has(i:is(.fa-delete,.fa-trash,.fa-trash-can,.fa-trash-alt)) {
  background: #fde8eb;
  border-color: #edbec7;
  color: #9e394c;
}
body.ptfr-2027 :is(#comments-list, #module-user-comments) :is(.ptfr-comment-actions, .message-date .actions, .message-actions) > a:is(:hover,:focus-visible),
body.ptfr-2027 :is(#comments-list, #module-user-comments) .ptfr-comment-action:is(:hover,:focus-visible) {
  filter: brightness(.95);
  text-decoration: none;
}
body.ptfr-2027 :is(#comments-list, #module-user-comments) :is(.ptfr-comment-actions, .message-date .actions, .message-actions) > a :is(i,.fa,.fas,.far),
body.ptfr-2027 :is(#comments-list, #module-user-comments) .ptfr-comment-action i {
  color: inherit;
  font-size: 1rem;
  line-height: 1;
}

/* V35 : bouton de moderation des commentaires, y compris lorsqu'il est hors de
   #comments-list dans le module bugtracker. Ne pas toucher aux liens ordinaires. */
body.ptfr-2027 :is(#comments-list, #module-bugtracker) :is(a.user-unlocked, a.user-locked),
body.ptfr-2027 #module-bugtracker .controls a[href*="lock="] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 9px;
  min-height: 40px;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid #e7c79f;
  border-radius: 9px;
  background: #fff0df;
  color: #8f5728;
  font-size: .94rem;
  font-weight: 690;
  line-height: 1.35;
  text-decoration: none;
  box-shadow: none;
  white-space: nowrap;
}
body.ptfr-2027 :is(#comments-list, #module-bugtracker) a.user-locked,
body.ptfr-2027 #module-bugtracker .controls a[href*="unlock"],
body.ptfr-2027 #module-bugtracker .controls a[href*="lock=0"] {
  background: #e4f3eb;
  border-color: #b4dbc5;
  color: #216748;
}
body.ptfr-2027 :is(#comments-list, #module-bugtracker) :is(a.user-unlocked, a.user-locked):is(:hover,:focus-visible),
body.ptfr-2027 #module-bugtracker .controls a[href*="lock="]:is(:hover,:focus-visible) {
  filter: brightness(.95);
  text-decoration: none;
}
body.ptfr-2027 :is(#comments-list, #module-bugtracker) :is(a.user-unlocked, a.user-locked) i,
body.ptfr-2027 #module-bugtracker .controls a[href*="lock="] i {
  color: inherit;
  font-size: 1.05rem;
  line-height: 1;
}
body.ptfr-2027 :is(#comments-list, #module-bugtracker) .controls.align-right:has(> :is(a.user-unlocked,a.user-locked,a[href*="lock="])) {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
}
@media (max-width: 600px) {
  body.ptfr-2027 :is(#comments-list, #module-user-comments) :is(.ptfr-comment-actions, .message-date .actions, .message-actions) > a,
  body.ptfr-2027 :is(#comments-list, #module-user-comments) .ptfr-comment-action {
    min-width: 40px;
    min-height: 40px;
  }
}

/* Le gabarit natif utilise encore #date-comments. */
.ptfr-2027 article.message[itemtype$="/Comment"] .message-date :is(.ptfr-comment-timestamp, #date-comments) {
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 4px 9px;
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  font-size: .85rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.ptfr-2027 article.message[itemtype$="/Comment"] .message-date #date-comments time { color: inherit; }
.ptfr-2027 .ptfr-dashboard-heading { display: block; }
.ptfr-2027 .ptfr-dashboard-heading p { margin: 8px 0 0; color: var(--ink); }
.ptfr-2027 #module-user-view-profile .mmfr-profile-panel-header { background: var(--heading-fill); }
.ptfr-2027 #module-user-view-profile :is(.mmfr-profile-list-item, .mmfr-profile-history > li) { background: var(--nested-fill); }

/* Tickets, recherche et listes filtrées. */
.ptfr-2027 .bugtracker-navigation { margin-bottom: 14px; }
.ptfr-2027 .bugtracker-navigation ul { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.ptfr-2027 .bugtracker-navigation a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 6px 11px;
  border: 1px solid var(--surface-edge);
  border-radius: 8px;
  background: var(--section-fill);
  color: var(--brand);
  font-weight: 650;
}
.ptfr-2027 .bugtracker-navigation a[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.ptfr-2027 .bugtracker-navigation a:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; }
.ptfr-2027 #module-bugtracker .bugtracker-filter { margin: 0 0 12px; }
.ptfr-2027 #module-bugtracker .bugtracker-filter a { background: var(--accent-teal); color: #fff; }
.ptfr-2027 #module-bugtracker .bugtracker-filter a:hover { background: var(--accent-teal-hover); color: #fff; }
.ptfr-2027 #module-bugtracker :is(#table_filters, .message-helper.notice) { margin-block: 10px; }

.ptfr-2027 #module-search .base2020-search-hero {
  gap: 12px;
  margin: 0 0 var(--panel-gap);
  padding: clamp(12px, 1.5vw, 20px);
  border-radius: 12px;
  background: var(--heading-fill);
}
.ptfr-2027 #module-search .base2020-search-hero p { margin: 5px 0 0; }
.ptfr-2027 :is(.base2020-search-hero-icon, .base2020-search-settings-icon, .base2020-search-results-icon) {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
}
.ptfr-2027 #module-search .base2020-search-query {
  padding: 14px;
  border: 1px solid var(--surface-edge);
  border-radius: 12px;
  background: var(--nested-fill);
}
.ptfr-2027 #module-search .base2020-search-query > label { margin: 0 0 7px; font-weight: 650; }
.ptfr-2027 #module-search .base2020-search-input-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.ptfr-2027 #module-search .base2020-search-input-icon { display: none; }
.ptfr-2027 #module-search .base2020-search-input-row input[type="search"],
.ptfr-2027 #module-search .base2020-search-submit.submit {
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
}
.ptfr-2027 #module-search .base2020-search-submit.submit { background: var(--accent-teal); color: #fff; }
.ptfr-2027 #module-search .base2020-search-submit.submit:hover { background: var(--accent-teal-hover); color: #fff; }
.ptfr-2027 #module-search .base2020-search-hint { margin-top: 8px; color: var(--muted); }
.ptfr-2027 #module-search .base2020-search-settings {
  margin-top: var(--panel-gap);
  padding: 14px;
  border: 1px solid var(--surface-edge);
  border-radius: 12px;
  background: var(--nested-fill);
}
.ptfr-2027 #module-search .base2020-search-settings-header { gap: 10px; padding: 0; }
.ptfr-2027 #module-search .base2020-search-settings-header p { margin: 4px 0 0; color: var(--muted); }
.ptfr-2027 #module-search #forms-selection.base2020-search-tabs { gap: 7px; margin: 12px 0; padding: 0; }
.ptfr-2027 #module-search .base2020-search-tab {
  min-height: 38px;
  padding: 6px 10px;
  border-color: var(--surface-edge);
  background: var(--section-fill);
  color: var(--brand);
}
.ptfr-2027 #module-search .base2020-search-tab:hover { background: var(--heading-fill); color: var(--brand); }
.ptfr-2027 #module-search .base2020-search-tab[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.ptfr-2027 #module-search .base2020-search-options-panel { min-height: 0; margin: 0; padding: 0; border: 0; background: transparent; }
.ptfr-2027 #module-search .base2020-search-options-panel fieldset {
  margin: 0;
  padding: 12px;
  background: var(--section-fill);
  border-color: var(--surface-edge);
}
.ptfr-2027 #module-search .base2020-search-module-field {
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 12px;
}
.ptfr-2027 #module-search .base2020-search-options-panel .form-element {
  grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
  gap: 8px 12px;
  padding: 8px 0;
}
.ptfr-2027 #module-search select.list-modules { min-height: 104px; }
.ptfr-2027 #module-search .base2020-search-no-options { min-height: 0; padding: 10px; }
.ptfr-2027 #results .base2020-search-results-header { background: var(--heading-fill); }
@media (max-width: 640px) {
  .ptfr-2027 #module-search .base2020-search-input-row,
  .ptfr-2027 #module-search .base2020-search-module-field,
  .ptfr-2027 #module-search .base2020-search-options-panel .form-element { grid-template-columns: minmax(0, 1fr); }
}

/* Publications, signatures et actions du forum. */
.ptfr-2027 #module-forum #article-forum-membermsg { padding: 0; }
.ptfr-2027 #module-forum .ptfr-membermsg-list { display: grid; gap: var(--panel-gap); padding: clamp(12px, 1.5vw, 20px); }
.ptfr-2027 #module-forum .ptfr-membermsg-card {
  margin: 0;
  border: 1px solid var(--surface-edge);
  border-radius: 12px;
  background: var(--nested-fill);
}
.ptfr-2027 #module-forum .ptfr-membermsg-card-header {
  border-bottom: 1px solid var(--surface-edge);
  border-radius: 11px 11px 0 0;
  background: var(--heading-fill);
}
.ptfr-2027 #module-forum :is(.ptfr-membermsg-button, .ptfr-membermsg-scroll a) {
  background: var(--brand);
  color: #fff;
  border-radius: var(--control-radius);
}
.ptfr-2027 #module-forum :is(.ptfr-membermsg-button, .ptfr-membermsg-scroll a):hover { background: var(--brand-hover); color: #fff; }
.ptfr-2027 #module-forum :is(.msg-sign, .msg-sign2) {
  padding: 12px clamp(12px, 2vw, 20px);
  border-top: 1px solid var(--surface-edge);
  border-radius: 0 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px);
  background: var(--heading-fill);
  color: var(--ink);
}
.ptfr-2027 #module-forum :is(.msg-sign-mbr, .ptfr-membermsg-signature) {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--surface-edge);
  border-radius: 9px;
  background: var(--nested-fill);
  overflow-wrap: anywhere;
}
.ptfr-2027 #module-forum .msg-sign-mbr { display: block; float: none; width: auto; }
.ptfr-2027 #module-forum .ptfr-membermsg-signature { margin: 0 1.1em 10px; background: var(--heading-fill); }
.ptfr-2027 #module-forum .forum-signature-title { margin: 0 0 5px; color: var(--brand); font-size: .79rem; font-weight: 700; }
.ptfr-2027 #module-forum .forum-signature-text :is(img, video) { max-width: 100%; max-height: 120px; object-fit: contain; }
.ptfr-2027 #module-forum .msg-sign-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 9px 16px;
  padding: 0;
  border-top: 0;
}
.ptfr-2027 #module-forum .msg-sign-info > .spacer { display: none; }
.ptfr-2027 #module-forum .msg-sign-info .ptfr-message-actions {
  float: none;
  margin: 0 0 0 auto;
  padding: 0;
}
.ptfr-2027 #module-forum .msg-sign-info .ptfr-message-actions:not(:has(> a)) { display: none; }
.ptfr-2027 #module-forum #forum-bottom { margin-block-start: var(--panel-gap); padding: 0; }
.ptfr-2027 #module-forum .forum-online-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 7px 12px;
}
.ptfr-2027 #module-forum .forum-online > :not(.spacer) + .forum-online-stats {
  margin-top: 10px;
}
.ptfr-2027 #module-forum .footer-forum:not(:has(.actions a)) { display: none; }
/* Les commandes de verrouillage et déplacement restent autonomes : aucun cartouche parent. */
.ptfr-2027 #module-forum .footer-forum .actions {
  float: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  margin: 8px 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
/* Les commandes du pied général du forum conservent leur présentation. */
.ptfr-2027 #module-forum #forum-bottom .forum-message-options {
  float: none;
  width: fit-content;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--surface-edge);
  border-radius: 11px;
  background: var(--nested-fill);
}
.ptfr-2027 #module-forum .forum-topic-help {
  margin: var(--panel-gap) 0;
  padding: 12px 15px;
  border: 1px solid var(--surface-edge);
  border-radius: 11px;
  background: #f9d9a0;
}
.ptfr-2027 #module-forum .forum-topic-help h2 { margin: 0 0 5px; font-size: 1rem; }
.ptfr-2027 #module-forum .forum-topic-help p { margin: 0; }

/* PTFR-2027 — corrections transversales V2026-11 : surface, titres et commandes. */
.ptfr-2027 {
  --surface-edge: #a5b6c8;
  --section-fill: #edf3f9;
  --nested-fill: #f4f7fa;
  --heading-fill: #c5d9ef;
}
/* Profondeur visuelle stable : un seul sous-niveau marqué, sans zébrage récursif. */
.ptfr-2027 .site-page-content :is(.module-contents,.block-container,.cell) > :is(.module-contents,.block-container,.cell) {
  background: var(--soft);
  border-color: var(--line);
  box-shadow: none;
}
.ptfr-2027 .site-page-content :is(.module-contents,.block-container,.cell) > :is(.module-contents,.block-container,.cell) > :is(.module-contents,.block-container,.cell) {
  background: transparent;
  border: 0;
  padding: 0;
}
/* Titres de formulaires, notamment Édition du profil / Gestion du membre : intégrés visuellement dans un cartouche. */
.ptfr-2027 .site-page-content > h1,
.ptfr-2027 .site-page-content > form > h1,
.ptfr-2027 .site-page-content :is(#module-user, [id^="module-user-"]) > h1,
.ptfr-2027 .site-page-content :is(#module-user, [id^="module-user-"]) > header > h1 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin: 0 0 18px;
  padding: 10px 16px;
  border: 1px solid var(--brand);
  border-radius: var(--control-radius);
  background: var(--brand);
  color: #fff;
  font-size: clamp(1.25rem, 2.5vw, 1.8rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.ptfr-2027 .site-page-content fieldset:not(.fieldset-submit) > legend {
  display: table;
  max-width: calc(100% - 20px);
  margin: 0 0 10px 7px;
  padding: 7px 13px;
  border: 1px solid var(--brand);
  border-radius: var(--control-radius);
  background: var(--brand);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}
.ptfr-2027 .site-page-content fieldset:not(.fieldset-submit) > legend :is(h1, h2, h3, strong, span, i) { color: inherit; font-size: inherit; margin: 0; }
.ptfr-2027 .site-page-content fieldset:not(.fieldset-submit) { border-color: var(--surface-edge); }
/* Boutons contrastés ; couleurs distinctes selon l'action et survol uniquement en couleur. */
.ptfr-2027 .site-page-content :is(.basic-button, .button, button, input[type="submit"], input[type="button"]):not(:is(.forum-poll-vote, .forum-signature-trigger, .forum-member-trigger, .ptfr-message-action, .ptfr-comment-action, .modal-close, .popup-close, .fa, .fas, .far, .fab, [class*="toolbar"], [class*="editor"], [class*="picker"], [class*="icon-only"], button.reset, [type="reset"], .bbcode-toolbar button, .bbcode-editor button, [id*="editor"] button, .tox button, .mce-tinymce button, .form-field-date button)) {
  border: 1px solid var(--brand);
  border-radius: var(--control-radius);
  background: var(--brand);
  color: #fff;
  text-shadow: none;
  box-shadow: none;
  transition: background-color .12s ease, border-color .12s ease;
}
.ptfr-2027 .site-page-content :is(.basic-button, .button, button, input[type="submit"], input[type="button"]):not(:is(.forum-poll-vote, .forum-signature-trigger, .forum-member-trigger, .ptfr-message-action, .ptfr-comment-action, .modal-close, .popup-close, .fa, .fas, .far, .fab, [class*="toolbar"], [class*="editor"], [class*="picker"], [class*="icon-only"], button.reset, [type="reset"], .bbcode-toolbar button, .bbcode-editor button, [id*="editor"] button, .tox button, .mce-tinymce button, .form-field-date button)):is(:hover, :focus-visible) {
  border-color: var(--brand-hover);
  background: var(--brand-hover);
  color: #fff;
  transform: none;
}
/* Défaut / Réinitialiser : couleur orangée pour distinguer l'action de remise à zéro. */
body.ptfr-2027 .site-page-content :is(button[type="reset"], input[type="reset"], button.reset, .button-reset) {
  border: 1px solid #b77c36; background: #c58338; color: #fff;
  font-weight: 680; box-shadow: none;
}
body.ptfr-2027 .site-page-content :is(button[type="reset"], input[type="reset"], button.reset, .button-reset):is(:hover,:focus-visible) {
  border-color: #985d22; background: #ac692b; color: #fff;
}
.ptfr-2027 .site-page-content :is(.button-danger, .btn-danger, .delete-button, .ptfr-moderation-action--reject) { background: var(--danger); border-color: var(--danger); color: #fff; }
.ptfr-2027 .site-page-content :is(.button-danger, .btn-danger, .delete-button, .ptfr-moderation-action--reject):is(:hover, :focus-visible) { background: var(--danger-hover); border-color: var(--danger-hover); color: #fff; }
.ptfr-2027 .site-page-content :is(button, .button, .basic-button, input[type="submit"], input[type="reset"]) :is(i, svg) { color: inherit; }
/* Tout conserver lisible sur étroit écran. */
.ptfr-2027 .site-page-content :is(.content, .module-contents, .block-container, .cell, fieldset) { min-width: 0; }
.ptfr-2027 .site-page-content :is(.content, .module-contents, .block-container, .cell, fieldset) :is(h1, h2, h3, legend, label) { overflow-wrap: anywhere; }


/* Liens du corps des pages : pas de soulignement forcé. Les boutons gardent leur fond. */
body.ptfr-2027 .site-page-content :is(.page-content, .forum-post-content, .news-entry-prose, .article-content, .message-content) a:not(.button):not(.basic-button):not(.small-button):not([role="button"]),
body.ptfr-2027 .site-page-content :is(.page-content, .forum-post-content, .news-entry-prose, .article-content, .message-content) a.b19-text-link {
  text-decoration: none; text-decoration-line: none;
}
body.ptfr-2027 .site-page-content :is(.page-content, .forum-post-content, .news-entry-prose, .article-content, .message-content) a:not(.button):not(.basic-button):not([role="button"]):is(:hover,:focus-visible) {
  text-decoration: none;
}

/* PTFR-2027 V26 — liens mis en valeur dans les zones de texte.
   Les boutons, la navigation et les habillages BBCode restent inchangés. */
body.ptfr-2027 .site-page-content :is(.page-content, .forum-post-content, .news-entry-prose, .article-content, .message-content, .article-pages .content, .article-news [itemprop="text"], [itemprop="text"]) a:is(.ptfr-text-link, .b19-text-link):not(:has(.message-helper, .formatter-container, .formatter-block, .formatter-blockquote, .formatter-hide, .formatter-code, .formatter-fieldset, .bbcode-block)):not(:is(.message-helper a, .formatter-container a, .formatter-block a, .formatter-blockquote a, .formatter-hide a, .formatter-code a, .formatter-fieldset a, .bbcode-block a)):not(.button):not(.basic-button):not(.small-button):not([role="button"]) {
  display: inline;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: .08em .34em .14em;
  margin: 0 .06em;
  border: 1px solid #d7e5f4;
  border-radius: 7px;
  background: #edf5ff;
  color: #1d5d95;
  font-weight: 680;
  text-decoration: none;
  box-shadow: inset 0 1px 0 #ffffffc4;
}
body.ptfr-2027 .site-page-content :is(.page-content, .forum-post-content, .news-entry-prose, .article-content, .message-content, .article-pages .content, .article-news [itemprop="text"], [itemprop="text"]) a:is(.ptfr-text-link, .b19-text-link):not(:has(.message-helper, .formatter-container, .formatter-block, .formatter-blockquote, .formatter-hide, .formatter-code, .formatter-fieldset, .bbcode-block)):not(:is(.message-helper a, .formatter-container a, .formatter-block a, .formatter-blockquote a, .formatter-hide a, .formatter-code a, .formatter-fieldset a, .bbcode-block a)):visited:not(.button):not(.basic-button):not(.small-button):not([role="button"]) {
  color: #225d91;
}
body.ptfr-2027 .site-page-content :is(.page-content, .forum-post-content, .news-entry-prose, .article-content, .message-content, .article-pages .content, .article-news [itemprop="text"], [itemprop="text"]) a:is(.ptfr-text-link, .b19-text-link):not(:has(.message-helper, .formatter-container, .formatter-block, .formatter-blockquote, .formatter-hide, .formatter-code, .formatter-fieldset, .bbcode-block)):not(:is(.message-helper a, .formatter-container a, .formatter-block a, .formatter-blockquote a, .formatter-hide a, .formatter-code a, .formatter-fieldset a, .bbcode-block a)):is(:hover, :focus-visible):not(.button):not(.basic-button):not(.small-button):not([role="button"]) {
  background: #e1efff;
  border-color: #bfd6ee;
  color: #184d7d;
  text-decoration: none;
}
body.ptfr-2027 .site-page-content :is(.page-content, .forum-post-content, .news-entry-prose, .article-content, .message-content, .article-pages .content, .article-news [itemprop="text"], [itemprop="text"]) a:is(.ptfr-external-link.ptfr-text-link, .b19-text-link.b19-link-external):not(:has(.message-helper, .formatter-container, .formatter-block, .formatter-blockquote, .formatter-hide, .formatter-code, .formatter-fieldset, .bbcode-block)):not(:is(.message-helper a, .formatter-container a, .formatter-block a, .formatter-blockquote a, .formatter-hide a, .formatter-code a, .formatter-fieldset a, .bbcode-block a)):not(.button):not(.basic-button):not(.small-button):not([role="button"]) {
  background: #fff2e6;
  border-color: #efcfb1;
  color: #9a5822;
}
body.ptfr-2027 .site-page-content :is(.page-content, .forum-post-content, .news-entry-prose, .article-content, .message-content, .article-pages .content, .article-news [itemprop="text"], [itemprop="text"]) a:is(.ptfr-external-link.ptfr-text-link, .b19-text-link.b19-link-external):not(:has(.message-helper, .formatter-container, .formatter-block, .formatter-blockquote, .formatter-hide, .formatter-code, .formatter-fieldset, .bbcode-block)):not(:is(.message-helper a, .formatter-container a, .formatter-block a, .formatter-blockquote a, .formatter-hide a, .formatter-code a, .formatter-fieldset a, .bbcode-block a)):is(:hover, :focus-visible):not(.button):not(.basic-button):not(.small-button):not([role="button"]) {
  background: #fee7d3;
  border-color: #e5c19d;
  color: #82461a;
}
body.ptfr-2027 .site-page-content :is(.page-content, .forum-post-content, .news-entry-prose, .article-content, .message-content, .article-pages .content, .article-news [itemprop="text"], [itemprop="text"]) a:is(.ptfr-external-link.ptfr-text-link, .b19-text-link.b19-link-external):not(:has(.message-helper, .formatter-container, .formatter-block, .formatter-blockquote, .formatter-hide, .formatter-code, .formatter-fieldset, .bbcode-block)):not(:is(.message-helper a, .formatter-container a, .formatter-block a, .formatter-blockquote a, .formatter-hide a, .formatter-code a, .formatter-fieldset a, .bbcode-block a)) :is(.ptfr-external-link-icon, .forum-external-link-icon, .b19-link-external-icon, .fa-external-link, .fa-external-link-alt, .fa-up-right-from-square) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: .48em;
  color: currentColor;
  font-size: .82em;
  line-height: 1;
  vertical-align: .04em;
  opacity: .92;
}

/* PTFR-2027 V27 — dans les citations, les liens doivent être habillés comme dans les autres zones de texte. */
body.ptfr-2027 .site-page-content :is(.formatter-blockquote, .formatter-container.formatter-blockquote, .bbcode-blockquote, blockquote) a:is(.ptfr-text-link, .b19-text-link):not(.button):not(.basic-button):not(.small-button):not([role="button"]) {
  display: inline;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: .08em .34em .14em;
  margin: 0 .06em;
  border: 1px solid #d7e5f4;
  border-radius: 7px;
  background: #edf5ff;
  color: #1d5d95;
  font-weight: 680;
  text-decoration: none;
  box-shadow: inset 0 1px 0 #ffffffc4;
}
body.ptfr-2027 .site-page-content :is(.formatter-blockquote, .formatter-container.formatter-blockquote, .bbcode-blockquote, blockquote) a:is(.ptfr-text-link, .b19-text-link):visited:not(.button):not(.basic-button):not(.small-button):not([role="button"]) {
  color: #225d91;
}
body.ptfr-2027 .site-page-content :is(.formatter-blockquote, .formatter-container.formatter-blockquote, .bbcode-blockquote, blockquote) a:is(.ptfr-text-link, .b19-text-link):is(:hover, :focus-visible):not(.button):not(.basic-button):not(.small-button):not([role="button"]) {
  background: #e1efff;
  border-color: #bfd6ee;
  color: #184d7d;
  text-decoration: none;
}
body.ptfr-2027 .site-page-content :is(.formatter-blockquote, .formatter-container.formatter-blockquote, .bbcode-blockquote, blockquote) a:is(.ptfr-external-link.ptfr-text-link, .b19-text-link.b19-link-external):not(.button):not(.basic-button):not(.small-button):not([role="button"]) {
  background: #fff2e6;
  border-color: #efcfb1;
  color: #9a5822;
}
body.ptfr-2027 .site-page-content :is(.formatter-blockquote, .formatter-container.formatter-blockquote, .bbcode-blockquote, blockquote) a:is(.ptfr-external-link.ptfr-text-link, .b19-text-link.b19-link-external):is(:hover, :focus-visible):not(.button):not(.basic-button):not(.small-button):not([role="button"]) {
  background: #fee7d3;
  border-color: #e5c19d;
  color: #82461a;
}
body.ptfr-2027 .site-page-content :is(.formatter-blockquote, .formatter-container.formatter-blockquote, .bbcode-blockquote, blockquote) a:is(.ptfr-external-link.ptfr-text-link, .b19-text-link.b19-link-external) :is(.ptfr-external-link-icon, .forum-external-link-icon, .b19-link-external-icon, .fa-external-link, .fa-external-link-alt, .fa-up-right-from-square) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: .48em;
  color: currentColor;
  font-size: .82em;
  line-height: 1;
  vertical-align: .04em;
  opacity: .92;
}



/* PTFR-2027 V38 — sondage forum : titre lisible à gauche et actions identiques.
   Définition placée dans le CSS chargé après les feuilles des modules pour éviter
   les divergences d'aspect entre le bouton de vote et le lien des résultats. */
body.ptfr-2027 .forum-poll-table thead th#titre-sondage {
  text-align: left;
  vertical-align: middle;
  padding: 15px 20px;
  font-size: clamp(1.2rem, 1.4vw, 1.42rem);
  font-weight: 750;
  line-height: 1.35;
  color: #1b4166;
  background: #e7f0fa;
}
body.ptfr-2027 .forum-poll-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 160px));
  justify-content: center;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  margin: 16px 0 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.ptfr-2027 .forum-poll-actions > :is(button.forum-poll-vote, a.forum-poll-results) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 48px;
  min-width: 0;
  min-height: 48px;
  max-width: none;
  box-sizing: border-box;
  flex: none;
  margin: 0;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: inherit;
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  text-align: center;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
  transition: background-color .13s ease, border-color .13s ease, color .13s ease;
}
body.ptfr-2027 .forum-poll-actions > button.forum-poll-vote {
  background: #256f66;
  border-color: #256f66;
  color: #fff;
}
body.ptfr-2027 .forum-poll-actions > button.forum-poll-vote:is(:hover, :focus-visible) {
  background: #32857b;
  border-color: #32857b;
  color: #fff;
}
body.ptfr-2027 .forum-poll-actions > a.forum-poll-results,
body.ptfr-2027 .forum-poll-actions > a.forum-poll-results:visited {
  background: #234b73;
  border-color: #234b73;
  color: #fff;
  text-decoration: none;
}
body.ptfr-2027 .forum-poll-actions > a.forum-poll-results:is(:hover, :focus-visible) {
  background: #34658e;
  border-color: #34658e;
  color: #fff;
  text-decoration: none;
}
body.ptfr-2027 .forum-poll-actions > :is(button.forum-poll-vote, a.forum-poll-results) :is(i, svg) {
  color: inherit;
  font-size: 1.07em;
  line-height: 1;
  margin: 0;
  flex: none;
}
@media (max-width: 420px) {
  body.ptfr-2027 .forum-poll-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  body.ptfr-2027 .forum-poll-actions > :is(button.forum-poll-vote, a.forum-poll-results) {
    font-size: .91rem;
    padding: 0 8px;
  }
  body.ptfr-2027 .forum-poll-table thead th#titre-sondage {
    padding: 13px 14px;
    font-size: 1.15rem;
  }
}

/* V64 — Commentaires sur mobile : toutes les lignes utilisent le même retrait.
   Portée volontairement limitée aux commentaires Schema.org ; les MP et le forum
   gardent leurs mises en page. */
@media (max-width: 600px) {
  body.ptfr-2027 article.message[itemtype$="/Comment"] {
    width: 100%;
    max-width: 100%;
    margin: 0 0 16px;
    box-sizing: border-box;
  }
  body.ptfr-2027 article.message[itemtype$="/Comment"] > .message-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 15px;
  }
  body.ptfr-2027 article.message[itemtype$="/Comment"] .message-user-infos {
    position: static;
    display: flex;
    flex: none;
    float: none;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    text-align: left;
  }
  body.ptfr-2027 article.message[itemtype$="/Comment"] .message-user-infos .message-pseudo {
    float: none;
    order: 2;
    min-width: 0;
    margin: 0;
    padding: 0;
    text-align: left;
    overflow-wrap: anywhere;
  }
  body.ptfr-2027 article.message[itemtype$="/Comment"] .message-user-infos img.message-avatar {
    position: static;
    float: none;
    order: 1;
    display: block;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    max-width: 52px;
    max-height: 52px;
    margin: 0;
    padding: 0;
    object-fit: contain;
  }
  body.ptfr-2027 article.message[itemtype$="/Comment"] .message-date {
    display: flex;
    float: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 9px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    text-align: left;
    box-sizing: border-box;
  }
  body.ptfr-2027 article.message[itemtype$="/Comment"] .message-date :is(.ptfr-comment-actions, .actions) {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }
  body.ptfr-2027 article.message[itemtype$="/Comment"] .message-date :is(.ptfr-comment-timestamp, #date-comments) {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    margin: 0;
    padding: 7px 11px;
    line-height: 1.35;
    white-space: normal;
  }
  body.ptfr-2027 article.message[itemtype$="/Comment"] .message-message {
    display: block;
    float: none;
    clear: none;
    width: 100%;
    min-height: 0;
    min-width: 0;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    text-align: left;
  }
  body.ptfr-2027 article.message[itemtype$="/Comment"] .message-content {
    margin: 0;
    padding: 0;
    overflow-wrap: anywhere;
  }
}

/* V90 Profil : panneau blanc central, sous-cartes gris bleuté à contraste réel. */
.ptfr-2027 #module-user-view-profile .mmfr-profile-stats-panel{
  margin:0;min-width:0;padding:clamp(13px,1.7vw,22px);border:1px solid #a7bbca;
  border-radius:12px;background:#fff;box-shadow:none;
}
.ptfr-2027 #module-user-view-profile .mmfr-profile-stats{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;min-width:0;margin:0;
}
.ptfr-2027 #module-user-view-profile .mmfr-profile-stats .mmfr-profile-stat{
  display:flex;gap:13px;align-items:flex-start;min-width:0;min-height:136px;
  border:1px solid #b4c6d5;border-radius:9px;padding:16px;
  background:#e7eff6;color:#17324d;box-shadow:none;
}
.ptfr-2027 #module-user-view-profile .mmfr-profile-stats .mmfr-profile-stat-icon{
  flex:0 0 46px;width:46px;height:46px;border-radius:9px;background:#234766;color:#fff;
}
.ptfr-2027 #module-user-view-profile .mmfr-profile-stats .mmfr-profile-stat-content{min-width:0;overflow-wrap:anywhere}
.ptfr-2027 #module-user-view-profile .mmfr-profile-stats :is(.mmfr-profile-stat-value,.mmfr-profile-stat-label){color:#17324d}
.ptfr-2027 #module-user-view-profile .mmfr-profile-stats .mmfr-profile-stat-link{color:#19557a}
.ptfr-2027 #module-user-view-profile .mmfr-profile-stats .mmfr-profile-stat-link:hover{color:#13374e}
@media(max-width:1100px){.ptfr-2027 #module-user-view-profile .mmfr-profile-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.ptfr-2027 #module-user-view-profile .mmfr-profile-stats{grid-template-columns:1fr}.ptfr-2027 #module-user-view-profile .mmfr-profile-stats .mmfr-profile-stat{min-height:0}}

/* V92 : profil structuré, sans décorations empilées sous le pseudo. */
body.ptfr-2027 #module-user-view-profile .mmfr-profile-hero--v92 {
    display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start;
    gap:clamp(14px,2vw,28px); padding:clamp(16px,2vw,27px); background:#fff;
}
body.ptfr-2027 #module-user-view-profile .mmfr-profile-hero--v92 .mmfr-profile-identity {
    display:grid;grid-template-columns:92px minmax(0,1fr);align-items:start;gap:22px;
    min-width:0;flex:none;width:100%;max-width:100%;
}
body.ptfr-2027 #module-user-view-profile .mmfr-profile-hero--v92 .mmfr-profile-avatar {
    display:flex;align-items:center;justify-content:center;width:92px;height:92px;max-width:100%;
    margin:0;position:static;flex:none;
}
body.ptfr-2027 #module-user-view-profile .mmfr-profile-hero--v92 .mmfr-profile-heading {
    display:flex;flex-direction:column;align-items:flex-start;gap:12px;min-width:0;margin:0;padding:0;
}
body.ptfr-2027 #module-user-view-profile .mmfr-profile-hero--v92 .mmfr-profile-kicker {margin:0;}
body.ptfr-2027 #module-user-view-profile .mmfr-profile-hero--v92 .mmfr-profile-name-row {
    display:flex;align-items:center;flex-wrap:wrap;gap:10px 13px;min-width:0;
}
body.ptfr-2027 #module-user-view-profile .mmfr-profile-hero--v92 .mmfr-profile-name-row h2 {
    margin:0;line-height:1.3;overflow-wrap:anywhere;min-width:0;
}
body.ptfr-2027 #module-user-view-profile .mmfr-profile-hero--v92 .mmfr-profile-name-row > .trux-deco {margin:0;flex:none;max-width:100%;}
body.ptfr-2027 #module-user-view-profile .mmfr-profile-hero--v92 .mmfr-profile-badges {
    display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0;margin:0;
}
body.ptfr-2027 #module-user-view-profile .mmfr-profile-hero--v92 .mmfr-profile-cosmetics {
    display:flex;flex-wrap:wrap;align-items:center;gap:9px;max-width:100%;min-width:0;
    margin:0;width:auto;
}
body.ptfr-2027 #module-user-view-profile .mmfr-profile-hero--v92 .mmfr-profile-cosmetics:empty {display:none;}
body.ptfr-2027 #module-user-view-profile .mmfr-profile-hero--v92 .mmfr-profile-actions {
    display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:8px;
    min-width:170px;margin:0;flex:none;max-width:230px;
}
body.ptfr-2027 #module-user-view-profile .mmfr-profile-hero--v92 .mmfr-profile-actions a.mmfr-profile-action {white-space:normal;text-align:center;}
@media(max-width:800px){
 body.ptfr-2027 #module-user-view-profile .mmfr-profile-hero--v92 {grid-template-columns:minmax(0,1fr);}
 body.ptfr-2027 #module-user-view-profile .mmfr-profile-hero--v92 .mmfr-profile-actions {flex-direction:row;flex-wrap:wrap;max-width:none;min-width:0;}
}
@media(max-width:540px){
 body.ptfr-2027 #module-user-view-profile .mmfr-profile-hero--v92 .mmfr-profile-identity {grid-template-columns:64px minmax(0,1fr);gap:12px;}
 body.ptfr-2027 #module-user-view-profile .mmfr-profile-hero--v92 .mmfr-profile-avatar {width:64px;height:64px;}
 body.ptfr-2027 #module-user-view-profile .mmfr-profile-hero--v92 .mmfr-profile-name-row h2 {font-size:1.4rem;}
 body.ptfr-2027 #module-user-view-profile .mmfr-profile-hero--v92 .mmfr-profile-actions {flex-direction:column;align-items:stretch;}
}

/* V93 — Profil: récompenses sur une ligne avec le statut, sans signature en en-tête. */
body.ptfr-2027 #module-user-view-profile .mmfr-profile-hero--v92 .mmfr-profile-badges {
    display:flex;flex-wrap:wrap;align-items:center;gap:9px 11px;
}
body.ptfr-2027 #module-user-view-profile .mmfr-profile-hero--v92 .mmfr-profile-badges .mmfr-profile-cosmetics {
    display:inline-flex;align-items:center;flex-wrap:wrap;gap:9px;margin:0;min-width:0;width:auto;max-width:100%;
}
body.ptfr-2027 #module-user-view-profile .mmfr-profile-hero--v92 .mmfr-profile-badges .mmfr-profile-cosmetics > :is(.trux-badge,.trux-plate) {
    flex:0 1 auto;width:auto;min-width:0;max-width:180px;height:auto;min-height:34px;
}
/* La récompense signature ne doit jamais recevoir une pastille blanche au survol du lien. */
body.ptfr-2027 #module-forum .trux-signature a.trux-presentation-link,
body.ptfr-2027 #module-forum .trux-signature a.trux-presentation-link:is(:link,:visited,:hover,:focus-visible),
body.ptfr-2027 #module-forum .trux-signature .trux-presentation-preview {
    display:inline-flex!important;width:fit-content;max-width:100%;align-items:center;gap:6px;
    padding:0!important;margin:0!important;border:0!important;border-radius:0!important;
    background:transparent!important;color:var(--tx-signature-fg,#17324d)!important;
    font-size:14px!important;font-weight:700!important;text-decoration:underline!important;
    text-underline-offset:3px;box-shadow:none!important;filter:none!important;opacity:1!important;
}
body.ptfr-2027 #module-forum .trux-signature a.trux-presentation-link :is(i,svg,span) {color:inherit!important;}
body.ptfr-2027 #module-forum .trux-signature a.trux-presentation-link:focus-visible {
    outline:2px solid currentColor!important;outline-offset:4px;
}
@media(max-width:540px){
    body.ptfr-2027 #module-user-view-profile .mmfr-profile-hero--v92 .mmfr-profile-badges .mmfr-profile-cosmetics {width:100%;}
}


/* V94 — racine du double fond : .mmfr-profile-extra-item héritait de
   --nested-fill comme une carte. Un champ libre n'est PAS une carte :
   seul son contenu BBCode (bouton/notice) reçoit un habillage. */
body.ptfr-2027 #module-user-view-profile .mmfr-profile-extra-list .mmfr-profile-extra-item,
body.ptfr-2027 #module-user-view-profile .mmfr-profile-extra-list .mmfr-profile-extra-item:first-child,
body.ptfr-2027 #module-user-view-profile .mmfr-profile-extra-list .mmfr-profile-extra-item:last-child {
    margin: 0; padding: 0; min-width: 0; border: 0;
    border-radius: 0; background: transparent; box-shadow: none;
}
body.ptfr-2027 #module-user-view-profile .mmfr-profile-extra-item .mmfr-profile-extra-title {
    margin: 0 0 10px;
}
/* V96: two independent signature sections; original text never touches the TRUX panel. */
body.ptfr-2027 #module-forum .forum-signature-text {
    display: flex; flex-direction: column; align-items: stretch;
    gap: 16px; min-width: 0; line-height: 1.55;
}
body.ptfr-2027 #module-forum .forum-signature-text > .trux-signature {
    display: flex; flex: 0 0 auto; min-height: 0; max-height: none;
    width: 100%; max-width: 100%; margin: 0; padding: 18px 20px;
    box-sizing: border-box; overflow: visible;
}
body.ptfr-2027 #module-forum .forum-signature-text > .forum-original-signature {
    display: block; min-width: 0; width: 100%; margin: 0;
    padding: 0 2px; box-sizing: border-box;
    line-height: 1.65; overflow-wrap: anywhere;
}
body.ptfr-2027 #module-forum .forum-signature-text > .forum-original-signature > :first-child {margin-top: 0;}
body.ptfr-2027 #module-forum .forum-signature-text > .forum-original-signature > :last-child {margin-bottom: 0;}

/* V96: profile's BBCode content remains in its own colored block, not a second blue wrapper. */
body.ptfr-2027 #module-user-view-profile .mmfr-profile-extra-list {
    display: flex; flex-direction: column; gap: 18px;
}
body.ptfr-2027 #module-user-view-profile .mmfr-profile-extra-list .mmfr-profile-extra-item {
    margin: 0; padding: 0; background: transparent; border: 0;
}
body.ptfr-2027 #module-user-view-profile .mmfr-profile-extra-value {
    display: flow-root; min-width: 0; line-height: 1.6;
}
body.ptfr-2027 #module-user-view-profile .mmfr-profile-extra-value > :is(.message-helper,.formatter-container,.formatter-block,.bbcode-block) {
    margin-block: 12px; max-width: 100%; box-sizing: border-box;
}
body.ptfr-2027 #module-user-view-profile .mmfr-profile-extra-value > :first-child {margin-top: 0;}
body.ptfr-2027 #module-user-view-profile .mmfr-profile-extra-value > :last-child {margin-bottom: 0;}
body.ptfr-2027 #module-user-view-profile .mmfr-profile-extra-value :is(p,ul,ol) {line-height:1.6;}
/* V99 : les liens qui enveloppaient des encarts BBCode sont retires
   de la structure par links.js. Pas de styles compensatoires sur <a>. */

/* Icône des liens textuels uniquement : une marge unique pour les deux types. */
body.ptfr-2027 .site-page-content :is(.forum-post-content,.forum-signature-text,.ptfr-membermsg-body,.ptfr-membermsg-signature,.article-pages .content,[itemprop="text"],.message-content) a:is(.ptfr-text-link,.b19-text-link) > .ptfr-text-link-affix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: .58em;
    padding: 0;
    white-space: nowrap;
    vertical-align: .05em;
    font-size: .86em;
    line-height: 1;
    color: currentColor;
}
body.ptfr-2027 .site-page-content a.ptfr-text-link > .ptfr-text-link-affix > i {
    display: inline-block;
    margin: 0 !important; /* marge portée uniquement par l'affixe */
    padding: 0;
    color: inherit;
}
/* Liens éditoriaux historiques : même espacement sur les icônes hors affixe. */
body.ptfr-2027 .site-page-content a:is(.ptfr-text-link,.b19-text-link):not(.ptfr-style-link) > :is(
  .ptfr-internal-link-icon,.ptfr-external-link-icon,.forum-external-link-icon,
  .b19-link-external-icon,i.fa-link,i.fa-external-link,i.fa-external-link-alt
) {
    margin-inline-start: .58em !important;
    vertical-align: middle;
}
body.ptfr-2027 .site-page-content a.ptfr-text-link > .ptfr-text-link-affix > :is(i,svg) {
    margin-inline-start: 0 !important;
}


/* V100 : un [url] enveloppant un [style] garde son href et toute sa surface
   cliquable, SANS decoration de lien de texte, ni pastilles parasites. */
body.ptfr-2027 .site-page-content :is(.forum-post-content,.forum-signature-text,.ptfr-membermsg-body,.ptfr-membermsg-signature,.article-pages .content,[itemprop="text"],.message-content) > a.ptfr-style-link,
body.ptfr-2027 .site-page-content :is(.forum-post-content,.forum-signature-text,.ptfr-membermsg-body,.ptfr-membermsg-signature,.article-pages .content,[itemprop="text"],.message-content) a.ptfr-style-link {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    overflow: visible;
}
body.ptfr-2027 .site-page-content a.ptfr-style-link:is(:link,:visited,:hover,:focus-visible) {
    color: inherit;
    text-decoration: none;
    background: transparent;
    border: 0;
    box-shadow: none;
}
body.ptfr-2027 .site-page-content a.ptfr-style-link > :is(.message-helper,.formatter-container,.formatter-block,.bbcode-block) {
    margin: 0;
    max-width: 100%;
    cursor: pointer;
}
body.ptfr-2027 .site-page-content a.ptfr-style-link:focus-visible {
    outline: 2px solid #245982;
    outline-offset: 3px;
    border-radius: 8px;
}
