/**
 * DealerHelper customer account + dashboard styles.
 *
 * Matched to the live theme (library-theme/style.css):
 *   - Primary buttons: navy #062b5f, 3px radius, uppercase, Work Sans 600
 *     (mirrors .search-btn / .link-btn). Red #ff2d16 is an ACCENT (headings,
 *     section labels, the 40x4 red accent bar), never a button fill.
 *   - Headings: Oswald, uppercase.
 *   - Body / labels: Work Sans, navy #122359.
 * Fonts (Oswald + Work Sans) are already enqueued by the theme front-end.
 */

:root {
	--dh-red: #ff2d16;
	--dh-navy: #122359;
	--dh-navy-btn: #062b5f;
	--dh-bg: #f1f0ee;
	--dh-panel-bg: #deddd9;
	--dh-line: #deddd9;
	--dh-ink: #2a2a2a;
}

/* ---------- Sticky footer on the (often short) account pages ----------
   accounts.css only loads on the login/register/lost-password/dashboard pages,
   so these rules are scoped to them: make the site wrapper a full-height flex
   column and let <main> grow, pushing the footer to the bottom of the viewport
   instead of leaving a gap under it on short pages. */

.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.wp-site-blocks > main {
	flex: 1 0 auto;
}

/* ---------- Auth screens (login / register / lost password) ---------- */

.dh-auth {
	/* Break out of the block theme's constrained main to span full width,
	   the same idiom the theme uses for .hero / .search-section. */
	width: 100vw;
	max-width: none;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	display: flex;
	justify-content: center;
	padding: 70px 20px;
	background: var(--dh-bg);
	min-height: 60vh;
}

.dh-auth__card {
	width: 100%;
	max-width: 440px;
	background: #fff;
	border-radius: 3px;
	box-shadow: 0 6px 30px rgba(6, 43, 95, 0.10);
	padding: 44px 40px;
}

.dh-auth__title {
	font-family: "Oswald", sans-serif;
	font-weight: 700;
	font-size: 34px;
	line-height: 1;
	color: var(--dh-navy);
	margin: 0 0 14px;
	text-transform: uppercase;
}

/* Red accent bar under the title, echoing .red-accent-bar in the theme. */
.dh-auth__title::after {
	content: "";
	display: block;
	width: 40px;
	height: 4px;
	margin-top: 16px;
	background: var(--dh-red);
}

.dh-auth__intro {
	color: #555;
	font-size: 0.95rem;
	margin: 20px 0 0;
	line-height: 1.5;
}

/* ---------- Forms ---------- */

.dh-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
	margin-top: 26px;
}

.dh-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.dh-field__label {
	font-family: "Work Sans", sans-serif;
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--dh-navy);
}

.dh-field input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #c2c5c8;
	border-radius: 3px;
	font-size: 1rem;
	font-family: "Work Sans", sans-serif;
	color: var(--dh-navy);
	outline-offset: 2px;
}

.dh-field input:focus {
	outline: 2px solid var(--dh-navy-btn);
	border-color: var(--dh-navy-btn);
}

.dh-check {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.9rem;
	color: #555;
}

/* Primary button — navy fill, 3px, uppercase (matches .search-btn / .link-btn). */
.dh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--dh-navy-btn);
	color: #fff;
	border: 2px solid var(--dh-navy-btn);
	border-radius: 3px;
	padding: 13px 26px;
	font-family: "Work Sans", sans-serif;
	font-size: 15px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.dh-btn:hover {
	background: #08387a;
	border-color: #08387a;
	color: #fff;
}

.dh-btn--outline {
	background: transparent;
	color: var(--dh-navy-btn);
}

.dh-btn--outline:hover {
	background: var(--dh-navy-btn);
	color: #fff;
}

.dh-btn--ghost {
	background: transparent;
	color: var(--dh-red);
	border-color: transparent;
}

.dh-btn--ghost:hover {
	background: transparent;
	color: #e02710;
	text-decoration: underline;
}

/* ---------- "Se connecter avec Google" ----------
   Google's brand guidelines want their button on a neutral (white) surface with
   the unmodified four-colour mark, so this one deliberately does NOT use the
   navy .dh-btn fill. */

.dh-oauth {
	margin-top: 26px;
}

