/* =========================
   SIDEBAR COMPTE - carte "My account" (titre + menu) et encart promo
   Structure : aside.hp-page__sidebar > div > div.inner-wrapper-sticky > .tfd-account-card + .tfd-visibility-cta
   Le nav natif user_account_menu est vidé côté template ; le menu est re-rendu dans .tfd-account-card.
   Encart promo : phase 1 = incitation à poster une annonce ; phase 2 prévue = auto-promotion packs / boost.
========================= */

/* Carte titre + menu.
   margin-top : cale le haut de la carte sur le haut visuel des lettres du h1
   (la boîte du h1 a plus d'air interne que la carte, l'alignement au pixel déséquilibre). */
.tfd-account-card {
	margin-top: 14px;
	padding: 20px 16px;
	border: 1px solid #e6e6e6;
	border-radius: 12px;
	background: #fff;
}

.tfd-account-card .tfd-account-title {
	margin: 0 0 14px 12px;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
}

/* Scope pages compte : body.hp-template--user-account-page (routes HivePress)
   + body.woocommerce-account (endpoints WooCommerce comme Orders, où la body class HivePress est absente). */

/* Respiration sous le menu de navigation sur les pages compte
   (vérifié : aucun padding/margin thème sur les wrappers).
   Ciblage du .hp-row porteur de la sidebar, seul wrapper commun aux deux gabarits :
   - routes HivePress : div.content-area > div.hp-page > div.hp-row
   - endpoints WooCommerce : div.page__text > div.woocommerce > div > div.hp-row (pas de .hp-page) */
body.hp-template--user-account-page .hp-page > .hp-row,
body.woocommerce-account .woocommerce > div > .hp-row {
	padding-top: 32px;
}

/* Titre de page : trait décoratif ListingHive (h1.hp-page__title::before, 45x4 px) retiré
   sur toutes les pages compte. Le display: block du thème n'est pas en !important. */
body.hp-template--user-account-page .hp-page__title::before,
body.woocommerce-account .hp-page__title::before {
	display: none;
}

/* Sous-titre sous le h1 (injecté par route via user_account_page/blocks dans tfd-core) */
body.hp-template--user-account-page .tfd-page-subtitle,
body.woocommerce-account .tfd-page-subtitle {
	margin: -14px 0 24px;
	font-size: 14px;
	line-height: 1.4;
	color: #6b6b6b;
}

/* Reset des styles widget ListingHive sur le nav re-rendu */
.tfd-account-card .hp-menu--user-account {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
}

.tfd-account-card .hp-menu--user-account ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tfd-account-card .hp-menu__item {
	margin: 0 0 4px;
	padding: 0;
	border: 0;
}

.tfd-account-card .hp-menu__item:last-child {
	margin-bottom: 0;
}

.tfd-account-card .hp-menu__item > a {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 12px;
	padding: 11px 12px;
	border-radius: 8px;
	color: #2d2d2d;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
	transition: color .15s, background .15s;
}

.tfd-account-card .hp-menu__item > a > span {
	flex: 0 1 auto;
	margin: 0;
}

.tfd-account-card .hp-menu__item > a:hover {
	color: #F15A29;
	background: #fff7f2;
}

/* Icône Font Awesome par item, sur le lien (le li porte déjà un ::before ListingHive).
   Chevron par défaut : un item ajouté par une extension sans icône dédiée reste aligné. */
.tfd-account-card .hp-menu__item > a::before {
	content: "\f105"; /* fa-angle-right (fallback) */
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
	font-size: 15px;
	line-height: 1;
	width: 18px;
	text-align: center;
	color: #8a8a8a;
	flex: 0 0 auto;
	transition: color .15s;
}

.tfd-account-card .hp-menu__item > a:hover::before {
	color: #F15A29;
}

.tfd-account-card .hp-menu__item--listings-edit > a::before {
	content: "\f0ca"; /* fa-list-ul */
}

.tfd-account-card .hp-menu__item--orders-view > a::before {
	content: "\f07a"; /* fa-shopping-cart */
}

.tfd-account-card .hp-menu__item--user-edit-settings > a::before {
	content: "\f013"; /* fa-cog */
}

.tfd-account-card .hp-menu__item--user-logout > a::before {
	content: "\f2f5"; /* fa-sign-out-alt */
}

/* Items conditionnels selon extensions HivePress (noms d'item à valider via outerHTML) */
.tfd-account-card .hp-menu__item--messages-thread > a::before {
	content: "\f086"; /* fa-comments */
}

.tfd-account-card .hp-menu__item--listings-favorite > a::before {
	content: "\f004"; /* fa-heart */
}

.tfd-account-card .hp-menu__item--user-reviews > a::before {
	content: "\f005"; /* fa-star */
}

.tfd-account-card .hp-menu__item--requests-edit > a::before {
	content: "\f0e0"; /* fa-envelope */
}

/* Item actif */
.tfd-account-card .hp-menu__item--current > a,
.tfd-account-card .hp-menu__item--current > a::before {
	color: #F15A29;
}

