/*
Theme Name: Pépite Web
Theme URI: https://pepite.local
Author: Pépite
Description: Version web minimale et soignée des annonces Pépite (marketplace de véhicules d'occasion premium). Pages publiques partageables : liste des annonces et fiche véhicule. Charte dark noir / or, mobile-first, sans dépendance ni build.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pepite-web
*/

/* ---------------------------------------------------------------------------
   Variables & reset
--------------------------------------------------------------------------- */
:root {
	--noir: #000000;
	--noir-2: #0b0b0b;
	--noir-3: #141414;
	--bordure: #242424;
	--or: #c8960c;
	--or-clair: #e0b53a;
	--blanc: #ffffff;
	--gris: #9a9a9a;
	--gris-clair: #cfcfcf;
	--radius: 14px;
	--maxw: 1200px;
	--font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--noir);
	color: var(--blanc);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

.container {
	width: 100%;
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 20px;
}

/* ---------------------------------------------------------------------------
   En-tête / pied
--------------------------------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: rgba(0, 0, 0, 0.85);
	backdrop-filter: saturate(140%) blur(10px);
	border-bottom: 1px solid var(--bordure);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 64px;
}

.logo {
	font-size: 26px;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--or);
}

.logo span {
	color: var(--or);
}

.logo b {
	color: var(--or-clair);
}

.site-header__sub {
	font-size: 13px;
	color: var(--gris);
	font-weight: 500;
}

.site-footer {
	border-top: 1px solid var(--bordure);
	margin-top: 64px;
	padding: 32px 0;
	color: var(--gris);
	font-size: 13px;
	text-align: center;
}

.site-footer .logo {
	font-size: 20px;
	margin-bottom: 6px;
}

/* ---------------------------------------------------------------------------
   Liste / grille de cartes
--------------------------------------------------------------------------- */
.page-intro {
	padding: 40px 0 8px;
}

.page-intro h1 {
	margin: 0;
	font-size: clamp(28px, 6vw, 44px);
	font-weight: 800;
	letter-spacing: -0.03em;
}

.page-intro p {
	margin: 8px 0 0;
	color: var(--gris);
	font-size: 15px;
}

.grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 22px;
	padding: 28px 0 8px;
}

.card {
	background: var(--noir-2);
	border: 1px solid var(--bordure);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.18s ease, border-color 0.18s ease;
}

.card:hover {
	transform: translateY(-3px);
	border-color: var(--or);
}

.card__media {
	position: relative;
	aspect-ratio: 4 / 3;
	background: var(--noir-3);
	overflow: hidden;
}

.card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.card__media--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--bordure);
	font-size: 13px;
}

.card__price {
	position: absolute;
	left: 12px;
	bottom: 12px;
	background: rgba(0, 0, 0, 0.72);
	color: var(--or);
	font-weight: 700;
	font-size: 15px;
	padding: 6px 12px;
	border-radius: 999px;
	border: 1px solid rgba(200, 150, 12, 0.4);
}

.card__body {
	padding: 16px 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
}

.card__brand {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 12px;
	color: var(--gris);
	font-weight: 600;
}

.card__model {
	font-size: 19px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.card__specs {
	margin-top: 10px;
	color: var(--gris-clair);
	font-size: 13px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
}

.card__specs span {
	position: relative;
}

.card__specs span + span::before {
	content: '·';
	color: var(--bordure);
	margin-right: 10px;
}

/* ---------------------------------------------------------------------------
   Pagination
--------------------------------------------------------------------------- */
.pagination {
	display: flex;
	gap: 8px;
	justify-content: center;
	padding: 36px 0 0;
	flex-wrap: wrap;
}

.pagination .page-numbers {
	border: 1px solid var(--bordure);
	border-radius: 8px;
	padding: 8px 14px;
	color: var(--gris-clair);
	font-size: 14px;
}

.pagination .page-numbers.current {
	border-color: var(--or);
	color: var(--or);
}

/* ---------------------------------------------------------------------------
   Fiche véhicule
--------------------------------------------------------------------------- */
.single {
	padding: 24px 0 0;
}

.back-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--gris);
	font-size: 14px;
	margin-bottom: 20px;
}

.back-link:hover {
	color: var(--or);
}

.single__head h1 {
	margin: 0;
	font-size: clamp(28px, 7vw, 46px);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.05;
}

.single__brand {
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--gris);
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 2px;
}

.single__price {
	margin-top: 14px;
	font-size: 30px;
	font-weight: 800;
	color: var(--or);
}

.single__badges {
	margin-top: 12px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.badge {
	font-size: 12px;
	font-weight: 600;
	padding: 5px 11px;
	border-radius: 999px;
	border: 1px solid var(--bordure);
	color: var(--gris-clair);
}

.badge--or {
	border-color: rgba(200, 150, 12, 0.5);
	color: var(--or);
}

/* Galerie */
.gallery {
	margin: 24px 0 8px;
}

.gallery__main {
	position: relative;
	aspect-ratio: 16 / 10;
	background: var(--noir-3);
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--bordure);
}

.gallery__main img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gallery__thumbs {
	display: flex;
	gap: 10px;
	margin-top: 12px;
	overflow-x: auto;
	padding-bottom: 4px;
	scrollbar-width: thin;
}

.gallery__thumb {
	flex: 0 0 auto;
	width: 92px;
	aspect-ratio: 4 / 3;
	border-radius: 10px;
	overflow: hidden;
	border: 2px solid transparent;
	cursor: pointer;
	background: var(--noir-3);
}

.gallery__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gallery__thumb.is-active {
	border-color: var(--or);
}

/* Sections */
.section {
	margin-top: 40px;
}

.section__title {
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-size: 14px;
	font-weight: 700;
	color: var(--blanc);
	padding-bottom: 12px;
	border-bottom: 1px solid var(--bordure);
	margin: 0 0 4px;
}

/* Tableau de specs */
.specs {
	width: 100%;
	border-collapse: collapse;
}

.specs tr {
	border-bottom: 1px solid var(--bordure);
}

.specs th,
.specs td {
	padding: 14px 0;
	font-size: 15px;
	font-weight: 400;
	text-align: left;
}

.specs th {
	color: var(--gris-clair);
	font-weight: 400;
}

.specs td {
	text-align: right;
	color: var(--blanc);
	font-weight: 600;
}

/* Description */
.description {
	color: var(--gris-clair);
	font-size: 15.5px;
	line-height: 1.7;
	padding-top: 16px;
}

.description p {
	margin: 0 0 14px;
}

/* Vendeur */
.seller {
	padding-top: 16px;
	display: flex;
	gap: 16px;
	align-items: center;
}

.seller__avatar {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	overflow: hidden;
	flex: 0 0 auto;
	background: var(--noir-3);
	border: 1px solid var(--bordure);
}

.seller__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.seller__name {
	font-size: 17px;
	font-weight: 700;
}

.seller__meta {
	color: var(--gris);
	font-size: 14px;
	line-height: 1.5;
	margin-top: 2px;
}

.seller__meta span {
	display: block;
}

/* Date de publication */
.pubdate {
	padding-top: 16px;
	color: var(--gris-clair);
	font-size: 15px;
}

/* Layout deux colonnes en desktop */
@media (min-width: 900px) {
	.single__grid {
		display: grid;
		grid-template-columns: 1.4fr 1fr;
		gap: 48px;
		align-items: start;
	}

	.single__col--right .section:first-child {
		margin-top: 0;
	}
}