.dh-oauth__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	padding: 12px 20px;
	background: #fff;
	border: 1px solid #c2c5c8;
	border-radius: 3px;
	font-family: "Work Sans", sans-serif;
	font-size: 15px;
	font-weight: 600;
	color: var(--dh-navy);
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dh-oauth__btn:hover {
	border-color: var(--dh-navy-btn);
	box-shadow: 0 2px 8px rgba(6, 43, 95, 0.12);
	color: var(--dh-navy);
}

.dh-oauth__btn:focus-visible {
	outline: 2px solid var(--dh-navy-btn);
	outline-offset: 2px;
}

.dh-oauth__logo {
	flex: 0 0 auto;
}

/* Horizontal rule with a centred "ou" separating Google from the password form. */
.dh-oauth__divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 22px;
	color: #8a8a8a;
	font-family: "Work Sans", sans-serif;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.dh-oauth__divider::before,
.dh-oauth__divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--dh-line);
}

/* The form directly under the divider already carries its own top margin. */
.dh-oauth + .dh-form {
	margin-top: 22px;
}

.dh-auth__links {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	align-items: center;
	margin-top: 26px;
	padding-top: 22px;
	border-top: 1px solid var(--dh-line);
	font-family: "Work Sans", sans-serif;
	font-size: 0.9rem;
}

.dh-auth__links a {
	color: var(--dh-navy-btn);
	text-decoration: none;
	font-weight: 600;
}

.dh-auth__links a:hover {
	color: var(--dh-red);
	text-decoration: underline;
}

/* Keep a solid-button link (e.g. "Mon tableau de bord") from picking up the
   plain-link colour above. */
.dh-auth__links a.dh-btn {
	color: #fff;
}

.dh-auth__links a.dh-btn:hover {
	text-decoration: none;
}

/* ---------- Alerts ---------- */

.dh-alert {
	padding: 12px 14px;
	border-radius: 3px;
	font-size: 0.9rem;
	margin-bottom: 16px;
	line-height: 1.45;
	font-family: "Work Sans", sans-serif;
}

.dh-alert--error {
	background: #fdecea;
	color: #a3160b;
	border: 1px solid #f5c6c0;
}

.dh-alert--success {
	background: #e9f6ec;
	color: #1e6b34;
	border: 1px solid #bfe3c8;
}

/* ---------- Dashboard ---------- */

.dh-dashboard {
	/* Full-bleed wrapper with the content centred to a 1000px column, so the
	   dashboard isn't squeezed by the theme's 800px content width. */
	width: 100vw;
	max-width: none;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding: 56px max(24px, calc((100vw - 1000px) / 2)) 90px;
}

/* Sidebar + content shell. */
.dh-dashboard__layout {
	display: grid;
	grid-template-columns: 250px minmax(0, 1fr);
	align-items: start;
	gap: 40px;
}

/* ---------- Sidebar ---------- */

.dh-sidebar {
	position: sticky;
	top: 32px;
	background: #fff;
	border: 1px solid var(--dh-line);
	border-radius: 3px;
	overflow: hidden;
}

.dh-sidebar__identity {
	padding: 22px 20px 18px;
	border-bottom: 1px solid var(--dh-line);
	/* The red accent bar the theme uses to head a block. */
	box-shadow: inset 0 4px 0 0 var(--dh-red);
}

.dh-sidebar__eyebrow {
	margin: 6px 0 8px;
	font-family: "Oswald", sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-size: 12px;
	font-weight: 600;
	color: var(--dh-red);
}