.tfd-account-card .hp-menu__item--current > a {
	background: #fff1e8;
	font-weight: 600;
}

/* Encart promo (contenu piloté par hivepress/user/account/tfd-visibility-cta.php) */
.tfd-visibility-cta {
	margin: 20px 0 40px;
	padding: 24px 20px;
	border: 1px solid #e6e6e6;
	border-radius: 12px;
	background: #fff6f1;
	text-align: center;
}

.tfd-visibility-cta__icon::before {
	content: "\f02b"; /* fa-tag */
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
	font-size: 28px;
	line-height: 1;
	color: #F15A29;
	display: block;
	margin-bottom: 10px;
}

.tfd-visibility-cta__title {
	margin: 0 0 6px;
	font-size: 17px;
	font-weight: 600;
}

.tfd-visibility-cta__text {
	margin: 0 0 14px;
	font-size: 13px;
	line-height: 1.4;
	color: #6b6b6b;
}

.tfd-visibility-cta__button {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 8px;
	background: #F15A29;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition: background .15s;
}

.tfd-visibility-cta__button:hover {
	background: #D84A20;
	color: #fff;
}

/* =========================
   MOBILE - sidebar (menu + encart) sous le contenu
   .hp-row est en flex (vérifié DevTools) ; HivePress empile les colonnes sous 47.99em (768px).
   La sidebar reste :first-child dans le DOM : on déplace sa marge de 3rem (règle HivePress
   .hp-page__sidebar:first-child) du bas vers le haut.
========================= */
@media only screen and (max-width: 47.99em) {
	.hp-page__sidebar {
		order: 2;
		margin-top: 3rem;
		margin-bottom: 0;
	}

	.hp-page__content {
		order: 1;
	}
}

/* Mobile : on compacte la carte et le menu */
@media (max-width: 700px) {
	.tfd-account-card {
		padding: 16px 12px;
	}

	.tfd-account-card .tfd-account-title {
		font-size: 18px;
		margin-left: 10px;
	}

	.tfd-account-card .hp-menu__item > a {
		padding: 10px;
		font-size: 14px;
	}
}

/* =========================
   WOOCOMMERCE (Orders) - habillage aux couleurs AddNList
   Bandeau info bleu -> encart orange doux ; boutons gris -> style secondaire
   (aligné sur les boutons de pagination) ; bouton du bandeau -> orange plein.
   Classes vérifiées via outerHTML : .woocommerce-info, a.button.wc-forward, a.woocommerce-button.button.view
========================= */
body.hp-template--user-account-page .woocommerce-info,
body.woocommerce-account .woocommerce-info {
	border-top-color: #F15A29;
	background: #fff6f1;
	color: #2d2d2d;
}

body.hp-template--user-account-page .woocommerce-info::before,
body.woocommerce-account .woocommerce-info::before {
	color: #F15A29;
}

body.hp-template--user-account-page .woocommerce-info a.button.wc-forward,
body.woocommerce-account .woocommerce-info a.button.wc-forward {
	background: #F15A29;
	color: #fff;
	border: 0;
	border-radius: 8px;
	transition: background .15s;
}

body.hp-template--user-account-page .woocommerce-info a.button.wc-forward:hover,
body.woocommerce-account .woocommerce-info a.button.wc-forward:hover {
	background: #D84A20;
}

body.hp-template--user-account-page .woocommerce a.woocommerce-button.button,
body.hp-template--user-account-page .woocommerce .woocommerce-pagination a.button,
body.hp-template--user-account-page .woocommerce a.button.wc-back,
body.woocommerce-account .woocommerce a.woocommerce-button.button,
body.woocommerce-account .woocommerce .woocommerce-pagination a.button,
body.woocommerce-account .woocommerce a.button.wc-back {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	color: #333;
	transition: color .15s, border-color .15s, background .15s;
}

body.hp-template--user-account-page .woocommerce a.woocommerce-button.button:hover,
body.hp-template--user-account-page .woocommerce .woocommerce-pagination a.button:hover,
body.hp-template--user-account-page .woocommerce a.button.wc-back:hover,
body.woocommerce-account .woocommerce a.woocommerce-button.button:hover,
body.woocommerce-account .woocommerce .woocommerce-pagination a.button:hover,
body.woocommerce-account .woocommerce a.button.wc-back:hover {
	border-color: #F15A29;
	background: #fff1e8;
	color: #F15A29;
}

/* Numéro de commande : même pattern que les titres d'annonces (sombre, orange au survol) */
body.hp-template--user-account-page .woocommerce-orders-table__cell-order-number a,
body.woocommerce-account .woocommerce-orders-table__cell-order-number a {
	color: #2d2d2d;
	font-weight: 600;
	text-decoration: none;
	transition: color .15s;
}

body.hp-template--user-account-page .woocommerce-orders-table__cell-order-number a:hover,
body.woocommerce-account .woocommerce-orders-table__cell-order-number a:hover {
	color: #F15A29;
}
