/*
Theme Name: Usine Catalogue
Template: hello-elementor
Description: Child theme of Hello Elementor for the factory catalogue (design tokens, header, category rail). Keep custom code here so Hello Elementor updates never overwrite it.
Version: 0.2.0
Text Domain: usine-child
*/

/* ------------------------------------------------------------------
   1. Design tokens
   Colour and font names match the Elementor global variables exactly
   (Elementor > Variables). They are declared with :where(:root), which
   has zero specificity, so when Elementor prints its own :root values
   (on Elementor pages) Elementor always wins: a colour changed in the
   Elementor panel is never overridden here. Theme-rendered pages
   (product, category, catalogue) use these values.
   ------------------------------------------------------------------ */
/* T10 (2026-11-24) Green House identity: white + light beige + the logo red, used sparingly.
   The token NAMES are kept (Elementor global variables have the same names); only the values change.
   olive-deep / terracotta-deep = dark brand red (buttons, current states); terracotta = logo red (small accents). */
:where(:root) {
	--color-ivory: #FFFFFF;           /* page background */
	--color-beige: #F5EDE2;           /* light beige sections */
	--color-sand: #DDD1C2;            /* borders, photo frames */
	--color-olive: #C9B9A6;           /* hover borders, dots, soft decor (warm taupe, never text) */
	--color-olive-deep: #B81721;      /* dark red: important links, current states */
	--color-terracotta: #ED1C24;      /* logo red: small accents only */
	--color-terracotta-deep: #B81721; /* dark red: main action buttons (white text) */
	--color-charcoal: #332F2D;        /* titles + main text */
	--color-ink-soft: #5E5752;        /* secondary text */
	--color-surface: #FFFFFF;         /* cards, fields */
	--font-display: Cormorant Garamond;
	--font-body: Inter;
	--font-display-ar: Noto Naskh Arabic;
	--font-body-ar: IBM Plex Sans Arabic;
}

/* Theme-only tokens (no Elementor equivalent; Elementor free has no size variables). */
:root {
	--uc-hover-terracotta: #94141B;   /* red hover */
	--uc-hover-olive: #94141B;
	--uc-red-soft: #FBE9E9;           /* very light red tint (badges, selected rows) */
	--uc-radius-sm: 14px;
	--uc-radius-md: 22px;
	--uc-radius-lg: 28px;
	--uc-radius-xl: 48px;
	--uc-radius-pill: 999px;
	--uc-gutter: 48px;
	--uc-section-y: 88px;
	--uc-max: 1280px;
	--uc-shadow-card: 0 18px 40px rgba(51, 47, 45, 0.10);
	--uc-shadow-panel: 0 24px 60px rgba(51, 47, 45, 0.16);
	--uc-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--uc-dur: 0.6s;
	--uc-stack-display: var(--font-display), "Cormorant Garamond", Georgia, serif;
	--uc-stack-body: var(--font-body), "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (max-width: 1024px) {
	:root { --uc-gutter: 32px; --uc-section-y: 64px; --uc-radius-xl: 36px; }
}
@media (max-width: 767px) {
	:root { --uc-gutter: 16px; --uc-section-y: 48px; --uc-radius-xl: 26px; --uc-radius-lg: 22px; }
}

/* ------------------------------------------------------------------
   2. Arabic: swap the display and body fonts for the whole page,
   Elementor elements included (html[lang] beats Elementor's :root).
   ------------------------------------------------------------------ */
html[lang^="ar"] {
	--font-display: "Noto Naskh Arabic", "Amiri", serif;
	--font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
	--uc-stack-display: "Noto Naskh Arabic", "Amiri", serif;
	--uc-stack-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}
/* Arabic letters must never be spaced apart or upper-cased; Naskh needs taller lines. */
html[lang^="ar"] .elementor :is(h1, h2, h3, h4, h5, h6) {
	letter-spacing: 0;
	line-height: 1.45;
}
html[lang^="ar"] .elementor p { line-height: 1.85; }
html[lang^="ar"] .elementor .eyebrow,
html[lang^="ar"] .elementor .link-arrow {
	letter-spacing: 0;
	text-transform: none;
	font-size: 14px;
}
html[lang^="ar"] .elementor .fact-value { line-height: 1.2; }

/* ------------------------------------------------------------------
   3. Base page
   ------------------------------------------------------------------ */
body {
	background-color: var(--color-ivory);
	color: var(--color-charcoal);
	font-family: var(--uc-stack-body);
	-webkit-font-smoothing: antialiased;
}
::selection { background: var(--color-sand); color: var(--color-charcoal); }
:focus-visible { outline: 3px solid var(--color-olive-deep); outline-offset: 3px; }

/* ------------------------------------------------------------------
   4. Reusable theme classes (same look as the Elementor global classes,
   for parts rendered by the theme / catalogue plugin)
   ------------------------------------------------------------------ */
.uc-display { font-family: var(--uc-stack-display); font-weight: 500; color: var(--color-charcoal); }
.uc-eyebrow {
	font-family: var(--uc-stack-body); font-size: 12px; font-weight: 600; line-height: 1.4;
	text-transform: uppercase; letter-spacing: 0.16em; color: var(--color-olive-deep);
}
html[lang^="ar"] .uc-eyebrow { text-transform: none; letter-spacing: 0; font-size: 14px; }
.uc-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 48px; padding: 14px 30px; border-radius: var(--uc-radius-pill); border: 0;
	font-family: var(--uc-stack-body); font-size: 15px; font-weight: 600; line-height: 1.2;
	text-decoration: none; cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.uc-btn--primary { background: var(--color-terracotta-deep); color: #fff; }
.uc-btn--primary:hover { background: var(--uc-hover-terracotta); color: #fff; transform: translateY(-1px); }
/* T10: the former olive button is now the neutral dark button (charcoal), so not every button is red */
.uc-btn--olive { background: var(--color-charcoal); color: #fff; }
.uc-btn--olive:hover { background: #1F1C1B; color: #fff; transform: translateY(-1px); }
.uc-btn--outline { background: #fff; color: var(--color-charcoal); border: 1.5px solid var(--color-sand); }
.uc-btn--outline:hover { background: var(--color-beige); border-color: var(--color-olive-deep); color: var(--color-olive-deep); }
.uc-card {
	background: var(--color-surface); border: 1px solid var(--color-sand);
	border-radius: var(--uc-radius-lg); overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.uc-card:hover { transform: translateY(-3px); box-shadow: var(--uc-shadow-card); }
.uc-wrap { width: 100%; max-width: var(--uc-max); margin-inline: auto; padding-inline: var(--uc-gutter); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
	.uc-btn:hover, .uc-card:hover { transform: none; }
}
