/* Forum bbPress restylé : listes en cartes, messages en bulles, formulaires modernes. */

#bbpress-forums {
	font-size: 16px;
	margin-bottom: 0;
}

/* Recherche et fil d'Ariane */
#bbpress-forums .bbp-search-form { float: none; margin-bottom: 16px; }
#bbpress-forums .bbp-search-form > div { display: flex; gap: 8px; max-width: 460px; }
#bbpress-forums #bbp_search { flex: 1; }

#bbpress-forums div.bbp-breadcrumb { float: none; margin-bottom: 20px; }
#bbpress-forums div.bbp-breadcrumb p {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	background: var(--cx-soft);
	border-radius: 999px;
	padding: 6px 16px;
	font-size: 14px;
	margin: 0;
}
.bbp-breadcrumb-current { font-weight: 600; color: var(--cx-ink); }

/* Listes : forums, sujets */
#bbpress-forums ul.bbp-forums,
#bbpress-forums ul.bbp-topics,
#bbpress-forums ul.bbp-lead-topic,
#bbpress-forums ul.bbp-replies,
#bbpress-forums ul.bbp-search-results {
	border: 1px solid var(--cx-line);
	border-radius: var(--cx-radius);
	overflow: hidden;
	background: #fff;
	box-shadow: var(--cx-shadow);
	margin-bottom: 24px;
}

#bbpress-forums li.bbp-header,
#bbpress-forums li.bbp-footer {
	background: var(--cx-ink);
	color: #fff;
	border: 0;
	padding: 12px 20px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
}
#bbpress-forums li.bbp-footer { display: none; }
#bbpress-forums li.bbp-header a { color: #fff; }

#bbpress-forums ul.bbp-forums li.bbp-body > ul,
#bbpress-forums ul.bbp-topics li.bbp-body > ul {
	padding: 18px 20px;
	border-top: 1px solid var(--cx-line);
	background: #fff;
	transition: background .15s;
}
#bbpress-forums li.bbp-body > ul:first-child { border-top: 0; }
#bbpress-forums li.bbp-body > ul:hover { background: #f8fbfe; }
#bbpress-forums div.odd, #bbpress-forums ul.odd,
#bbpress-forums div.even, #bbpress-forums ul.even { background-color: #fff; }

#bbpress-forums .bbp-forum-title,
#bbpress-forums .bbp-topic-permalink {
	font-size: 18px;
	font-weight: 700;
	color: var(--cx-ink);
	text-decoration: none;
}
#bbpress-forums .bbp-forum-title:hover,
#bbpress-forums .bbp-topic-permalink:hover { color: var(--cx-blue); }

#bbpress-forums .bbp-forum-content,
#bbpress-forums p.bbp-topic-meta { color: var(--cx-muted); font-size: 14px; margin-top: 4px; }

li.bbp-forum-topic-count, li.bbp-forum-reply-count,
li.bbp-topic-voice-count, li.bbp-topic-reply-count {
	font-weight: 700;
	color: var(--cx-blue-dark);
}
#bbpress-forums li.bbp-header li { color: #fff; }

li.bbp-forum-freshness, li.bbp-topic-freshness { font-size: 14px; }
li.bbp-forum-freshness > a, li.bbp-topic-freshness > a { color: var(--cx-text); }

#bbpress-forums .bbp-author-avatar img,
#bbpress-forums p.bbp-topic-meta img.avatar {
	border-radius: 50%;
	width: 20px;
	height: 20px;
	object-fit: cover;
	vertical-align: middle;
	margin-right: 4px;
}

/* Sujets épinglés, fermés */
#bbpress-forums .sticky, #bbpress-forums .super-sticky { background: #fff8ef !important; }
#bbpress-forums .status-closed .bbp-topic-permalink { color: var(--cx-muted); }

