:root {
	--ink: #17211b;
	--muted: #5c675f;
	--paper: #f4efe6;
	--paper-2: #ebe4d6;
	--white: #fffdf8;
	--forest: #1b4332;
	--forest-2: #2d6a4f;
	--terra: #c45c26;
	--terra-2: #9c4318;
	--gold: #c9a227;
	--line: rgba(23, 33, 27, 0.12);
	--shadow: 0 18px 40px rgba(27, 67, 50, 0.12);
	--radius: 18px;
	--serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
	--sans: "Segoe UI", "Avenir Next", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--sans);
	color: var(--ink);
	background-color: var(--paper);
	background-image:
		linear-gradient(180deg, rgba(244, 239, 230, 0.88) 0%, rgba(244, 239, 230, 0.93) 45%, rgba(244, 239, 230, 0.9) 100%),
		url("../img/bg-market.jpg?v=3");
	background-size: cover;
	background-attachment: fixed;
	background-position: center 20%;
	line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--forest-2); text-decoration: none; }
a:hover { color: var(--terra); }
h1, h2, h3, .tm-logo { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; }

.tm-header {
	position: sticky; top: 0; z-index: 30;
	background: rgba(244, 239, 230, 0.92);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--line);
}
.tm-header__inner, .tm-footer__grid, .tm-wrap, .tm-hero__inner {
	width: min(1180px, calc(100% - 32px));
	margin: 0 auto;
}
.tm-header__inner {
	display: flex; align-items: center; justify-content: space-between;
	min-height: 76px; gap: 16px;
}
.tm-logo { display: flex; align-items: center; gap: 10px; color: var(--forest); font-size: 1.35rem; }
.tm-logo span span, .tm-logo__text span { color: var(--terra); }
.tm-nav { display: flex; align-items: center; gap: 28px; }
.tm-nav__list { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.tm-nav__list a { color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.tm-nav__actions { display: flex; align-items: center; gap: 10px; }
.tm-burger { display: none; background: none; border: 0; width: 42px; height: 42px; cursor: pointer; }
.tm-burger span, .tm-burger span:before, .tm-burger span:after {
	display: block; width: 20px; height: 2px; background: var(--ink); position: relative;
}
.tm-burger span:before, .tm-burger span:after { content: ""; position: absolute; left: 0; }
.tm-burger span:before { top: -6px; }
.tm-burger span:after { top: 6px; }

.tm-btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 10px 16px; border-radius: 999px; font-weight: 700; font-size: 0.92rem;
	border: 1px solid transparent; cursor: pointer; font-family: inherit;
}
.tm-btn--accent { background: var(--terra); color: #fff !important; }
.tm-btn--accent:hover { background: var(--terra-2); color: #fff !important; }
.tm-btn--forest { background: var(--forest); color: #fff !important; }
.tm-btn--ghost { background: transparent; border-color: var(--line); color: var(--ink) !important; }
.tm-btn--block { width: 100%; }
.tm-iconlink { position: relative; font-size: 1.2rem; color: var(--ink); }
.tm-iconlink i {
	position: absolute; top: -8px; right: -10px; background: var(--terra); color: #fff;
	font-style: normal; font-size: 10px; min-width: 16px; height: 16px; border-radius: 99px;
	display: grid; place-items: center; padding: 0 4px;
}

.tm-main { min-height: 60vh; padding-bottom: 64px; }
.tm-wrap { padding-top: 32px; }
.tm-flash { width: min(1180px, calc(100% - 32px)); margin: 16px auto 0; padding: 12px 16px; border-radius: 12px; font-weight: 600; }
.tm-flash--ok { background: #e4f0e2; color: #1b4332; }
.tm-flash--err { background: #f8e2d9; color: #9c4318; }

.tm-hero {
	padding: 48px 0 28px;
}
.tm-hero__inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 32px; align-items: center; }
.tm-hero__visual { position: relative; }
.tm-hero__visual > img {
	width: 100%; height: 460px; object-fit: cover; border-radius: 28px;
	box-shadow: var(--shadow); border: 1px solid var(--line);
}
.tm-kicker { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.75rem; color: var(--terra); font-weight: 800; margin: 0 0 10px; }
.tm-hero h1 { font-size: clamp(2.2rem, 4vw, 4rem); line-height: 1.05; margin: 0 0 16px; }
.tm-hero p.lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 24px; max-width: 38ch; }
.tm-search {
	display: flex; flex-direction: column; gap: 10px;
	background: var(--white); padding: 12px; border-radius: 24px; box-shadow: var(--shadow);
	border: 1px solid var(--line);
}
.tm-search__top {
	display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center;
}
.tm-search input, .tm-search select, .tm-form input, .tm-form select, .tm-form textarea {
	width: 100%; border: 1px solid var(--line); background: var(--white); border-radius: 12px;
	padding: 12px 14px; font: inherit; color: inherit;
}
.tm-search__top input { border: 0; background: transparent; border-radius: 999px; }
.tm-geo {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end;
}
.tm-geo__field {
	display: flex; flex-direction: column; gap: 4px;
	margin: 0 !important; font-weight: 700; font-size: 0.78rem; color: var(--muted);
}
.tm-geo__field span { letter-spacing: .04em; text-transform: uppercase; }
.tm-search .tm-geo select {
	border: 1px solid var(--line); background: var(--paper); border-radius: 12px;
}
.tm-geo select:disabled { opacity: .55; cursor: not-allowed; }
.tm-hero__panel {
	position: absolute; left: 16px; right: 16px; bottom: 16px;
	background: rgba(27, 67, 50, 0.92); color: #f4efe6; border-radius: 20px; padding: 20px 22px;
	box-shadow: var(--shadow); backdrop-filter: blur(8px);
}
.tm-hero__panel h2 { margin-top: 0; color: #fff; }
.tm-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.tm-steps li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.tm-steps b { width: 36px; height: 36px; border-radius: 50%; background: #c45c26; color: #fff; display: grid; place-items: center; }

.tm-section { width: min(1180px, calc(100% - 32px)); margin: 48px auto; }
.tm-section__head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 20px; }
.tm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tm-grid--3 { grid-template-columns: repeat(3, 1fr); }
.tm-grid--2 { grid-template-columns: repeat(2, 1fr); }

.tm-card {
	background: var(--white); border-radius: var(--radius); overflow: hidden;
	border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(23,33,27,.05);
	display: flex; flex-direction: column; min-height: 100%;
}
.tm-card__media { position: relative; aspect-ratio: 4/3; background: var(--paper-2); }
.tm-card__media img { width: 100%; height: 100%; object-fit: cover; }
.tm-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tm-card__meta { display: flex; gap: 8px; margin: 0; color: var(--muted); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.tm-card__title { margin: 0; font-size: 1.15rem; }
.tm-card__title a { color: var(--ink); }
.tm-card__loc { margin: 0; color: var(--muted); font-size: 0.92rem; }
.tm-card__foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 8px; }
.tm-userchip { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; font-size: 0.88rem; }
.tm-userchip img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.tm-badge {
	position: absolute; top: 10px; left: 10px; background: var(--forest); color: #fff;
	font-size: 0.72rem; font-weight: 800; padding: 4px 8px; border-radius: 999px;
}
.tm-badge--in_trade { background: var(--gold); color: #17211b; }
.tm-badge--traded { background: #6b7280; }
.tm-badge--draft { background: #5c675f; }

.tm-stars { color: #d4d0c6; letter-spacing: 1px; }
.tm-stars .is-on { color: var(--gold); }

.tm-layout { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }
.tm-filters, .tm-dashnav, .tm-side {
	background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
}
.tm-filters label, .tm-form label { display: block; font-weight: 700; font-size: 0.85rem; margin: 12px 0 6px; }
.tm-filters .tm-geo { grid-template-columns: 1fr; gap: 2px; }
.tm-filters .tm-geo__field { margin: 8px 0 0 !important; }
.tm-filters .tm-btn { margin-top: 14px; width: 100%; }

.tm-split { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 28px; }
.tm-gallery { background: var(--white); border-radius: 24px; overflow: hidden; border: 1px solid var(--line); }
.tm-gallery__main { aspect-ratio: 4/3; background: #ddd; }
.tm-gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.tm-thumbs { display: flex; gap: 8px; padding: 10px; }
.tm-thumbs button { border: 0; padding: 0; background: none; cursor: pointer; width: 72px; border-radius: 10px; overflow: hidden; opacity: .7; }
.tm-thumbs button.is-on { opacity: 1; outline: 2px solid var(--terra); }
.tm-thumbs img { width: 72px; height: 56px; object-fit: cover; }

.tm-profile {
	background: var(--white); border-radius: var(--radius); padding: 20px; border: 1px solid var(--line);
}
.tm-profile__top { display: flex; gap: 14px; align-items: center; }
.tm-profile__top img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.tm-trust { margin: 12px 0; padding: 10px 12px; background: var(--paper); border-radius: 12px; }
.tm-trust strong { display: block; }

.tm-form { display: grid; gap: 4px; }
.tm-form textarea { min-height: 120px; resize: vertical; }
.tm-check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.tm-check input { width: auto; margin-top: 4px; }
.tm-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.tm-danger { color: #9c4318; background: none; border: 0; cursor: pointer; font: inherit; }

.tm-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; }
.tm-table th, .tm-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tm-table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

.tm-threads { display: grid; grid-template-columns: 320px 1fr; min-height: 520px; background: var(--white); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.tm-threads__list { border-right: 1px solid var(--line); overflow: auto; }
.tm-thread { display: block; padding: 14px; border-bottom: 1px solid var(--line); color: inherit; }
.tm-thread.is-on { background: var(--paper); }
.tm-chat { display: flex; flex-direction: column; }
.tm-chat__log { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 10px; overflow: auto; max-height: 420px; }
.tm-bubble { max-width: 72%; padding: 10px 12px; border-radius: 14px; background: var(--paper-2); }
.tm-bubble.is-me { margin-left: auto; background: #dceee4; }
.tm-chat form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }

.tm-dashnav a { display: block; padding: 10px 8px; border-radius: 10px; color: var(--ink); font-weight: 600; }
.tm-dashnav a.is-on, .tm-dashnav a:hover { background: var(--paper); }
.tm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.tm-stat { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.tm-stat b { display: block; font-size: 1.6rem; font-family: var(--serif); }

.tm-auth { width: min(480px, calc(100% - 32px)); margin: 48px auto; background: var(--white); padding: 28px; border-radius: 24px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.tm-auth-layout {
	width: min(1040px, calc(100% - 32px));
	margin: 28px auto 48px;
	display: grid;
	grid-template-columns: 0.95fr 1.05fr;
	background: var(--white);
	border-radius: 28px;
	overflow: hidden;
	border: 1px solid var(--line);
	box-shadow: var(--shadow);
	min-height: 540px;
}
.tm-auth-layout .tm-auth {
	width: auto; margin: 0; border: 0; box-shadow: none; border-radius: 0;
}
.tm-auth__visual { margin: 0; position: relative; min-height: 540px; }
.tm-auth__visual img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.tm-auth__visual figcaption {
	position: absolute; left: 20px; right: 20px; bottom: 22px; margin: 0;
	color: #fff; font-family: var(--serif); font-size: 1.4rem; line-height: 1.25;
	text-shadow: 0 10px 28px rgba(0,0,0,.45);
}
.tm-prose { background: var(--white); padding: 28px; border-radius: 24px; border: 1px solid var(--line); }
.tm-prose h2 { margin-top: 1.4em; }
.tm-empty { padding: 40px; text-align: center; background: var(--white); border-radius: 20px; border: 1px dashed var(--line); }

.tm-footer {
	background:
		linear-gradient(180deg, rgba(27, 67, 50, 0.9), rgba(17, 32, 25, 0.94)),
		url("../img/bg-market.jpg?v=3") center/cover no-repeat;
	color: #e6efe9; padding: 48px 0 24px; margin-top: 40px;
}
.tm-footer a { color: #f4efe6; }
.tm-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.tm-footer__title { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 0.75rem; }
.tm-footer__copy { width: min(1180px, calc(100% - 32px)); margin: 28px auto 0; opacity: .75; font-size: 0.85rem; }
.tm-logo--foot { color: #fff; font-size: 1.5rem; }

.tm-cats { display: flex; gap: 10px; flex-wrap: wrap; }
.tm-cats a { background: var(--white); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; color: var(--ink); font-weight: 600; }

.tm-band {
	height: 200px;
	margin-bottom: -24px;
	background:
		linear-gradient(180deg, rgba(27, 67, 50, 0.28), rgba(244, 239, 230, 0.12)),
		url("../img/scene-objets.jpg?v=3") center/cover no-repeat;
}
.page-template-template-catalog-php .tm-band,
.page-catalogue .tm-band {
	background-image: linear-gradient(180deg, rgba(27, 67, 50, 0.3), rgba(244, 239, 230, 0.1)), url("../img/scene-velo.jpg?v=3");
}
.blog .tm-band, .single:not(.single-tm_listing) .tm-band {
	background-image: linear-gradient(180deg, rgba(27, 67, 50, 0.3), rgba(244, 239, 230, 0.1)), url("../img/scene-atelier.jpg?v=3");
}
.page-contact .tm-band {
	background-image: linear-gradient(180deg, rgba(27, 67, 50, 0.3), rgba(244, 239, 230, 0.1)), url("../img/scene-mains.jpg?v=3");
}
.error404 .tm-band {
	background-image: linear-gradient(180deg, rgba(27, 67, 50, 0.35), rgba(244, 239, 230, 0.1)), url("../img/hero-exchange.jpg?v=3");
}
.page-inscription .tm-band,
.page-connexion .tm-band {
	display: none;
}

.tm-mosaic {
	width: min(1180px, calc(100% - 32px));
	margin: 8px auto 0;
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
	gap: 12px;
}
.tm-mosaic img {
	width: 100%;
	height: 160px;
	object-fit: cover;
	border-radius: 18px;
	border: 1px solid var(--line);
	box-shadow: 0 8px 24px rgba(23,33,27,.08);
}
.tm-pagehead {
	margin-bottom: 22px;
}
.tm-pagehead h1 { margin: 0; }
.tm-prose__hero {
	margin: 0 -28px 22px;
	overflow: hidden;
}
.tm-prose__hero img {
	width: 100%;
	height: 260px;
	object-fit: cover;
}
.tm-contact {
	display: grid;
	grid-template-columns: 0.9fr 1.1fr;
	gap: 24px;
	align-items: stretch;
	max-width: 1040px;
}
.tm-contact__visual { margin: 0; }
.tm-contact__visual img {
	width: 100%;
	height: 100%;
	min-height: 420px;
	object-fit: cover;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	box-shadow: var(--shadow);
}
.tm-empty--visual img {
	width: min(420px, 100%);
	height: 180px;
	object-fit: cover;
	border-radius: 16px;
	margin: 0 auto 16px;
}

@media (max-width: 980px) {
	.tm-hero__inner, .tm-layout, .tm-split, .tm-threads, .tm-footer__grid, .tm-auth-layout, .tm-contact { grid-template-columns: 1fr; }
	.tm-grid, .tm-grid--3, .tm-stats { grid-template-columns: repeat(2, 1fr); }
	.tm-search { border-radius: 18px; }
	.tm-search__top, .tm-geo { grid-template-columns: 1fr; }
	.tm-hero__visual > img { height: 280px; }
	.tm-hero__panel { position: relative; left: 0; right: 0; bottom: 0; margin-top: 12px; }
	.tm-auth__visual { min-height: 220px; }
	.tm-auth__visual img { position: relative; height: 220px; }
	.tm-mosaic { grid-template-columns: 1fr 1fr; }
	.tm-band { height: 140px; }
	body { background-attachment: scroll; }
	.tm-burger { display: block; }
	.tm-nav {
		display: none; position: absolute; top: 76px; left: 0; right: 0;
		background: var(--paper); border-bottom: 1px solid var(--line); padding: 16px;
		flex-direction: column; align-items: stretch;
	}
	.tm-nav.is-open { display: flex; }
	.tm-threads { min-height: auto; }
}
@media (max-width: 640px) {
	.tm-grid, .tm-grid--3, .tm-grid--2, .tm-stats, .tm-mosaic { grid-template-columns: 1fr; }
	.tm-mosaic img { height: 140px; }
	.tm-prose__hero img, .tm-contact__visual img { height: 180px; min-height: 180px; }
}
