/* ==========================================================================
   GaboMarket LBC — design façon leboncoin (adapté, non copié)
   Palette : orange #F97316, encre #242424, fonds blancs / gris clairs
   ========================================================================== */

:root {
	--gml-primary: #F97316;
	--gml-primary-dark: #C2590B;
	--gml-primary-light: #FFF1E7;
	--gml-ink: #242424;
	--gml-gray: #717171;
	--gml-border: #E6E6E6;
	--gml-radius: 12px;
}

/* --------------------------------------------------------------------------
   Header : blanc, épuré, ombre légère
   -------------------------------------------------------------------------- */

body > header,
.header-navbar,
.site-header {
	background: #fff !important;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	border-bottom: none !important;
}

body > header a,
.header-navbar a {
	color: var(--gml-ink);
}

/* Logo en orange gras, façon leboncoin */
.header-navbar .site-title a,
.site-branding a,
a.custom-logo-link,
.header-navbar__brand a {
	color: var(--gml-primary) !important;
	font-weight: 800 !important;
	letter-spacing: -0.5px;
}

/* --------------------------------------------------------------------------
   Boutons : orange, arrondis, gras
   -------------------------------------------------------------------------- */

.button,
button[type="submit"],
input[type="submit"],
.hp-form__button,
a.button,
.header-navbar__buttons a,
.hp-menu__item--listing-submit a {
	background-color: var(--gml-primary) !important;
	border-color: var(--gml-primary) !important;
	color: #fff !important;
	border-radius: var(--gml-radius) !important;
	font-weight: 700 !important;
	transition: background-color 0.15s ease;
}

.button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover,
.hp-form__button:hover,
a.button:hover {
	background-color: var(--gml-primary-dark) !important;
	border-color: var(--gml-primary-dark) !important;
}

/* Boutons secondaires / liens d'action */
a:hover {
	color: var(--gml-primary);
}

/* --------------------------------------------------------------------------
   Barre de recherche header (pill, créée en JS)
   -------------------------------------------------------------------------- */

.gml-header-search {
	display: inline-flex;
	align-items: center;
	background: #F5F5F5;
	border-radius: 999px;
	padding: 4px 4px 4px 18px;
	min-width: 260px;
	max-width: 420px;
	flex: 1;
}

.gml-header-search input {
	border: none !important;
	background: transparent !important;
	outline: none !important;
	box-shadow: none !important;
	flex: 1;
	font-size: 14px;
	color: var(--gml-ink);
	padding: 8px 0 !important;
}

.gml-header-search button {
	background: var(--gml-primary) !important;
	border: none !important;
	color: #fff !important;
	border-radius: 999px !important;
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 15px;
	padding: 0 !important;
}

/* --------------------------------------------------------------------------
   Barre de catégories + méga-menus (façon leboncoin)
   -------------------------------------------------------------------------- */

.gml-catbar {
	background: #fff;
	border-bottom: 1px solid var(--gml-border);
	position: relative;
	z-index: 9000;
	overflow: visible;
}

.gml-catbar-inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 16px;
	display: flex;
	align-items: stretch;
	gap: 2px;
	flex-wrap: wrap;
	overflow: visible; /* indispensable : un overflow masquerait les méga-menus */
	scrollbar-width: none;
}

@media (max-width: 900px) {
	.gml-catbar-inner {
		flex-wrap: nowrap;
		overflow-x: auto; /* défilement horizontal uniquement sur mobile */
	}
}

.gml-catbar-inner::-webkit-scrollbar {
	display: none;
}

.gml-cat {
	position: relative;
	flex-shrink: 0;
}

.gml-cat-link {
	display: inline-block;
	padding: 12px 12px;
	font-size: 14px;
	font-weight: 600;
	color: var(--gml-ink) !important;
	text-decoration: none !important;
	border-bottom: 3px solid transparent;
	white-space: nowrap;
}

.gml-cat:hover > .gml-cat-link,
.gml-cat.gml-open > .gml-cat-link {
	color: var(--gml-primary) !important;
	border-bottom-color: var(--gml-primary);
}

/* Méga-menu */
.gml-mega {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: #fff;
	border: 1px solid var(--gml-border);
	border-radius: 0 0 16px 16px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
	padding: 20px 24px;
	min-width: 640px;
	max-width: 920px;
	max-height: 70vh;
	overflow-y: auto;
	z-index: 9500;
}