/* Messages d'un sujet */
#bbpress-forums ul.bbp-replies,
#bbpress-forums ul.bbp-lead-topic { border: 0; background: transparent; box-shadow: none; overflow: visible; }
#bbpress-forums ul.bbp-replies > li.bbp-header { border-radius: var(--cx-radius); margin-bottom: 16px; }

#bbpress-forums li.bbp-body div.hentry {
	background: #fff;
	border: 1px solid var(--cx-line);
	border-radius: 0 0 var(--cx-radius) var(--cx-radius);
	box-shadow: var(--cx-shadow);
	margin-bottom: 20px;
	padding: 20px;
	display: flex;
	gap: 20px;
}

#bbpress-forums div.bbp-reply-header,
#bbpress-forums div.bbp-topic-header {
	background: var(--cx-soft);
	border: 1px solid var(--cx-line);
	border-bottom: 0;
	border-radius: var(--cx-radius) var(--cx-radius) 0 0;
	padding: 8px 20px;
	font-size: 13px;
	color: var(--cx-muted);
}
#bbpress-forums div.bbp-reply-header a { color: var(--cx-muted); }
#bbpress-forums .bbp-admin-links { color: var(--cx-muted); }

#bbpress-forums div.bbp-reply-author,
#bbpress-forums div.bbp-topic-author {
	flex: 0 0 120px;
	width: auto;
	float: none;
	margin: 0;
	text-align: center;
	font-size: 14px;
}

#bbpress-forums div.bbp-reply-author img.avatar,
#bbpress-forums div.bbp-topic-author img.avatar {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	margin: 0 auto 8px;
	border: 3px solid var(--cx-soft);
}

#bbpress-forums div.bbp-reply-author a.bbp-author-name,
#bbpress-forums div.bbp-topic-author a.bbp-author-name {
	font-weight: 700;
	color: var(--cx-ink);
	word-break: break-word;
}

#bbpress-forums .bbp-author-role {
	display: inline-block;
	margin-top: 4px;
	font-size: 12px;
	font-weight: 600;
	background: var(--cx-soft);
	color: var(--cx-blue-dark);
	border-radius: 999px;
	padding: 1px 10px;
}

#bbpress-forums div.bbp-reply-content,
#bbpress-forums div.bbp-topic-content {
	flex: 1;
	margin: 0;
	padding: 0;
	min-width: 0;
	font-size: 16px;
	line-height: 1.7;
}

#bbpress-forums div.bbp-reply-content img,
#bbpress-forums div.bbp-topic-content img { max-width: 100%; height: auto; border-radius: 8px; }

#bbpress-forums div.bbp-reply-content blockquote {
	border-left: 4px solid var(--cx-blue);
	background: var(--cx-bg);
	border-radius: 0 8px 8px 0;
	padding: 10px 16px;
	margin: 12px 0;
}

/* Message de l'auteur du sujet mis en évidence */
#bbpress-forums .topic-author div.bbp-reply-author img.avatar { border-color: var(--cx-orange); }

@media (max-width: 640px) {
	#bbpress-forums li.bbp-body div.hentry { flex-direction: column; gap: 12px; }
	#bbpress-forums div.bbp-reply-author,
	#bbpress-forums div.bbp-topic-author {
		flex: none;
		display: flex;
		align-items: center;
		gap: 10px;
		text-align: left;
	}
	#bbpress-forums div.bbp-reply-author img.avatar,
	#bbpress-forums div.bbp-topic-author img.avatar { width: 40px; height: 40px; margin: 0; }
	#bbpress-forums div.bbp-reply-author br { display: none; }
}

/* Pagination, notices */
#bbpress-forums .bbp-pagination { font-size: 14px; color: var(--cx-muted); }
#bbpress-forums .bbp-pagination-links a,
#bbpress-forums .bbp-pagination-links span.current {
	display: inline-block;
	min-width: 34px;
	padding: 4px 10px;
	border-radius: 8px;
	text-align: center;
	border: 1px solid var(--cx-line);
	background: #fff;
	text-decoration: none;
}
#bbpress-forums .bbp-pagination-links span.current { background: var(--cx-blue); border-color: var(--cx-blue); color: #fff; }

