/**
 * Nouyouin Communauté — design épuré et aéré.
 * Objectif : qu'un visiteur comprenne en un coup d'œil où lire et où écrire.
 */

.nyc {
	--nyc-green: #184d47;
	--nyc-orange: #c14426;
	--nyc-yellow: #d4a019;
	--nyc-brown: #3a2d1c;
	--nyc-ink: #2b2b2b;
	--nyc-muted: #6d6a63;
	--nyc-line: #e8e2d6;
	--nyc-soft: #faf8f4;

	max-width: 900px;
	margin: 0 auto;
	color: var(--nyc-ink);
	font-size: 16px;
	line-height: 1.65;
}

.nyc *,
.nyc *::before,
.nyc *::after {
	box-sizing: border-box;
}

.nyc a {
	color: var(--nyc-green);
	text-decoration: none;
}

.nyc a:hover {
	color: var(--nyc-orange);
}

/* ---------- Accueil : bandeau d'introduction ---------- */
.nyc-hero {
	text-align: center;
	padding: 8px 0 34px;
	border-bottom: 1px solid var(--nyc-line);
	margin-bottom: 34px;
}

.nyc-h1 {
	margin: 0 0 12px;
	font-size: clamp(26px, 3.6vw, 38px);
	line-height: 1.15;
	font-weight: 800;
	color: var(--nyc-green);
	letter-spacing: -0.01em;
}

.nyc-lead {
	margin: 0 auto 24px;
	max-width: 620px;
	font-size: 17px;
	color: var(--nyc-muted);
}

.nyc-hero-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

/* ---------- Boutons ---------- */
.nyc-btn,
.nyc-btn-ghost {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	border-radius: 10px;
	font-weight: 700;
	font-size: 15px;
	border: 2px solid transparent;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
	text-decoration: none;
}

.nyc-btn {
	background: var(--nyc-green);
	color: #fff;
}

/*
 * Priorité renforcée : sans cela, la règle « .nyc a » (plus spécifique qu'une
 * simple classe) repeint le texte en vert sur un fond vert — le libellé devient
 * illisible. Le « !important » neutralise aussi les styles de bouton du thème.
 */
.nyc a.nyc-btn,
.nyc a.nyc-btn:visited,
.nyc button.nyc-btn,
.nyc .nyc-btn {
	color: #fff !important;
	text-decoration: none;
}

.nyc a.nyc-btn:hover,
.nyc a.nyc-btn:focus-visible,
.nyc button.nyc-btn:hover,
.nyc button.nyc-btn:focus-visible {
	background: var(--nyc-orange);
	color: #fff !important;
}

.nyc a.nyc-btn-ghost,
.nyc a.nyc-btn-ghost:visited,
.nyc button.nyc-btn-ghost,
.nyc .nyc-btn-ghost {
	color: var(--nyc-green) !important;
	text-decoration: none;
}

.nyc a.nyc-btn-ghost:hover,
.nyc button.nyc-btn-ghost:hover {
	color: var(--nyc-green) !important;
	background: var(--nyc-soft);
	border-color: var(--nyc-green);
}

.nyc-btn-ghost {
	background: transparent;
	color: var(--nyc-green);
	border-color: var(--nyc-line);
}

.nyc-btn-ghost:hover,
.nyc-btn-ghost:focus-visible {
	border-color: var(--nyc-green);
	color: var(--nyc-green);
	background: var(--nyc-soft);
}

/* ---------- Recherche ---------- */
.nyc-search {
	display: flex;
	gap: 10px;
	margin-bottom: 30px;
}

.nyc-input {
	width: 100%;
	padding: 13px 16px;
	border: 1px solid var(--nyc-line);
	border-radius: 10px;
	font-size: 16px; /* >=16px : évite le zoom auto sur iPhone. */
	font-family: inherit;
	color: var(--nyc-ink);
	background: #fff;
}

.nyc-input:focus {
	outline: none;
	border-color: var(--nyc-green);
	box-shadow: 0 0 0 3px rgba(24, 77, 71, 0.12);
}

.nyc-textarea {
	min-height: 150px;
	resize: vertical;
	line-height: 1.6;
}