.gml-cat:hover > .gml-mega,
.gml-cat.gml-open > .gml-mega {
	display: block;
}

/* Décale les derniers menus pour ne pas sortir de l'écran */
.gml-cat:nth-last-child(-n+4) .gml-mega {
	left: auto;
	right: 0;
}

.gml-mega-all {
	display: inline-block;
	font-weight: 700;
	color: var(--gml-primary) !important;
	margin-bottom: 14px;
	text-decoration: none !important;
}

.gml-mega-cols {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 18px 24px;
}

.gml-col {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.gml-col-title {
	font-weight: 700;
	font-size: 13.5px;
	color: var(--gml-ink) !important;
	text-decoration: none !important;
	margin-bottom: 2px;
}

.gml-col-title:hover {
	color: var(--gml-primary) !important;
}

.gml-col-link {
	font-size: 13px;
	color: var(--gml-gray) !important;
	text-decoration: none !important;
	line-height: 1.5;
}

.gml-col-link:hover {
	color: var(--gml-primary) !important;
	text-decoration: underline !important;
}

.gml-col-more {
	color: var(--gml-primary) !important;
	font-weight: 600;
}

@media (max-width: 900px) {
	.gml-mega {
		display: none !important; /* mobile : tap = page catégorie */
	}
}

/* --------------------------------------------------------------------------
   Hero page d'accueil : fond clair, accent orange
   -------------------------------------------------------------------------- */

.header-hero,
.hero,
.page-header {
	background: linear-gradient(180deg, var(--gml-primary-light) 0%, #fff 100%) !important;
}

.header-hero h1,
.header-hero .hero-title,
.hero h1 {
	color: var(--gml-ink) !important;
	font-weight: 800 !important;
}

.header-hero p,
.hero p {
	color: var(--gml-gray) !important;
}

/* Formulaire de recherche du hero : carte blanche arrondie */
.header-hero form,
.hero form {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	padding: 8px;
}

.header-hero form input,
.header-hero form select {
	border-radius: 10px !important;
}

/* --------------------------------------------------------------------------
   Cartes d'annonces : arrondies, ombre au survol, prix gras
   -------------------------------------------------------------------------- */

.hp-listing,
article.hp-listing--view-block {
	border: 1px solid var(--gml-border) !important;
	border-radius: 16px !important;
	overflow: hidden;
	box-shadow: none !important;
	transition: box-shadow 0.18s ease, transform 0.18s ease;
	background: #fff;
}

.hp-listing:hover,
article.hp-listing--view-block:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.13) !important;
	transform: translateY(-2px);
}

.hp-listing__image,
.hp-listing__image img {
	border-radius: 0 !important;
}

.hp-listing__title,
.hp-listing__title a {
	font-size: 15px !important;
	font-weight: 600 !important;
	color: var(--gml-ink) !important;
}

.hp-listing__title a:hover {
	color: var(--gml-primary) !important;
}

/* Prix : gros, gras, encre foncée (façon leboncoin) */
.hp-listing__attributes-primary,
.hp-listing__attribute--price,
.hp-listing .hp-listing__attributes-primary div {
	font-weight: 800 !important;
	color: var(--gml-ink) !important;
	font-size: 17px;
}

/* Catégorie et méta en gris discret */
.hp-listing__categories a,
.hp-listing__category a {
	color: var(--gml-gray) !important;
	font-size: 12.5px;
}

.hp-listing__created-date,
.hp-listing__location {
	color: var(--gml-gray) !important;
	font-size: 12.5px;
}

/* Favoris (cœur) en orange au survol */
.hp-listing__action--favorite:hover,
.hp-listing__action--favorite.hp-listing__action--active {
	color: var(--gml-primary) !important;
}

/* --------------------------------------------------------------------------
   Sections accueil
   -------------------------------------------------------------------------- */

.hp-section__title,
h2.hp-section__title,
main h2 {
	font-weight: 800 !important;
	color: var(--gml-ink) !important;
}

/* Cartes catégories accueil : compactes, arrondies */
.hp-listing-category {
	border-radius: 16px !important;
	overflow: hidden;
	border: 1px solid var(--gml-border) !important;
	transition: box-shadow 0.18s ease;
}

.hp-listing-category:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.hp-listing-category__name,
.hp-listing-category__name a {
	font-weight: 700 !important;
	color: var(--gml-ink) !important;
}