.dh-sidebar__name {
	margin: 0 0 2px;
	font-family: "Oswald", sans-serif;
	font-weight: 600;
	font-size: 19px;
	line-height: 1.2;
	color: var(--dh-navy);
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.dh-sidebar__email {
	margin: 0;
	font-family: "Work Sans", sans-serif;
	font-size: 12px;
	color: #6b6b6b;
	overflow-wrap: anywhere;
}

.dh-sidebar__nav {
	display: flex;
	flex-direction: column;
	padding: 10px 0 12px;
}

.dh-sidebar__link {
	display: block;
	padding: 11px 20px 11px 17px;
	border-left: 3px solid transparent;
	font-family: "Work Sans", sans-serif;
	font-size: 14px;
	font-weight: 500;
	color: var(--dh-navy);
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.dh-sidebar__link:hover,
.dh-sidebar__link:focus-visible {
	background: var(--dh-bg);
	color: var(--dh-navy);
}

/* Red stays an accent marking the active row, never a fill. */
.dh-sidebar__link.is-active {
	background: var(--dh-bg);
	border-left-color: var(--dh-red);
	font-weight: 600;
}

.dh-sidebar__link--logout {
	color: #6b6b6b;
}

.dh-sidebar__sep {
	display: block;
	height: 1px;
	margin: 10px 20px;
	background: var(--dh-line);
}

/* ---------- Main column ---------- */

.dh-main__head {
	margin-bottom: 28px;
	padding-bottom: 20px;
	border-bottom: 4px solid var(--dh-red);
}

.dh-main__eyebrow {
	margin: 0 0 8px;
	font-family: "Oswald", sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-size: 13px;
	font-weight: 600;
	color: var(--dh-red);
}

.dh-main__title {
	font-family: "Oswald", sans-serif;
	font-weight: 700;
	font-size: 40px;
	line-height: 1;
	color: var(--dh-navy);
	margin: 0;
	text-transform: uppercase;
}

.dh-main__intro {
	margin: 14px 0 0;
	font-family: "Work Sans", sans-serif;
	color: var(--dh-ink);
	max-width: 60ch;
}

/* ---------- Overview tiles ---------- */

.dh-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 18px;
	margin-bottom: 24px;
}

.dh-tile {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 22px;
	background: #fff;
	border: 1px solid var(--dh-line);
	border-radius: 3px;
	text-decoration: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dh-tile:hover,
.dh-tile:focus-visible {
	border-color: var(--dh-navy);
	box-shadow: 0 4px 18px rgba(6, 43, 95, 0.08);
}

.dh-tile__label {
	font-family: "Oswald", sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 12px;
	font-weight: 600;
	color: var(--dh-red);
}

/* Muted while it holds the em-dash placeholder: in navy the dash reads as a rule
   rather than as a missing value. Milestone 2/3 can drop the modifier class. */
.dh-tile__value {
	font-family: "Oswald", sans-serif;
	font-size: 38px;
	font-weight: 700;
	line-height: 1;
	color: #c4c4c4;
}

/* Static explanatory copy sitting under the placeholder figure. */
.dh-tile__note {
	font-family: "Work Sans", sans-serif;
	font-size: 12.5px;
	line-height: 1.45;
	color: #6b6b6b;
}

.dh-tile__hint {
	margin-top: 4px;
	font-family: "Work Sans", sans-serif;
	font-size: 13px;
	font-weight: 600;
	color: var(--dh-navy);
}

/* ---------- Request status stages (placeholder) ---------- */

/* The four stages read as one row; auto-fit is avoided here because a long label
   ("En révision") pushes its track past the minimum and drops a stage onto a
   second row. Explicit tracks with min-width:0 children keep the stepper intact. */
.dh-stages {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dh-stage {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 16px 14px;
	border: 2px dashed var(--dh-line);
	border-radius: 3px;
	background: #fff;
}

.dh-stage__dot {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--dh-bg);
	color: var(--dh-navy);
	font-family: "Oswald", sans-serif;
	font-size: 13px;
	font-weight: 600;
}

.dh-stage__label {
	flex: 1 1 auto;
	min-width: 0;
	font-family: "Work Sans", sans-serif;
	font-size: 13px;
	font-weight: 500;
	color: var(--dh-navy);
}

.dh-stage__count {
	font-family: "Oswald", sans-serif;
	font-size: 18px;
	font-weight: 700;
	color: #c4c4c4;
}

/* ---------- "This is only an example" label ---------- */

/* Sits directly above every illustrative block, in muted text so it reads as an
   annotation rather than as part of the data. */
.dh-demo-note {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 18px;
	font-family: "Work Sans", sans-serif;
	font-size: 0.8rem;
	line-height: 1.5;
	color: #8a8a8a;
}

.dh-demo-note__badge {
	flex: 0 0 auto;
	padding: 3px 8px;
	border: 1px solid #d6d6d6;
	border-radius: 2px;
	background: var(--dh-bg);
	font-family: "Oswald", sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 10px;
	font-weight: 600;
	color: #8a8a8a;
}

/* Example figures keep the muted treatment so they never read as live data. */
.dh-stage__count--demo,
.dh-balance--demo .dh-balance__value {
	color: #a8a8a8;
}

/* ---------- Example request list ---------- */

.dh-requests {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 14px;
}

.dh-request {
	padding: 20px;
	border: 1px solid var(--dh-line);
	border-radius: 3px;
	background: #fff;
}

.dh-request__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px 16px;
	margin-bottom: 18px;
}

.dh-request__title {
	margin: 0;
	font-family: "Oswald", sans-serif;
	font-weight: 600;
	font-size: 17px;
	line-height: 1.25;
	color: var(--dh-navy);
	text-transform: none;
}

.dh-request__meta {
	margin: 0;
	font-family: "Work Sans", sans-serif;
	font-size: 12.5px;
	color: #8a8a8a;
	white-space: nowrap;
}

/* Horizontal progress track: four steps joined by a connecting rule. */
.dh-track {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}

.dh-track__step {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	text-align: center;
}

/* The rule runs from each step back to the previous one. */
.dh-track__step::before {
	content: "";
	position: absolute;
	top: 6px;
	right: 50%;
	left: -50%;
	height: 2px;
	background: var(--dh-line);
}

.dh-track__step:first-child::before {
	display: none;
}

.dh-track__marker {
	position: relative;
	z-index: 1;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 2px solid var(--dh-line);
	background: #fff;
}

.dh-track__label {
	font-family: "Work Sans", sans-serif;
	font-size: 12px;
	color: #9a9a9a;
}

/* Completed steps: filled navy, with the rule behind them navy too. */
.dh-track__step.is-done .dh-track__marker {
	border-color: var(--dh-navy);
	background: var(--dh-navy);
}

.dh-track__step.is-done::before,
.dh-track__step.is-current::before {
	background: var(--dh-navy);
}

.dh-track__step.is-done .dh-track__label {
	color: var(--dh-navy);
}

/* The stage a request is sitting in — the one place red does the marking. */
.dh-track__step.is-current .dh-track__marker {
	border-color: var(--dh-red);
	background: var(--dh-red);
	box-shadow: 0 0 0 4px rgba(255, 45, 22, 0.16);
}

.dh-track__step.is-current .dh-track__label {
	color: var(--dh-red);
	font-weight: 600;
}

/* ---------- Example credit ledger ---------- */

.dh-ledger {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--dh-line);
}

