/*
Theme Name: xterra-one
Text Domain: xterra-one
Description: Thème autonome Xterra-One — POWER • AUTONOMIE • ADVENTURE
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
WPVibe: yes
*/

/* This file holds the WordPress theme header (above) plus truly global
 * rules only. Tailwind handles everything else.
 *
 * - Design tokens live in theme.css's @theme block.
 * - Prose + form styles live in presets.css.
 * - Layout, color, typography utilities come from Tailwind v4.
 *
 * Do NOT add component classes here (.btn-primary, .card, etc.). Use
 * Tailwind utilities in templates instead.
 */

html {
	scroll-behavior: smooth;
}

/* Resources: keep the four primary reference cards readable on their dark card background. */
.x-resource-top-cards .x-card h2 {
	color: #fff !important;
}

.x-resource-top-cards .x-card > p:not(.x-eyebrow) {
	color: #c1cbc6 !important;
}

/* Resources page contrast rules. */
.x-resources-page .x-resource-dark,
.x-resources-page .x-resource-dark .x-card {
	color: #c1cbc6 !important;
}

.x-resources-page .x-resource-dark h1,
.x-resources-page .x-resource-dark h2,
.x-resources-page .x-resource-dark h3,
.x-resources-page .x-resource-dark strong {
	color: #fff !important;
}

.x-resources-page .x-resource-dark p:not(.x-eyebrow) {
	color: #c1cbc6 !important;
}

.x-resources-page .x-resource-light-card {
	background: #f8faf6 !important;
	border-color: #dce7d8 !important;
	color: #07100d !important;
}

.x-resources-page .x-resource-light-card h2,
.x-resources-page .x-resource-light-card h3,
.x-resources-page .x-resource-light-card strong {
	color: #07100d !important;
}

.x-resources-page .x-resource-light-card p:not(.x-eyebrow) {
	color: #5b6861 !important;
}

/* Compliance cards are intentionally dark: keep every readable label light. */
.x-resources-page .x-resource-compliance-card {
	background: #13211c !important;
	border-color: rgba(121, 214, 75, .22) !important;
	color: #c1cbc6 !important;
}

.x-resources-page .x-resource-compliance-card h3,
.x-resources-page .x-resource-compliance-card strong {
	color: #fff !important;
}

.x-resources-page .x-resource-compliance-card p:not(.x-eyebrow) {
	color: #c1cbc6 !important;
}

/* Tech Watch iframe: desktop stays compact; mobile gets enough height for long messages. */
@media (max-width: 760px) {
	iframe[title="Xterra Tech Watch"] {
		height: 260px !important;
	}
}

/*
 * Xterra compact desktop density.
 * Goal: reproduce the calmer ~75–80% browser-zoom feel at normal zoom,
 * without shrinking the full-width visual shells or the Tech Watch iframe.
 */
@media (min-width: 901px) {
	html {
		font-size: 13px;
	}

	.x-wrap {
		width: min(1600px, calc(100% - 56px)) !important;
	}

	.x-header-inner,
	.x-main-nav {
		height: 62px !important;
		min-height: 62px !important;
	}

	.x-logo-svg {
		width: 34px !important;
		height: 29px !important;
		flex-basis: 34px !important;
	}

	.x-home-universe-card {
		min-height: 300px !important;
	}

	.x-home-universe-card img {
		height: 215px !important;
	}

	.x-product-card {
		min-height: 300px !important;
	}

	.x-product-image-wrap {
		height: 185px !important;
		padding: 18px !important;
	}

	.x-product-card-body {
		padding: 17px 19px 19px !important;
	}

	.x-step-card {
		min-height: 170px !important;
		padding: 21px !important;
	}

	.x-power-solutions .x-card {
		min-height: 260px !important;
		padding: 1.35rem !important;
	}

	.x-category-hero {
		padding-top: 24px !important;
		padding-bottom: 26px !important;
	}

	.x-category-hero-grid {
		grid-template-columns: minmax(0, .78fr) minmax(420px, 1.22fr) !important;
		gap: clamp(28px, 4vw, 60px) !important;
	}

	.x-category-hero-copy h1 {
		font-size: clamp(2.3rem, 2.65vw, 3.2rem) !important;
		line-height: .96 !important;
		letter-spacing: -.035em !important;
	}

	.x-category-hero-copy .x-category-tagline {
		margin-top: 10px !important;
		font-size: clamp(.95rem, 1.15vw, 1.08rem) !important;
	}

	.x-category-hero-copy .x-category-desc {
		margin-top: 14px !important;
		max-width: 560px !important;
		font-size: .98rem !important;
		line-height: 1.55 !important;
	}

	.x-category-hero-media,
	.x-category-hero-media img {
		min-height: 205px !important;
	}

	.x-category-hero-media {
		border-radius: 22px !important;
	}

	.x-category-hero-media.is-product img {
		max-height: 195px !important;
	}

	.x-calculator-hero {
		padding-top: 34px !important;
		padding-bottom: 27px !important;
	}

	.x-calculator-stage {
		padding-top: 40px !important;
		padding-bottom: 68px !important;
	}

	.x-calculator-scope .header {
		padding: 26px 28px 23px !important;
	}

	.x-calculator-scope .content {
		padding: 29px !important;
	}

	.x-calculator-scope .profile-card {
		padding: 22px 19px !important;
	}

	.x-mega-inner {
		padding-top: 18px !important;
		padding-bottom: 20px !important;
	}

	.x-mega-links a {
		min-height: 70px !important;
		padding: 11px 12px !important;
	}
}

