/* Hanuura Gift Cards — page "Mon compte" (chargé uniquement sur cette page). */

.woocommerce-account {
	--hgc-accent: var(--global-palette1, #646b56);
	--hgc-pink: #d83a69;
	--hgc-line: #ececec;
	--hgc-soft: #f6f6f3;
}

/* ---------- Menu de navigation ---------- */

.woocommerce-account .woocommerce-MyAccount-navigation ul {
	margin: 0;
	padding: 8px;
	list-style: none;
	background: #fff;
	border: 1px solid var(--hgc-line);
	border-radius: 16px;
}

.woocommerce-account .woocommerce-MyAccount-navigation li {
	margin: 0 0 2px;
	padding: 0;
	border: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation li a {
	display: block;
	padding: 12px 16px;
	border: 0;
	border-radius: 10px;
	font-size: 14px;
	transition: background .15s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
	background: var(--hgc-soft);
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active > a,
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active > a:hover {
	background: var(--hgc-accent) !important;
	color: #fff !important;
	font-weight: 600;
}

/* ---------- Tableau de bord ---------- */

.hgc-dashboard h2 {
	margin: 0 0 4px;
	font-size: 28px;
	line-height: 1.2;
}

.hgc-dashboard__intro {
	margin: 0 0 24px;
	opacity: .7;
}

.hgc-tiles {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.hgc-tile {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 20px;
	border: 1px solid var(--hgc-line);
	border-radius: 16px;
	background: #fff;
	text-decoration: none;
	color: inherit;
	transition: box-shadow .15s ease, transform .15s ease;
}

.hgc-tile:hover {
	box-shadow: 0 10px 28px rgba(0, 0, 0, .07);
	transform: translateY(-2px);
}

.hgc-tile--gift {
	border-color: transparent;
	background: linear-gradient(135deg, #e8466f, #f5707a);
	color: #fff;
}

.hgc-tile__label {
	font-size: 12px;
	letter-spacing: .06em;
	text-transform: uppercase;
	opacity: .7;
}

.hgc-tile__value {
	font-size: 26px;
	line-height: 1.15;
}

.hgc-tile__value--small {
	font-size: 16px;
	line-height: 1.35;
}

.hgc-tile__sub {
	font-size: 13px;
	opacity: .75;
}

/* ---------- Page "Cartes cadeaux" ---------- */

.hgc-account__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 28px;
}

.hgc-account__head h2 {
	margin: 0 0 6px;
	font-size: 26px;
}

.hgc-account__head p {
	margin: 0;
	max-width: 520px;
	font-size: 14px;
	opacity: .7;
}

.hgc-btn {
	display: inline-block;
	padding: 12px 20px;
	border-radius: 10px;
	background: var(--hgc-accent);
	color: #fff;
	font-size: 13px;
	letter-spacing: .04em;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
}

.hgc-btn:hover {
	color: #fff;
	opacity: .9;
}

.hgc-empty {
	padding: 40px 24px;
	border: 1px dashed #d7d7d0;
	border-radius: 16px;
	background: var(--hgc-soft);
	text-align: center;
}

.hgc-empty p {
	margin: 8px 0 18px;
	opacity: .7;
}

.hgc-section {
	margin-bottom: 32px;
}

.hgc-section h3 {
	margin: 0 0 14px;
	font-size: 18px;
}

.hgc-cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.hgc-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 22px;
	overflow: hidden;
	border-radius: 18px;
	background: linear-gradient(135deg, #f7efe3, #ecdcc3);
	color: #3a2e22;
	box-shadow: 0 8px 24px rgba(58, 46, 34, .08);
}

.hgc-card::after {
	content: "";
	position: absolute;
	right: -40px;
	bottom: -60px;
	width: 180px;
	height: 180px;
	border: 1px solid rgba(58, 46, 34, .12);
	border-radius: 50%;
	pointer-events: none;
}

.hgc-card--spent,
.hgc-card--off {
	filter: grayscale(.7);
	opacity: .8;
}

.hgc-card__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.hgc-card__brand {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.hgc-badge {
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	background: #fff;
}

.hgc-badge--ok { color: #1f7a3d; }
.hgc-badge--spent { color: #8a6d00; }
.hgc-badge--off { color: #a02a2a; }

.hgc-card__balance {
	margin-top: 14px;
	font-size: 32px;
	font-weight: 700;
	line-height: 1.1;
}

.hgc-card__balance .woocommerce-Price-amount,
.hgc-card__balance bdi {
	font-weight: 700;
}

.hgc-card__sub {
	font-size: 13px;
	opacity: .7;
}

.hgc-card__meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: 12px;
	font-size: 12.5px;
	opacity: .85;
}

.hgc-card__meta span:first-child {
	letter-spacing: .08em;
	font-variant-numeric: tabular-nums;
}

.hgc-card__history {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid rgba(58, 46, 34, .15);
	font-size: 13px;
}

.hgc-card__history summary {
	cursor: pointer;
	font-weight: 600;
}

.hgc-card__history ul {
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}

.hgc-card__history li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 5px 0;
}

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
	.hgc-tiles,
	.hgc-cards {
		grid-template-columns: 1fr;
	}

	.hgc-account__head {
		flex-direction: column;
	}

	.hgc-dashboard h2 {
		font-size: 24px;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation li a {
		padding: 9px 14px;
	}
}

/* ==========================================================================
   Mise en page moderne : menu à gauche, contenu à droite (ordinateur) ;
   barre d'onglets défilable (téléphone).
   ========================================================================== */

body.logged-in.woocommerce-account .woocommerce {
	display: flex;
	align-items: flex-start;
	gap: 40px;
}

body.logged-in.woocommerce-account .account-navigation-wrap {
	order: -1;
	flex: 0 0 260px;
	float: none;
	width: 260px;
	position: sticky;
	top: 110px;
}

body.logged-in.woocommerce-account .woocommerce-MyAccount-content {
	flex: 1 1 0;
	float: none;
	width: auto;
	min-width: 0;
}

body.logged-in.woocommerce-account .base-account-avatar {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 14px;
	padding: 0 6px;
}

body.logged-in.woocommerce-account .base-customer-name {
	font-weight: 600;
}

@media (max-width: 991px) {

	body.logged-in.woocommerce-account .woocommerce {
		flex-direction: column;
		gap: 18px;
	}

	body.logged-in.woocommerce-account .account-navigation-wrap {
		position: static;
		flex: none;
		width: 100%;
	}

	body.logged-in.woocommerce-account .woocommerce-MyAccount-content {
		width: 100%;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation ul {
		display: flex;
		gap: 8px;
		padding: 2px 2px 8px;
		overflow-x: auto;
		border: 0;
		border-radius: 0;
		background: transparent;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation ul::-webkit-scrollbar {
		display: none;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation li {
		flex: 0 0 auto;
		margin: 0;
		border: 0;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation li a {
		padding: 9px 16px;
		border: 1px solid var(--hgc-line);
		border-radius: 999px;
		background: #fff;
		white-space: nowrap;
	}
}

/* ---------- Tableau de bord : actions + commandes récentes ---------- */

.hgc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 22px 0 10px;
}

.hgc-btn--ghost {
	border: 1px solid var(--hgc-accent);
	background: #fff;
	color: var(--hgc-accent);
}

.hgc-btn--ghost:hover {
	color: var(--hgc-accent);
	background: var(--hgc-soft);
}

.hgc-section__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
}

.hgc-section__head a {
	font-size: 13px;
}

.hgc-orders {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hgc-orders a {
	display: grid;
	grid-template-columns: 90px 1fr auto auto;
	align-items: center;
	gap: 14px;
	padding: 14px 18px;
	border: 1px solid var(--hgc-line);
	border-radius: 14px;
	background: #fff;
	color: inherit;
	text-decoration: none;
	transition: box-shadow .15s ease;
}

.hgc-orders a:hover {
	box-shadow: 0 8px 22px rgba(0, 0, 0, .06);
}

.hgc-orders__id {
	font-weight: 700;
}

.hgc-orders__date {
	font-size: 13px;
	opacity: .65;
}

.hgc-status {
	padding: 4px 11px;
	border-radius: 999px;
	background: #efefea;
	color: #555;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.hgc-status--processing { background: #e6f0ff; color: #1d4fb3; }
.hgc-status--completed { background: #e4f5ea; color: #1f7a3d; }
.hgc-status--on-hold,
.hgc-status--pending { background: #fff1d9; color: #9a6200; }
.hgc-status--cancelled,
.hgc-status--failed { background: #fde6e6; color: #a02a2a; }
.hgc-status--refunded { background: #efefea; color: #555; }

@media (max-width: 575px) {
	.hgc-orders a {
		grid-template-columns: 1fr auto;
	}
	.hgc-orders__date {
		grid-column: 1;
	}
	.hgc-orders__total {
		grid-column: 2;
		grid-row: 1;
	}
	.hgc-status {
		grid-column: 2;
		grid-row: 2;
		justify-self: end;
	}
}

/* ---------- Page "Commandes" : liste claire avec pastilles d'état ---------- */

.woocommerce-account .woocommerce-orders-table {
	border: 0;
	border-collapse: separate;
	border-spacing: 0 10px;
}

.woocommerce-account .woocommerce-orders-table thead th {
	padding: 0 16px 2px;
	border: 0;
	font-size: 11px;
	letter-spacing: .07em;
	text-transform: uppercase;
	opacity: .6;
}

.woocommerce-account .woocommerce-orders-table tbody td,
.woocommerce-account .woocommerce-orders-table tbody th {
	padding: 16px;
	border: 0;
	border-top: 1px solid var(--hgc-line);
	border-bottom: 1px solid var(--hgc-line);
	background: #fff;
}

.woocommerce-account .woocommerce-orders-table tbody td:first-child,
.woocommerce-account .woocommerce-orders-table tbody th:first-child {
	border-left: 1px solid var(--hgc-line);
	border-radius: 14px 0 0 14px;
	font-weight: 700;
}

.woocommerce-account .woocommerce-orders-table tbody td:last-child {
	border-right: 1px solid var(--hgc-line);
	border-radius: 0 14px 14px 0;
}

@media (min-width: 768px) {
	.woocommerce-account .woocommerce-orders-table__cell-order-status::before {
		content: "";
		display: inline-block;
		width: 8px;
		height: 8px;
		margin-right: 8px;
		border-radius: 50%;
		background: #aaa;
	}
}

.woocommerce-orders-table__row--status-processing .woocommerce-orders-table__cell-order-status { color: #1d4fb3; font-weight: 600; }
.woocommerce-orders-table__row--status-completed .woocommerce-orders-table__cell-order-status { color: #1f7a3d; font-weight: 600; }
.woocommerce-orders-table__row--status-on-hold .woocommerce-orders-table__cell-order-status,
.woocommerce-orders-table__row--status-pending .woocommerce-orders-table__cell-order-status { color: #9a6200; font-weight: 600; }
.woocommerce-orders-table__row--status-cancelled .woocommerce-orders-table__cell-order-status,
.woocommerce-orders-table__row--status-failed .woocommerce-orders-table__cell-order-status { color: #a02a2a; font-weight: 600; }

.woocommerce-account .woocommerce-orders-table .woocommerce-button {
	padding: 9px 16px;
	border-radius: 10px;
	font-size: 12px;
}


@media (min-width: 768px) {
	.woocommerce-orders-table__row--status-processing .woocommerce-orders-table__cell-order-status::before { background: #1d4fb3; }
	.woocommerce-orders-table__row--status-completed .woocommerce-orders-table__cell-order-status::before { background: #1f7a3d; }
	.woocommerce-orders-table__row--status-on-hold .woocommerce-orders-table__cell-order-status::before,
.woocommerce-orders-table__row--status-pending .woocommerce-orders-table__cell-order-status::before { background: #e0a000; }
	.woocommerce-orders-table__row--status-cancelled .woocommerce-orders-table__cell-order-status::before,
.woocommerce-orders-table__row--status-failed .woocommerce-orders-table__cell-order-status::before { background: #a02a2a; }
}

/* ---------- Mon adresse : une seule carte ---------- */

.woocommerce-account .woocommerce-Addresses {
	display: block;
}

.woocommerce-account .woocommerce-Addresses .woocommerce-Address {
	float: none;
	width: 100%;
	max-width: 560px;
	padding: 24px;
	border: 1px solid var(--hgc-line);
	border-radius: 16px;
	background: #fff;
}

.woocommerce-account .woocommerce-Address-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 14px;
}

.woocommerce-account .woocommerce-Address-title h2 {
	margin: 0;
	font-size: 22px;
}

.woocommerce-account .woocommerce-Address-title a.edit {
	flex: none;
	padding: 9px 16px;
	border-radius: 10px;
	background: var(--hgc-accent);
	font-size: 0;
	line-height: 1;
	text-decoration: none;
}

.woocommerce-account .woocommerce-Address-title a.edit::after {
	content: "Modifier";
	color: #fff;
	font-size: 13px;
}

.woocommerce-account .woocommerce-Address address {
	font-size: 15px;
	font-style: normal;
	line-height: 1.75;
}

/* ---------- Formulaires (adresse, détails du compte) ---------- */

.woocommerce-account .woocommerce-MyAccount-content form .form-row label {
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
}

.woocommerce-account .woocommerce-MyAccount-content form .input-text,
.woocommerce-account .woocommerce-MyAccount-content form select,
.woocommerce-account .woocommerce-MyAccount-content form textarea {
	padding: 12px 14px;
	border: 1px solid #dcdcd6;
	border-radius: 10px;
	background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.woocommerce-account .woocommerce-MyAccount-content form .input-text:focus,
.woocommerce-account .woocommerce-MyAccount-content form select:focus {
	border-color: var(--hgc-accent);
	outline: 0;
	box-shadow: 0 0 0 3px rgba(100, 107, 86, .15);
}

.woocommerce-account .woocommerce-MyAccount-content form button[type="submit"],
.woocommerce-account .woocommerce-MyAccount-content form .button {
	padding: 13px 24px;
	border-radius: 10px;
}


/* Avatar + nom : l'icône est en position normale (le thème la place en absolu),
   avec un espace net avant le nom d'utilisateur. */
body.logged-in.woocommerce-account .base-account-avatar {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 0 8px;
}

body.logged-in.woocommerce-account .base-account-avatar .base-customer-image,
body.logged-in.woocommerce-account .base-account-avatar .bt-link-to-gravatar {
	position: static;
	display: block;
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	margin: 0;
}

body.logged-in.woocommerce-account .base-account-avatar img.avatar {
	position: static;
	display: block;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
}

body.logged-in.woocommerce-account .base-account-avatar .base-customer-name {
	position: static;
	flex: 1 1 auto;
	margin: 0 !important;
	padding: 0 !important;
	min-width: 0;
	overflow-wrap: anywhere;
}


/* Mon adresse : bouton "Modifier" de taille fixe (le texte d'origine du thème est
   masqué, le libellé est dessiné par le pseudo-élément, sans risque de coupure). */
.woocommerce-account .woocommerce-Address-title {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	text-align: left !important;
}

.woocommerce-account .woocommerce-Address-title h2 {
	flex: 1 1 auto !important;
	margin: 0 !important;
	text-align: left !important;
}

.woocommerce-account .woocommerce-Address-title a.edit {
	position: relative !important;
	display: block !important;
	flex: 0 0 auto !important;
	width: 116px !important;
	height: 42px !important;
	margin: 0 0 0 16px !important;
	padding: 0 !important;
	border-radius: 10px !important;
	background: var(--hgc-accent) !important;
	font-size: 0 !important;
	line-height: 0 !important;
	overflow: hidden !important;
}

.woocommerce-account .woocommerce-Address-title a.edit::after {
	content: "Modifier" !important;
	position: absolute !important;
	inset: 0 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	color: #fff !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
}


.hgc-address-intro {
	margin: -4px 0 22px;
	font-size: 14px;
	opacity: .7;
}


/* ==========================================================================
   Suivi de commande
   ========================================================================== */

.hgc-track {
	margin: 0 0 28px;
	padding: 24px;
	border: 1px solid var(--hgc-line);
	border-radius: 16px;
	background: #fff;
}

.hgc-track h3 {
	margin: 0 0 4px;
	font-size: 20px;
}

.hgc-track__now {
	margin: 0 0 20px;
	font-size: 14px;
	opacity: .8;
}

.hgc-track--stopped {
	background: #fdf1f1;
	border-color: #f3d4d4;
}

.hgc-steps {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hgc-steps li {
	position: relative;
	display: flex;
	gap: 16px;
	padding: 0 0 22px;
}

.hgc-steps li:last-child {
	padding-bottom: 0;
}

/* trait vertical entre les étapes */
.hgc-steps li::before {
	content: "";
	position: absolute;
	left: 11px;
	top: 26px;
	bottom: 0;
	width: 2px;
	background: #e3e3dc;
}

.hgc-steps li:last-child::before {
	display: none;
}

.hgc-steps li.is-done::before {
	background: var(--hgc-accent);
}

.hgc-steps__dot {
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	border: 2px solid #d4d4cc;
	border-radius: 50%;
	background: #fff;
	box-sizing: border-box;
}

.hgc-steps li.is-done .hgc-steps__dot {
	border-color: var(--hgc-accent);
	background: var(--hgc-accent);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
	background-size: 70%;
	background-position: center;
	background-repeat: no-repeat;
}

.hgc-steps li.is-current .hgc-steps__dot {
	border-color: var(--hgc-accent);
	background: #fff;
	box-shadow: 0 0 0 5px rgba(100, 107, 86, .18);
}

.hgc-steps li.is-current .hgc-steps__dot::after {
	content: "";
	display: block;
	width: 10px;
	height: 10px;
	margin: 5px;
	border-radius: 50%;
	background: var(--hgc-accent);
}

.hgc-steps strong {
	display: block;
	font-size: 15px;
	line-height: 1.4;
}

.hgc-steps li.is-todo strong {
	font-weight: 500;
	opacity: .5;
}

.hgc-steps small {
	display: block;
	margin-top: 2px;
	font-size: 12.5px;
	opacity: .65;
}

.hgc-track__parcel {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 22px;
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid var(--hgc-line);
	font-size: 14px;
}

/* Colonne "Suivi" de la liste des commandes */

.hgc-track-mini {
	display: flex;
	flex-direction: column;
	gap: 7px;
	min-width: 150px;
}

.hgc-track-mini__label {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
}

.hgc-track-mini__bar {
	display: flex;
	gap: 4px;
}

.hgc-track-mini__bar i {
	flex: 1;
	height: 5px;
	border-radius: 3px;
	background: #e3e3dc;
}

.hgc-track-mini__bar i.is-done {
	background: var(--hgc-accent);
}

.hgc-track-mini__none {
	opacity: .5;
}


@media (max-width: 767px) {
	.woocommerce-account .woocommerce-orders-table .hgc-track-mini {
		align-items: flex-end;
		min-width: 0;
	}

	.woocommerce-account .woocommerce-orders-table .hgc-track-mini__bar {
		width: 100%;
		max-width: 220px;
	}

	/* le libellé "État:" / "Suivi:" garde sa couleur de texte normale */
	.woocommerce-account .woocommerce-orders-table td::before {
		background: none !important;
	}
}


/* Coordonnées de la commande : un seul bloc propre. */
.hgc-customer-details {
	max-width: 560px;
	margin-top: 28px;
	padding: 22px 24px;
	border: 1px solid var(--hgc-line);
	border-radius: 16px;
	background: #fff;
}

.hgc-customer-details .woocommerce-column__title {
	margin: 0 0 12px;
	font-size: 22px;
}

.hgc-customer-details address {
	font-style: normal;
	line-height: 1.75;
}

.hgc-customer-details address p {
	margin: 2px 0 0;
}