.dh-ledger__row {
	display: grid;
	grid-template-columns: 90px minmax(0, 1fr) auto;
	align-items: baseline;
	gap: 6px 16px;
	padding: 14px 2px;
	border-bottom: 1px solid var(--dh-line);
}

.dh-ledger__amount {
	font-family: "Oswald", sans-serif;
	font-weight: 600;
	font-size: 14px;
	color: var(--dh-navy);
	white-space: nowrap;
}

/* Credits added read as the positive movement. */
.dh-ledger__amount.is-credit {
	color: #1e5b2c;
}

.dh-ledger__label {
	font-family: "Work Sans", sans-serif;
	font-size: 13.5px;
	color: var(--dh-ink);
}

.dh-ledger__date {
	font-family: "Work Sans", sans-serif;
	font-size: 12.5px;
	color: #8a8a8a;
	white-space: nowrap;
}

/* ---------- Credits balance (placeholder) ---------- */

.dh-balance {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px;
	padding: 34px 24px;
	border: 2px dashed var(--dh-line);
	border-radius: 3px;
	text-align: left;
}

.dh-balance__value {
	font-family: "Oswald", sans-serif;
	font-size: 56px;
	font-weight: 700;
	line-height: 1;
	color: #c4c4c4;
}

.dh-balance__unit {
	font-family: "Oswald", sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 15px;
	font-weight: 600;
	color: var(--dh-red);
}

.dh-balance__hint {
	flex: 1 0 100%;
	margin: 10px 0 0;
	font-family: "Work Sans", sans-serif;
	font-size: 0.85rem;
	color: #999;
}

/* ---------- Account details (placeholder) ---------- */