/* Champ piège anti-robot : invisible pour l'humain. */
.nyc-hp {
	position: absolute !important;
	left: -9999px !important;
	opacity: 0 !important;
	height: 0 !important;
	width: 0 !important;
}

/* ---------- Titres de section ---------- */
.nyc-h2 {
	margin: 0 0 18px;
	font-size: 20px;
	font-weight: 800;
	color: var(--nyc-brown);
}

/* ---------- Espaces (catégories) ---------- */
.nyc-cats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 18px;
	margin-bottom: 44px;
}

.nyc-cat {
	display: block;
	padding: 24px;
	border: 1px solid var(--nyc-line);
	border-radius: 14px;
	background: #fff;
	transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.nyc-cat:hover {
	border-color: var(--nyc-green);
	transform: translateY(-2px);
	box-shadow: 0 10px 26px rgba(24, 77, 71, 0.08);
}

.nyc-cat-locked {
	background: var(--nyc-soft);
}

.nyc-cat-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 8px;
}

.nyc-cat-name {
	font-size: 18px;
	font-weight: 800;
	color: var(--nyc-green);
}

.nyc-cat-desc {
	margin: 0 0 14px;
	color: var(--nyc-muted);
	font-size: 15px;
}

.nyc-cat-meta {
	font-size: 13px;
	color: var(--nyc-muted);
}

/* ---------- Badges ---------- */
.nyc-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	background: var(--nyc-soft);
	color: var(--nyc-muted);
	border: 1px solid var(--nyc-line);
	white-space: nowrap;
}

.nyc-badge-premium {
	background: var(--nyc-yellow);
	color: #1a1407;
	border-color: var(--nyc-yellow);
}

/* ---------- Liste des discussions ---------- */
.nyc-topics {
	list-style: none;
	margin: 0 0 30px;
	padding: 0;
	border-top: 1px solid var(--nyc-line);
}

.nyc-topic {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 22px 4px;
	border-bottom: 1px solid var(--nyc-line);
}

.nyc-topic-main {
	flex: 1 1 auto;
	min-width: 0;
}

.nyc-topic-title {
	display: block;
	margin: 0 0 6px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--nyc-ink);
}

.nyc-topic-title:hover {
	color: var(--nyc-orange);
}

.nyc-topic-excerpt {
	margin: 0 0 8px;
	color: var(--nyc-muted);
	font-size: 15px;
}

.nyc-topic-meta {
	font-size: 13px;
	color: var(--nyc-muted);
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	align-items: center;
}

.nyc-topic-count {
	flex: 0 0 auto;
	min-width: 62px;
	text-align: center;
	padding: 10px 8px;
	border-radius: 10px;
	background: var(--nyc-soft);
	border: 1px solid var(--nyc-line);
	font-size: 13px;
	color: var(--nyc-muted);
	line-height: 1.3;
}

.nyc-topic-count strong {
	display: block;
	font-size: 19px;
	color: var(--nyc-green);
}

.nyc-pin {
	color: var(--nyc-yellow);
	font-weight: 700;
}

/* ---------- Discussion : fil ---------- */
.nyc-crumb {
	margin-bottom: 18px;
	font-size: 14px;
	color: var(--nyc-muted);
}

.nyc-single .nyc-title {
	margin: 0 0 20px;
	font-size: clamp(23px, 3vw, 32px);
	line-height: 1.2;
	font-weight: 800;
	color: var(--nyc-green);
}

.nyc-post {
	padding: 24px;
	border: 1px solid var(--nyc-line);
	border-radius: 14px;
	background: #fff;
	margin-bottom: 18px;
}

.nyc-post-first {
	background: var(--nyc-soft);
}

.nyc-post-pending {
	border-style: dashed;
	opacity: 0.85;
}

.nyc-author {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
}

.nyc-avatar,
.nyc-avatar-img {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	flex: 0 0 auto;
	overflow: hidden;
	background: var(--nyc-green);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 16px;
}

.nyc-avatar-img img,
.nyc-avatar img {
	width: 100%;
	height: 100%;
	display: block;
	border-radius: 50%;
}

.nyc-author-info {
	min-width: 0;
}

