/*
Theme Name:   GlobalReach Light
Description:  Lighter child theme for Global Reach Solutions CI. Page content is edited in the block editor; layout comes from the patterns in /patterns.
Template:     globalreach-theme
Version:      1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain:  globalreach-light
License:      GNU General Public License v2 or later
*/

/* =============================================================================
   1 — TOKENS
============================================================================= */

:root {
	--navy:      #07070E;
	--navy-2:    #12142a;
	--gold:      #C9A84C;
	--gold-ink:  #7a5d12;
	--paper:     #ffffff;
	--mist:      #f4f3ef;
	--ink:       #12131c;
	--ink-2:     #4c4f60;
	--line:      #e2e0d8;
	--font:      "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--wrap:      1040px;
	--gutter-l:  max(16px, env(safe-area-inset-left, 0px));
	--gutter-r:  max(16px, env(safe-area-inset-right, 0px));
}

/* =============================================================================
   2 — BASE
============================================================================= */

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--gold-ink); }

h1, h2, h3 { line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(32px, 6vw, 54px); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; margin: 0 0 24px; }
h3 { font-size: 19px; font-weight: 800; margin: 0 0 8px; }

.wrap {
	max-width: var(--wrap);
	margin-inline: auto;
	padding-left: var(--gutter-l);
	padding-right: var(--gutter-r);
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 8px;
	z-index: 100;
	background: var(--gold);
	color: var(--navy);
	padding: 8px 14px;
	border-radius: 6px;
	font-weight: 600;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* =============================================================================
   3 — HEADER
============================================================================= */

.site-header {
	background: var(--navy);
	color: #fff;
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.header-inner {
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: 64px;
	position: relative;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #fff;
	text-decoration: none;
	margin-right: auto;
}
.brand img { width: 40px; height: 40px; }
.brand b { display: block; font-weight: 800; font-size: 16px; letter-spacing: .06em; line-height: 1.1; }
.brand small { display: block; color: var(--gold); font-size: 10px; font-weight: 600; letter-spacing: .16em; }

.main-nav .nav-menu { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
	display: block;
	color: #d9d8e2;
	text-decoration: none;
	font-size: 15px;
	font-weight: 600;
	padding: 8px 12px;
	border-radius: 6px;
}
.main-nav a:hover { color: #fff; background: var(--navy-2); }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a { color: var(--gold); }

.menu-btn {
	display: none;
	background: none;
	border: 0;
	color: var(--gold);
	font: 600 15px var(--font);
	padding: 10px 4px;
	cursor: pointer;
}

@media (max-width: 760px) {
	.menu-btn { display: block; }
	.header-inner .header-cta { display: none; }
	.main-nav {
		display: none;
		position: absolute;
		left: calc(-1 * var(--gutter-l));
		right: calc(-1 * var(--gutter-r));
		top: 100%;
		background: var(--navy);
		border-top: 1px solid var(--navy-2);
		padding: 8px var(--gutter-r) 16px var(--gutter-l);
	}
	.main-nav.is-open { display: block; }
	.main-nav .nav-menu { flex-direction: column; }
	.main-nav a { font-size: 18px; padding: 12px 4px; }
}

/* =============================================================================
   4 — BUTTONS (theme links + core/button styles "Or" and "Contour")
============================================================================= */

.btn,
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 20px;
	border-radius: 6px;
	border: 1.5px solid transparent;
	font: 600 15px var(--font);
	text-decoration: none;
	background: var(--navy);
	color: #fff;
}
.btn-gold,
.wp-block-button.is-style-gold .wp-block-button__link { background: var(--gold); color: var(--navy); }
.wp-block-button.is-style-line .wp-block-button__link { background: transparent; border-color: rgba(255, 255, 255, .35); color: #fff; }
.header-cta { min-height: 40px; }
.wp-block-buttons { gap: 12px; }

/* =============================================================================
   5 — CONTENT SECTIONS (Group blocks with these classes)
============================================================================= */

.site-main > .entry-content:not(.prose) > * { margin-block: 0; }

.gr-hero,
.gr-band {
	padding-left: var(--gutter-l);
	padding-right: var(--gutter-r);
}
.gr-hero > *,
.gr-band > * {
	max-width: var(--wrap);
	margin-inline: auto;
}

.gr-hero { background: var(--navy); color: #fff; padding-block: 64px 72px; }
.gr-hero h1 { margin-top: 0; margin-bottom: 16px; max-width: 18ch; color: #fff; }
.gr-hero h1 strong { color: var(--gold); font-weight: inherit; }
.gr-hero p { color: #c9c8d4; font-size: 19px; margin-top: 0; margin-bottom: 28px; max-width: 46ch; }

.gr-band { padding-block: 56px; }
.gr-band.is-mist { background: var(--mist); }
.gr-band h2 { margin-top: 0; }

.gr-lead { font-size: 19px; color: var(--ink-2); max-width: 60ch; }

/* Cards: each Column with .gr-card */
.gr-cards { gap: 16px; margin-block: 0 16px; }
.gr-card {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 22px;
}
.gr-card.is-division { border-top: 4px solid var(--gold); }
.gr-card p { margin: 0 0 8px; color: var(--ink-2); }
.gr-card p:last-child { margin-bottom: 0; }
.gr-card a { font-weight: 600; text-decoration: none; }
.gr-card a:hover { text-decoration: underline; }

/* Sector tags: a List block with .gr-tags */
.gr-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 24px; }
.gr-tags li { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 6px 14px; font-size: 15px; }

/* Contact band */
.gr-cta > .wp-block-group__inner-container,
.gr-cta {
	background: var(--navy);
	color: #fff;
	border-radius: 10px;
}
.gr-cta { padding: 32px; }
.gr-cta h2 { color: #fff; margin: 0 0 6px; }
.gr-cta p { color: #c9c8d4; margin: 0 0 20px; }

/* Contact details */
.gr-coords p { margin: 0 0 4px; font-variant-numeric: tabular-nums; }

/* WPForms inside the contact pattern: theme colours, full-width fields */
.gr-form .wpforms-container {
	--wpforms-button-background-color: #07070E;
	--wpforms-button-text-color: #ffffff;
	--wpforms-button-border-radius: 6px;
	--wpforms-field-border-radius: 6px;
	margin-top: 0;
}
.gr-form .wpforms-field input:not([type="checkbox"]):not([type="radio"]),
.gr-form .wpforms-field select,
.gr-form .wpforms-field textarea {
	width: 100%;
	max-width: 100%;
}
.gr-form button[type="submit"].wpforms-submit {
	background-color: var(--navy);
	color: #fff;
	font: 600 15px var(--font);
	min-height: 46px;
	padding: 0 20px;
	border-radius: 6px;
}

/* Default page template (legal pages) */
.page-title { background: var(--navy); color: #fff; padding-block: 48px; }
.page-title h1 { margin: 0; font-size: clamp(28px, 4.5vw, 40px); }
.prose { padding-block: 40px 64px; }
.prose > * { max-width: 72ch; }
.prose h2 { font-size: 22px; margin: 36px 0 10px; }
.prose h3 { font-size: 18px; margin: 24px 0 8px; }
.prose h4 { font-size: 16px; margin: 18px 0 6px; }
.prose p,
.prose ul,
.prose ol { margin: 0 0 14px; }

@media (max-width: 760px) {
	.gr-hero { padding-block: 44px 52px; }
	.gr-band { padding-block: 40px; }
	.gr-cta { padding: 24px; }
}

/* =============================================================================
   6 — FOOTER
============================================================================= */

.site-footer { background: var(--navy); color: #a9a8b8; font-size: 14.5px; }
.footer-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 28px;
	justify-content: space-between;
	padding-block: 28px;
}
.site-footer a { color: #d9d8e2; }
.legal-menu { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; }

@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* =============================================================================
   7 — GÉNIE CIVIL — template « Page d'atterrissage — Génie civil (BTP) »
   Same navy-and-gold look as the rest of the site, so moving between the two
   activities feels seamless. Two GRSCI Brand Book touches only: the GRSCI symbol
   in the header, and green (Vert Bâtisseur #20893D, text #17692F) in « Nos services ».
============================================================================= */

.gr-eyebrow {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--gold);
	margin: 0 0 14px;
}

/* Header: GRSCI symbol on a white plate (brand book: white plate on dark backgrounds) */
.brand-btp .brand-plate {
	display: flex;
	align-items: center;
	background: #fff;
	border-radius: 4px;
	padding: 4px 6px;
}
.brand-btp .brand-plate img { width: 80px; height: 36px; }

/* « Nos services »: the green part of the page */
.brand-btp #services {
	background: #F7F9F6;
	border-top: 4px solid #20893D;
}
.brand-btp #services h2 { color: #17692F; }
.brand-btp #services .gr-card { border-top: 4px solid #20893D; }
.brand-btp #services .gr-card h3 { color: #17692F; }

/* Homepage activity card for Génie civil: green accent */
.gr-card.is-division.is-btp { border-top-color: #20893D; }
.gr-card.is-btp a { color: #17692F; }
.gr-hero p.gr-eyebrow { color: var(--gold); font-size: 12px; margin-bottom: 14px; }


/* =============================================================================
   8 — HEADER LOCKUP: same size on every page
   « GLOBAL REACH SOLUTIONS » with the subtitle spread to the same width
   (one span per character, flex space-between). Marks are 40px high.
============================================================================= */

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.brand .wordmark {
	display: inline-flex;
	flex-direction: column;
	gap: 4px;
}
.brand .wordmark b {
	font-size: 16px;
	letter-spacing: .06em;
	line-height: 1.1;
	white-space: nowrap;
}
.brand .wordmark small {
	display: block;
	letter-spacing: 0;
}
.brand .wordmark .spread {
	display: flex;
	justify-content: space-between;
	font-size: 10px;
	font-weight: 600;
	line-height: 1;
	color: var(--gold);
}
.brand-btp .brand-plate { height: 40px; padding: 4px; box-sizing: border-box; }
.brand-btp .brand-plate img { width: 72px; height: 32px; }

@media (max-width: 480px) {
	.brand .wordmark b { font-size: 13px; }
	.brand .wordmark .spread { font-size: 8px; }
	.brand-btp .brand-plate { height: 34px; }
	.brand-btp .brand-plate img { width: 58px; height: 26px; }
	.brand img[width="40"] { width: 34px; height: 34px; }
}

/* WhatsApp link in the footer */
.footer-whatsapp { white-space: nowrap; }

/* =============================================================================
   9 — NOUVELLES TECHNOLOGIES: same section logic as Génie civil, in gold
   Génie civil « Nos services » = green; Nouvelles technologies = gold.
   Gold on white is too light for text, so titles use the dark gold (--gold-ink).
============================================================================= */

.brand-it #services {
	background: #FBF8EF;
	border-top: 4px solid var(--gold);
}
.brand-it #services h2 { color: var(--gold-ink); }
.brand-it #services .gr-card { border-top: 4px solid var(--gold); }
.brand-it #services .gr-card h3 { color: var(--gold-ink); }
.brand-it #services .gr-card a { color: var(--gold-ink); }
.brand-it .gr-tags li { border-color: var(--gold); background: #FBF8EF; }

/* Footer: copyright on its own line, then WhatsApp and legal links */
.footer-inner > span:first-child { flex-basis: 100%; }
.gr-coords h2 { font-size: 22px; margin-bottom: 12px; }

/* =============================================================================
   10 — ONE CONTACT ENTRY: the « Nous contacter » menu item (CSS class menu-cta,
   set in Appearance → Menus) is drawn as the gold button on desktop, and as a
   normal link inside the mobile menu. No separate header button.
============================================================================= */

@media (min-width: 761px) {
	.main-nav .nav-menu > li.menu-cta { margin-left: 12px; }
	.main-nav .nav-menu > li.menu-cta > a {
		background: var(--gold);
		color: var(--navy);
		border-radius: 6px;
		padding: 10px 18px;
	}
	.main-nav .nav-menu > li.menu-cta > a:hover { background: #d8b95c; color: var(--navy); }
	.main-nav .nav-menu > li.menu-cta.current-menu-item > a { box-shadow: inset 0 -3px 0 var(--navy); }
}

/* Mobile menu: full width of the header, text aligned with the page gutter, no overflow */
@media (max-width: 760px) {
	.header-inner { position: static; }
	.main-nav {
		left: 0;
		right: 0;
		padding: 8px var(--gutter-r) 20px var(--gutter-l);
	}
}