div.bbp-template-notice,
div.indicator-hint {
	border: 0;
	border-left: 4px solid var(--cx-blue);
	background: var(--cx-soft);
	border-radius: 0 10px 10px 0;
	padding: 10px 16px;
	color: var(--cx-ink);
}
div.bbp-template-notice p { font-size: 15px; margin: 0; }
div.bbp-template-notice.error { border-left-color: #d64545; background: #fdeeee; }

/* Formulaires (nouveau sujet, réponse, connexion) */
#bbpress-forums fieldset.bbp-form {
	background: #fff;
	border: 1px solid var(--cx-line);
	border-radius: var(--cx-radius);
	box-shadow: var(--cx-shadow);
	padding: 24px;
	margin-bottom: 24px;
}

#bbpress-forums fieldset.bbp-form legend {
	font-size: 20px;
	font-weight: 700;
	color: var(--cx-ink);
	padding: 0 8px;
}

#bbpress-forums fieldset.bbp-form label { font-weight: 600; color: var(--cx-ink); font-size: 14px; }
#bbpress-forums fieldset.bbp-form input[type="text"],
#bbpress-forums fieldset.bbp-form select { width: 100%; max-width: 100%; }
#bbpress-forums .wp-editor-container { border: 1px solid #cfd9e3; border-radius: 10px; overflow: hidden; }
#bbpress-forums div.bbp-the-content-wrapper textarea.bbp-the-content { border: 0; border-radius: 0; font-size: 16px; }
#bbpress-forums .bbp-submit-wrapper { float: none; text-align: right; }

/* Liens d'abonnement / favoris */
#bbpress-forums #subscription-toggle a,
#bbpress-forums #favorite-toggle a {
	display: inline-block;
	border: 1px solid var(--cx-line);
	border-radius: 999px;
	padding: 4px 14px;
	font-size: 14px;
	text-decoration: none;
	background: #fff;
}

/* Profils utilisateurs */
#bbpress-forums #bbp-single-user-details #bbp-user-avatar img.avatar { border-radius: 50%; }
#bbpress-forums #bbp-single-user-details #bbp-user-navigation li.current a { background: var(--cx-soft); border-radius: 8px; }

/* Étiquettes */
#bbpress-forums .bbp-topic-tags a {
	display: inline-block;
	background: var(--cx-soft);
	border-radius: 999px;
	padding: 1px 10px;
	font-size: 13px;
	text-decoration: none;
}

/* Invitation à s'inscrire (visiteurs) */
.cx-forum-invite {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	background: linear-gradient(135deg, #fff4e8, #eef7e4);
	border: 1px solid #f3d7b8;
	border-radius: var(--cx-radius);
	padding: 18px 22px;
	margin-bottom: 24px;
}
.cx-forum-invite p { margin: 0; flex: 1 1 320px; color: var(--cx-text); }
.cx-forum-invite strong { color: var(--cx-ink); }
.cx-forum-invite-actions { display: flex; gap: 10px; flex-wrap: wrap; }

#bbpress-forums .cx-forum-invite .cx-btn-small {
	display: inline-block;
	padding: 8px 18px;
	border-radius: 999px;
	border: 2px solid var(--cx-blue);
	color: var(--cx-blue-dark);
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	background: #fff;
}
#bbpress-forums .cx-forum-invite .cx-btn-small:hover { background: var(--cx-soft); color: var(--cx-blue-dark); }
#bbpress-forums .cx-forum-invite .cx-btn-small.cx-btn-fill { background: var(--cx-orange); border-color: var(--cx-orange); color: #fff; }
#bbpress-forums .cx-forum-invite .cx-btn-small.cx-btn-fill:hover { background: #d9731a; border-color: #d9731a; color: #fff; }