.nyc-author-name {
	font-weight: 700;
	color: var(--nyc-ink);
}

.nyc-author-date {
	font-size: 13px;
	color: var(--nyc-muted);
}

.nyc-content {
	font-size: 16.5px;
	line-height: 1.7;
	word-wrap: break-word;
}

.nyc-content p {
	margin: 0 0 16px;
}

.nyc-content p:last-child {
	margin-bottom: 0;
}

.nyc-content img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

.nyc-content blockquote {
	margin: 0 0 16px;
	padding: 10px 18px;
	border-left: 4px solid var(--nyc-yellow);
	background: #fff;
	color: var(--nyc-brown);
}

/* ---------- Mentions « j'aime » ---------- */
.nyc-likes {
	margin-top: 14px;
}

.nyc-like {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 14px;
	border-radius: 999px;
	border: 1px solid var(--nyc-line);
	background: #fff;
	color: var(--nyc-muted);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
	font-family: inherit;
}

.nyc-like:hover {
	border-color: var(--nyc-orange);
	color: var(--nyc-orange);
}

.nyc-like.is-liked {
	background: var(--nyc-orange);
	border-color: var(--nyc-orange);
	color: #fff;
}

.nyc-like-static {
	cursor: default;
}

.nyc-like-icon {
	font-size: 15px;
	line-height: 1;
}

/* ---------- Formulaires ---------- */
.nyc-form {
	margin: 30px 0;
	padding: 26px;
	border: 1px solid var(--nyc-line);
	border-radius: 14px;
	background: #fff;
}

.nyc-label {
	display: block;
	margin-bottom: 7px;
	font-weight: 700;
	font-size: 15px;
	color: var(--nyc-brown);
}

.nyc-form .nyc-input {
	margin-bottom: 18px;
}

.nyc-hint {
	margin: -10px 0 18px;
	font-size: 13.5px;
	color: var(--nyc-muted);
}

.nyc-actions {
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
}

/* ---------- Invitation à rejoindre ---------- */
.nyc-invite {
	margin: 30px 0;
	padding: 28px;
	border-radius: 14px;
	background: var(--nyc-soft);
	border: 1px dashed var(--nyc-line);
	text-align: center;
}

.nyc-invite-text {
	margin: 0 0 18px;
	color: var(--nyc-brown);
	font-size: 16px;
}

/* ---------- Divers ---------- */
.nyc-empty {
	padding: 40px 24px;
	text-align: center;
	color: var(--nyc-muted);
	background: var(--nyc-soft);
	border-radius: 14px;
}

.nyc-notice {
	padding: 14px 18px;
	border-radius: 10px;
	margin-bottom: 22px;
	font-size: 15px;
	background: #eef6f2;
	border: 1px solid #cfe5da;
	color: #14503f;
}

.nyc-notice-error {
	background: #fdf0ed;
	border-color: #f3d2c9;
	color: #8f2f18;
}

.nyc-flag {
	font-size: 12px;
	color: var(--nyc-muted);
}

.nyc-pagination {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: center;
	margin: 28px 0;
}

.nyc-pagination a,
.nyc-pagination span {
	padding: 8px 14px;
	border-radius: 8px;
	border: 1px solid var(--nyc-line);
	font-size: 14px;
	font-weight: 600;
	color: var(--nyc-muted);
}

.nyc-pagination .is-current {
	background: var(--nyc-green);
	border-color: var(--nyc-green);
	color: #fff;
}

.nyc-replies {
	margin-top: 34px;
}

.nyc-answer {
	margin-bottom: 16px;
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
	.nyc-cats {
		grid-template-columns: 1fr;
		gap: 14px;
	}
	.nyc-topic {
		flex-direction: row-reverse;
		gap: 12px;
		padding: 18px 2px;
	}
	.nyc-topic-count {
		min-width: 52px;
		padding: 8px 6px;
	}
	.nyc-post,
	.nyc-form,
	.nyc-cat {
		padding: 18px;
	}
	.nyc-hero-actions .nyc-btn,
	.nyc-hero-actions .nyc-btn-ghost {
		width: 100%;
		justify-content: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nyc-cat,
	.nyc-btn,
	.nyc-like {
		transition: none;
	}
}

/* ============================================================
   Fonctions avancées : tri, états, suivi, signalement, widget
   ============================================================ */

/* ---------- Barre de tri et filtres ---------- */
.nyc-sortbar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
	align-items: center;
	justify-content: space-between;
	padding: 14px 0 18px;
	border-bottom: 1px solid var(--nyc-line);
	margin-bottom: 6px;
}