/* Bandeau CTA "Vous avez quelque chose à vendre ?" : orange */
.hp-section--cta,
section.cta {
	background: var(--gml-primary) !important;
	border-radius: 20px;
}

/* --------------------------------------------------------------------------
   Footer : gris clair, liens sobres
   -------------------------------------------------------------------------- */

body > footer,
.site-footer,
.footer-widgets {
	background: #F7F7F7 !important;
	color: var(--gml-ink) !important;
	border-top: 1px solid var(--gml-border);
}

body > footer a,
.site-footer a {
	color: var(--gml-gray) !important;
}

body > footer a:hover,
.site-footer a:hover {
	color: var(--gml-primary) !important;
}

body > footer h3,
body > footer h4,
.site-footer h3,
.site-footer h4 {
	color: var(--gml-ink) !important;
	font-weight: 700 !important;
}

/* --------------------------------------------------------------------------
   Formulaires / champs
   -------------------------------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
select,
textarea {
	border-radius: 10px !important;
	border-color: var(--gml-border) !important;
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--gml-primary) !important;
	box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.18) !important;
}

/* Pagination */
.page-numbers.current {
	background: var(--gml-primary) !important;
	border-color: var(--gml-primary) !important;
	color: #fff !important;
	border-radius: 8px;
}

/* ==========================================================================
   v3 — blocs façon leboncoin
   ========================================================================== */

/* Bandeau vente */
.gml-sell {
	max-width: 1240px;
	margin: 18px auto 0;
	padding: 0 16px;
}

.gml-sell-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	background: linear-gradient(100deg, #FFF1E7 0%, #FFE3CC 100%);
	border-radius: 16px;
	padding: 22px 26px;
	flex-wrap: wrap;
}

.gml-sell-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.gml-sell-text strong {
	font-size: 21px;
	font-weight: 800;
	color: var(--gml-ink);
}

.gml-sell-text span {
	color: #6b4a2f;
	font-size: 14px;
}

.gml-sell-btn {
	background: var(--gml-primary);
	color: #fff !important;
	font-weight: 700;
	padding: 12px 22px;
	border-radius: 12px;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background-color 0.15s ease;
}

.gml-sell-btn:hover {
	background: var(--gml-primary-dark);
}

/* Recherches récentes */
.gml-recent {
	max-width: 1240px;
	margin: 18px auto 0;
	padding: 0 16px;
}

.gml-recent h2 {
	font-size: 17px;
	font-weight: 800;
	color: var(--gml-ink);
	margin: 0 0 10px;
}

.gml-recent-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

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

.gml-chip::before {
	content: "🕘 ";
	opacity: 0.6;
}

.gml-chip:hover {
	border-color: var(--gml-primary);
	color: var(--gml-primary) !important;
}

/* Conseils de sécurité (fiche annonce) */
.gml-safety {
	background: #FFF9F2;
	border: 1px solid #FFE3CC;
	border-radius: 14px;
	padding: 18px 20px;
	margin-top: 20px;
	font-size: 14px;
}

.gml-safety h3 {
	margin: 0 0 10px;
	font-size: 15.5px;
	font-weight: 800;
	color: var(--gml-ink);
}

.gml-safety ul {
	margin: 0 0 10px;
	padding-left: 18px;
	color: #4a4a4a;
}

.gml-safety li {
	margin-bottom: 5px;
	line-height: 1.45;
}

.gml-safety a {
	color: var(--gml-primary) !important;
	font-weight: 700;
	text-decoration: none !important;
}


/* ==========================================================================
   v3.2 — masquer les filtres latéraux sur les pages d'annonces
   ========================================================================== */

.gml-no-filters .hp-page__sidebar,
.gml-no-filters aside.hp-page__sidebar,
.gml-no-filters .hp-form--listing-filter,
.gml-no-filters .hp-form--listing-search + aside,
.gml-no-filters [data-component="sticky"] {
	display: none !important;
}

.gml-no-filters .hp-page__content,
.gml-no-filters .hp-page__content.hp-col-sm-8,
.gml-no-filters main .hp-col-sm-8 {
	width: 100% !important;
	max-width: 100% !important;
	flex: 0 0 100% !important;
}


/* v3.3 — icônes de catégories */
.gml-ico {
	display: inline-block;
	margin-right: 6px;
	font-size: 1em;
	line-height: 1;
}
.gml-cat-link .gml-ico { font-size: 15px; }