.x-battery-hero {
	overflow: hidden;
	border-bottom: 1px solid rgba(7,16,13,.07);
	background: linear-gradient(90deg,#fbfcf8 0%,#f7f9f4 44%,#eef4ec 100%);
}

.x-battery-hero-grid {
	display: grid;
	grid-template-columns: minmax(500px,44%) minmax(0,56%);
	min-height: 430px;
}

.x-battery-hero-copy {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 36px 42px 36px max(32px,calc((100vw - 1600px)/2));
}

.x-battery-hero-copy h1 {
	margin: 10px 0 0;
	color: #07100d;
	font-size: clamp(38px,3vw,46px);
	font-weight: 900;
	line-height: .96;
	letter-spacing: -.035em;
}

.x-battery-tagline {
	margin: 12px 0 0;
	color: #4f9d2b;
	font-size: clamp(18px,1.45vw,22px);
	font-weight: 900;
	line-height: 1.2;
}

.x-battery-desc {
	max-width: 620px;
	margin: 20px 0 0;
	color: #56655d;
	font-size: 15px;
	line-height: 1.6;
}

.x-battery-benefits {
	display: grid;
	grid-template-columns: repeat(4,minmax(0,1fr));
	gap: 12px;
	max-width: 680px;
	margin-top: 24px;
}

.x-battery-benefits span {
	display: flex;
	align-items: flex-start;
	gap: 7px;
	color: #445149;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.35;
}

.x-battery-benefits span::first-letter {
	color: #4f9d2b;
}

.x-battery-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 24px;
}

.x-battery-actions .x-btn {
	padding: .78rem 1.2rem;
	font-size: .9rem;
}

.x-battery-hero-visual {
	min-height: 430px;
	background-image: url('/wp-content/uploads/2026/09/batterie-lithium.png?v=214');
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
}

@media (max-width: 1100px) {
	.x-battery-hero-grid {
		grid-template-columns: minmax(420px,48%) minmax(0,52%);
	}
	.x-battery-benefits {
		grid-template-columns: repeat(2,minmax(0,1fr));
	}
}

@media (max-width: 760px) {
	.x-battery-hero-grid {
		grid-template-columns: 1fr;
	}
	.x-battery-hero-copy {
		padding: 28px 20px 24px;
	}
	.x-battery-hero-copy h1 {
		font-size: clamp(34px,10vw,42px);
	}
	.x-battery-tagline {
		font-size: 18px;
	}
	.x-battery-desc {
		font-size: 14px;
		margin-top: 14px;
	}
	.x-battery-benefits {
		grid-template-columns: repeat(2,minmax(0,1fr));
		margin-top: 18px;
	}
	.x-battery-actions {
		margin-top: 20px;
	}
	.x-battery-hero-visual {
		min-height: 220px;
		background-size: cover;
		background-position: center;
	}
}