.dh-details {
	margin: 0;
	border-top: 1px solid var(--dh-line);
}

.dh-details__row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	padding: 14px 2px;
	border-bottom: 1px solid var(--dh-line);
}

.dh-details dt {
	flex: 0 0 140px;
	font-family: "Oswald", sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-size: 12px;
	font-weight: 600;
	color: var(--dh-red);
}

.dh-details dd {
	flex: 1 1 200px;
	margin: 0;
	font-family: "Work Sans", sans-serif;
	color: var(--dh-navy);
	overflow-wrap: anywhere;
}

.dh-panel__note {
	margin: 16px 0 0;
	font-family: "Work Sans", sans-serif;
	font-size: 0.85rem;
	color: #999;
}

/* Explanatory line under a panel title, above its placeholder content. */
.dh-panel__lede {
	margin: 0 0 18px;
	font-family: "Work Sans", sans-serif;
	font-size: 0.9rem;
	color: #6b6b6b;
	max-width: 68ch;
}

.dh-empty__cta {
	margin-top: 18px;
}

/* ---------- Account forms ---------- */

/* The account screens stack several short forms in one column rather than the
   centred card the login page uses. */
.dh-form--inline {
	max-width: 420px;
}

.dh-field__hint {
	display: block;
	margin-top: 5px;
	font-family: "Work Sans", sans-serif;
	font-size: 0.78rem;
	color: #999;
}

/* Destructive zone. Red is the accent that marks it, not a fill: the button only
   takes a red border and text until it is hovered. */
.dh-panel--danger {
	border-color: #f3c4bd;
}

.dh-panel--danger .dh-panel__title {
	color: var(--dh-red);
}

.dh-danger__intro {
	margin: 0 0 18px;
	font-family: "Work Sans", sans-serif;
	font-size: 0.9rem;
	color: var(--dh-ink);
	max-width: 68ch;
}

.dh-btn--danger {
	background: transparent;
	border: 2px solid var(--dh-red);
	color: var(--dh-red);
}

.dh-btn--danger:hover,
.dh-btn--danger:focus-visible {
	background: var(--dh-red);
	color: #fff;
}

.dh-danger__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}


.dh-panel {
	background: #fff;
	border: 1px solid var(--dh-line);
	border-radius: 3px;
	padding: 30px;
}

.dh-panel + .dh-panel {
	margin-top: 24px;
}

.dh-panel__title {
	font-family: "Oswald", sans-serif;
	font-weight: 600;
	font-size: 22px;
	color: var(--dh-navy);
	margin: 0 0 6px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.dh-panel__title + * {
	margin-top: 20px;
}

.dh-empty {
	border: 2px dashed var(--dh-line);
	border-radius: 3px;
	padding: 44px 24px;
	text-align: center;
	color: #6b6b6b;
	font-family: "Work Sans", sans-serif;
}

.dh-empty p {
	margin: 0 0 6px;
}

.dh-empty__hint {
	font-size: 0.85rem;
	color: #999;
}

/* Below the two-column breakpoint the sidebar becomes a horizontal nav strip
   above the content, which is the usual small-screen shape for this layout. */
@media (max-width: 900px) {
	.dh-dashboard__layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}
	.dh-sidebar {
		position: static;
	}
	.dh-sidebar__nav {
		flex-direction: row;
		flex-wrap: wrap;
		padding: 8px 10px 10px;
		gap: 2px;
	}
	.dh-sidebar__link {
		padding: 9px 14px;
		border-left: 0;
		border-bottom: 3px solid transparent;
	}
	.dh-sidebar__link.is-active {
		border-left-color: transparent;
		border-bottom-color: var(--dh-red);
	}
	.dh-sidebar__sep {
		display: none;
	}
	.dh-stages {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	/* The ledger amount column stops earning its keep on a narrow screen. */
	.dh-ledger__row {
		grid-template-columns: minmax(0, 1fr);
		gap: 2px;
	}
	.dh-request__meta {
		white-space: normal;
	}
	.dh-track__label {
		font-size: 11px;
	}
}

@media (max-width: 640px) {
	.dh-main__title {
		font-size: 30px;
	}
	.dh-balance__value {
		font-size: 44px;
	}
	.dh-auth__card {
		padding: 32px 24px;
	}
}