.nyc-sortgroup {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.nyc-chip {
	display: inline-block;
	padding: 7px 15px;
	border-radius: 999px;
	border: 1px solid var(--nyc-line);
	background: #fff;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--nyc-muted) !important;
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.nyc-chip:hover {
	border-color: var(--nyc-green);
	color: var(--nyc-green) !important;
}

.nyc-chip.is-active {
	background: var(--nyc-green);
	border-color: var(--nyc-green);
	color: #fff !important;
}

.nyc-chip-filter.is-active {
	background: var(--nyc-brown);
	border-color: var(--nyc-brown);
}

/* ---------- États d'une discussion ---------- */
.nyc-badges {
	margin: 0 0 14px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.nyc-badge-pinned {
	background: var(--nyc-yellow);
	color: #1a1407;
	border-color: var(--nyc-yellow);
}

.nyc-badge-solved {
	background: #1a7f5a;
	color: #fff;
	border-color: #1a7f5a;
}

.nyc-badge-closed {
	background: var(--nyc-brown);
	color: #fff;
	border-color: var(--nyc-brown);
}

/* ---------- Réponse retenue ---------- */
.nyc-post-solution {
	border-color: #1a7f5a;
	box-shadow: 0 0 0 3px rgba(26, 127, 90, 0.1);
}

.nyc-solution-flag {
	margin: 0 0 12px;
	font-weight: 800;
	font-size: 13px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #1a7f5a;
}

/* ---------- Rangée d'actions ---------- */
.nyc-toolbar-row {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 14px;
}

.nyc-toolbar-row .nyc-likes {
	margin-top: 0;
}

/* ---------- Bouton Suivre ---------- */
.nyc-follow {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 14px;
	border-radius: 999px;
	border: 1px solid var(--nyc-line);
	background: #fff;
	color: var(--nyc-muted);
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.nyc-follow:hover {
	border-color: var(--nyc-green);
	color: var(--nyc-green);
}

.nyc-follow.is-following {
	background: var(--nyc-green);
	border-color: var(--nyc-green);
	color: #fff;
}

/* ---------- Petits boutons (modération, réponse retenue) ---------- */
.nyc-inline-form {
	display: inline-block;
	margin: 0;
}

.nyc-mini {
	padding: 6px 13px;
	border-radius: 8px;
	border: 1px dashed var(--nyc-line);
	background: transparent;
	color: var(--nyc-muted);
	font-size: 13px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.nyc-mini:hover {
	border-color: var(--nyc-green);
	border-style: solid;
	color: var(--nyc-green);
}

.nyc-mini.is-active {
	border-style: solid;
	border-color: #1a7f5a;
	color: #1a7f5a;
}

.nyc-mod-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px dashed var(--nyc-line);
}

.nyc-mod-label {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--nyc-muted);
}

/* ---------- Signalement ---------- */
.nyc-report {
	margin-top: 14px;
	font-size: 13px;
}

.nyc-report summary {
	cursor: pointer;
	color: var(--nyc-muted);
	list-style: none;
}

.nyc-report summary:hover {
	color: var(--nyc-orange);
}

.nyc-report form {
	margin-top: 12px;
	padding: 14px;
	border-radius: 10px;
	background: var(--nyc-soft);
	max-width: 480px;
}

.nyc-report .nyc-input {
	margin-bottom: 10px;
}

/* ---------- Barre de mise en forme de l'éditeur ---------- */
.nyc-editor-tools {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}

.nyc-tool {
	padding: 6px 12px;
	border-radius: 7px;
	border: 1px solid var(--nyc-line);
	background: #fff;
	color: var(--nyc-muted);
	font-size: 13px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
}

.nyc-tool:hover {
	border-color: var(--nyc-green);
	color: var(--nyc-green);
}

/* ---------- Widget « dernières discussions » ---------- */
.nyc-widget-list {
	list-style: none;
	margin: 0 0 18px;
	padding: 0;
}

.nyc-widget-item {
	padding: 12px 0;
	border-bottom: 1px solid var(--nyc-line);
}

.nyc-widget-title {
	display: block;
	font-weight: 700;
	font-size: 16px;
	line-height: 1.4;
	margin-bottom: 3px;
}

.nyc-widget-meta {
	font-size: 13px;
	color: var(--nyc-muted);
}

@media (max-width: 640px) {
	.nyc-sortbar {
		gap: 10px;
	}
	.nyc-chip {
		padding: 6px 12px;
		font-size: 13px;
	}
}

/* ---------- Éditeur visuel ---------- */
.nyc-editor-wrap {
	margin-bottom: 18px;
}

.nyc-editor {
	min-height: 170px;
	max-height: 520px;
	overflow-y: auto;
	margin-bottom: 0;
	line-height: 1.65;
	cursor: text;
}

.nyc-editor:empty::before {
	content: attr(data-placeholder);
	color: #9a968d;
	pointer-events: none;
}

.nyc-editor:focus {
	outline: none;
	border-color: var(--nyc-green);
	box-shadow: 0 0 0 3px rgba(24, 77, 71, 0.12);
}

/* Aperçu fidèle au rendu final, pendant la saisie. */
.nyc-editor p {
	margin: 0 0 12px;
}

.nyc-editor ul,
.nyc-editor ol {
	margin: 0 0 12px;
	padding-left: 24px;
}

.nyc-editor li {
	margin-bottom: 6px;
}

.nyc-editor blockquote {
	margin: 0 0 12px;
	padding: 8px 16px;
	border-left: 4px solid var(--nyc-yellow);
	background: var(--nyc-soft);
	color: var(--nyc-brown);
}

.nyc-editor a {
	color: var(--nyc-orange);
	text-decoration: underline;
}

.nyc-editor-tools {
	border: 1px solid var(--nyc-line);
	border-bottom: none;
	border-radius: 10px 10px 0 0;
	padding: 8px;
	background: var(--nyc-soft);
	margin-bottom: 0;
}

.nyc-editor-wrap .nyc-editor {
	border-radius: 0 0 10px 10px;
}

/* ---------- Espace d'appartenance ---------- */
.nyc-spaceline {
	margin: 0 0 12px;
	font-size: 13px;
	color: var(--nyc-muted);
}

.nyc-space-label {
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 700;
	font-size: 11px;
}

.nyc-space-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--nyc-green);
	color: #fff !important;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
}

.nyc-space-badge:hover {
	background: var(--nyc-orange);
}

.nyc-space-tag {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 999px;
	background: var(--nyc-soft);
	border: 1px solid var(--nyc-line);
	font-size: 12px;
	font-weight: 700;
	color: var(--nyc-green);
	margin-right: 4px;
}

.nyc-solved-mini {
	color: #1a7f5a;
	font-weight: 700;
	font-size: 12px;
}

/* ---------- Italique : neutralise les polices d'icônes du thème ----------
   De nombreux thèmes (WoodMart, FontAwesome…) détournent la balise <i> pour
   afficher des icônes et lui retirent l'italique. On rétablit donc un rendu
   italique normal à l'intérieur de la communauté uniquement. */
.nyc-editor i,
.nyc-editor em,
.nyc-content i,
.nyc-content em {
	font-family: inherit !important;
	font-style: italic !important;
	font-weight: inherit;
	speak: normal;
}

.nyc-editor i::before,
.nyc-content i::before {
	content: none !important;
}

.nyc-editor strong,
.nyc-editor b,
.nyc-content strong,
.nyc-content b {
	font-weight: 700;
}

.nyc-editor u,
.nyc-content u {
	text-decoration: underline;
}

/* ---------- Boutons de modération d'une réponse ---------- */
.nyc-mini-warn:hover {
	border-color: var(--nyc-yellow);
	border-style: solid;
	color: #8a6508;
}

.nyc-mini-danger:hover {
	border-color: var(--nyc-orange);
	border-style: solid;
	color: var(--nyc-orange);
}
