/*
Theme Name: Tome 4
Theme URI: https://www.tome4.com
Author: Tome 4
Description: Thème du site Tome 4 — conseil en systèmes d'information et développement logiciel.
Version: 1.0.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.0
Text Domain: tome4
*/

:root {
	--ink: #0a1e2b;
	--ink-soft: #1c3342;
	--muted: #3d5160;
	--orange: #ea5c18;
	--orange-deep: #b4400e;
	--paper: #f4f1ec;
	--white: #ffffff;
	--line: #ddd6cc;
	--serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
	--sans: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	--measure: 68ch;
	--wrap: 1120px;
	--header: 5.25rem;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 1.0625rem;
	line-height: 1.65;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--ink);
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--orange-deep);
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -4rem;
	z-index: 100;
	background: var(--ink);
	color: var(--white);
	padding: 0.6rem 0.9rem;
	text-decoration: none;
}

.skip-link:focus {
	top: 1rem;
}

:focus-visible {
	outline: 3px solid var(--orange);
	outline-offset: 3px;
}

.wrap {
	width: min(var(--wrap), calc(100% - 2.5rem));
	margin-inline: auto;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: rgba(244, 241, 236, 0.94);
	border-bottom: 1px solid var(--line);
	backdrop-filter: blur(10px);
}

.header-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: var(--header);
	gap: 1.5rem;
}

.brand {
	display: flex;
	align-items: center;
	text-decoration: none;
}

.brand img {
	width: 148px;
	height: auto;
}

.nav-toggle {
	display: none;
	border: 1px solid var(--ink);
	background: transparent;
	color: var(--ink);
	font: inherit;
	font-size: 0.95rem;
	padding: 0.55rem 0.85rem;
	min-height: 44px;
	cursor: pointer;
}

.site-nav {
	min-width: 0;
}

.site-nav ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.65rem 1.35rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-nav a {
	text-decoration: none;
	font-size: 0.95rem;
	color: var(--ink-soft);
	white-space: normal;
}

.site-nav a[aria-current="page"] {
	color: var(--ink);
	box-shadow: inset 0 -2px 0 var(--orange);
}

.hero,
.page-hero {
	padding: 5.5rem 0 3.5rem;
}

.intro {
	padding: 2.25rem 0 3rem;
}

.intro-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	align-items: stretch;
	background: #ea5c18;
	border-radius: 18px;
	overflow: hidden;
	min-height: 500px;
}

.intro-card-copy {
	padding: 2.75rem 2.5rem 2.5rem;
	color: var(--white);
	min-width: 0;
}

.intro-card .eyebrow,
.intro-card .lede,
.intro-card h1 {
	color: var(--white);
}

.intro-card .lede {
	max-width: 38rem;
}

.intro-card .button {
	background: var(--white);
	color: var(--ink);
	border-color: var(--white);
}

.intro-card .button:hover {
	background: var(--ink);
	color: var(--white);
	border-color: var(--ink);
}

.intro-card .button.secondary {
	background: transparent;
	color: var(--white);
	border-color: var(--white);
}

.intro-card .button.secondary:hover {
	background: var(--white);
	color: var(--ink);
}

.intro-card :focus-visible {
	outline-color: var(--white);
}

.intro-card-photo {
	position: relative;
	margin: 0;
	min-height: 500px;
	background: #b8430e;
}

.solutions-photo {
	background: #ea5c18;
}

.intro-card-photo img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center center;
}

.intro-card-photo.solutions-photo img {
	top: 40px;
	right: auto;
	bottom: auto;
	left: 0;
	width: calc(100% - 40px);
	height: calc(100% - 80px);
	max-width: none;
	border-radius: 18px;
}

.eyebrow {
	margin: 0 0 1rem;
	color: var(--orange-deep);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

h1,
h2,
h3 {
	font-family: var(--serif);
	font-weight: 500;
	letter-spacing: -0.02em;
	line-height: 1.15;
	margin: 0 0 1rem;
}

h1 {
	font-size: clamp(2.4rem, 5vw, 4.15rem);
	max-width: 16ch;
}

h2 {
	font-size: clamp(1.7rem, 3vw, 2.35rem);
}

h3 {
	font-size: 1.35rem;
}

.lede,
.prose p,
.card p,
.fact p {
	max-width: var(--measure);
}

.lede {
	font-size: 1.2rem;
	line-height: 1.55;
	color: var(--ink-soft);
	margin: 0 0 1rem;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	margin-top: 2rem;
	max-width: 100%;
	min-width: 0;
}

.button,
button.button {
	display: inline-block;
	box-sizing: border-box;
	min-height: 46px;
	min-width: 0;
	max-width: 100%;
	padding: 0.7rem 1.15rem;
	background: var(--ink);
	color: var(--white);
	text-decoration: none;
	border: 1px solid var(--ink);
	font: inherit;
	line-height: 1.35;
	text-align: center;
	white-space: normal;
	overflow-wrap: break-word;
	cursor: pointer;
}

.button:hover {
	background: var(--ink-soft);
	color: var(--white);
}

.button.secondary {
	background: transparent;
	color: var(--ink);
}

.button.secondary:hover {
	background: var(--white);
	color: var(--ink);
}

.band {
	padding: 1rem 0 4.5rem;
}

.band-head {
	margin-bottom: 1.75rem;
}

.band-head p {
	margin: 0;
	color: var(--muted);
	max-width: var(--measure);
}

.split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.25rem;
}

.card,
.panel {
	background: var(--white);
	border: 1px solid var(--line);
	padding: 1.75rem 1.7rem 1.6rem;
}

.card .index {
	display: block;
	margin-bottom: 1.25rem;
	color: var(--orange-deep);
	font-size: 0.82rem;
	letter-spacing: 0.12em;
}

.card h2,
.panel h2,
.card h3 {
	margin-bottom: 0.75rem;
}

.card p:last-child,
.panel p:last-child {
	margin-bottom: 0;
}

.card a.more,
.link-out {
	display: inline-block;
	margin-top: 1.1rem;
	font-weight: 600;
}

.realization {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 10.5rem;
	gap: 1.25rem 1.75rem;
	align-items: start;
}

.realization:has(.product-aside) {
	grid-template-columns: minmax(0, 1fr) 11.25rem;
	align-items: center;
}

.product-aside {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.9rem;
	width: 100%;
	min-width: 0;
}

.product-logo {
	margin: 0.2rem 0 0;
	width: 100%;
}

.product-logo img,
.product-phone {
	width: 100%;
	height: auto;
	display: block;
}

.product-phone {
	max-width: 11.25rem;
}

.stack {
	display: grid;
	gap: 1.25rem;
}

.prose h2 {
	margin-top: 2.6rem;
}

.legal section + section {
	margin-top: 0.5rem;
}

.prose ul,
.panel ul {
	margin: 0.4rem 0 0;
	padding-left: 1.15rem;
	max-width: var(--measure);
}

.prose li + li,
.panel li + li {
	margin-top: 0.35rem;
}

.note {
	margin-top: 1.25rem;
	color: var(--muted);
	max-width: var(--measure);
}

.domain {
	font-variant-numeric: tabular-nums;
}

.legal address {
	font-style: normal;
	margin-bottom: 0.5rem;
}

.facts {
	display: grid;
	gap: 0.85rem;
	margin: 0;
}

.facts div {
	display: grid;
	grid-template-columns: minmax(12rem, 16rem) 1fr;
	gap: 0.5rem 1rem;
	padding-top: 0.85rem;
	border-top: 1px solid var(--line);
}

.facts dt {
	color: var(--muted);
}

.facts dd {
	margin: 0;
}

.contact-grid {
	display: grid;
	grid-template-columns: 1fr 1.2fr;
	gap: 1.25rem;
	align-items: start;
}

form {
	display: grid;
	gap: 0.95rem;
}

label {
	display: grid;
	gap: 0.35rem;
	font-size: 0.95rem;
}

input,
textarea {
	width: 100%;
	border: 1px solid #c9c1b6;
	background: var(--white);
	color: var(--ink);
	font: inherit;
	padding: 0.7rem 0.75rem;
	min-height: 46px;
}

textarea {
	min-height: 9rem;
	resize: vertical;
}

.form-note,
.form-status {
	margin: 0;
	max-width: var(--measure);
}

.form-status {
	padding: 0.85rem 1rem;
	background: var(--white);
	border: 1px solid var(--line);
}

.form-status.is-error {
	border-color: var(--orange);
}

.hp {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.site-footer {
	border-top: 1px solid var(--line);
	background: var(--white);
	padding: 2.5rem 0 2rem;
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.2fr 1.4fr 1fr;
	gap: 2rem;
}

.site-footer p,
.site-footer address {
	margin: 0.35rem 0;
	color: var(--muted);
	font-style: normal;
	font-size: 0.95rem;
}

.footer-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.35rem;
}

.footer-nav a {
	text-decoration: none;
	white-space: normal;
}

.site-footer .brand img {
	width: 132px;
	margin-bottom: 0.8rem;
}

@media (max-width: 800px) {
	.intro-card {
		grid-template-columns: 1fr;
		min-height: 0;
	}

	.intro-card-copy {
		padding: 1.75rem 1.35rem 1.5rem;
	}

	.intro-card-photo {
		width: 100%;
		min-height: 0;
		height: auto;
		aspect-ratio: 4 / 5;
	}

	.intro-card-photo.solutions-photo img {
		top: 40px;
		right: auto;
		left: 40px;
		width: calc(100% - 80px);
		height: calc(100% - 80px);
	}

	.intro-card .actions {
		margin-top: 1.5rem;
	}
}

@media (max-width: 860px) {
	.split,
	.contact-grid,
	.footer-grid,
	.facts div,
	.realization {
		grid-template-columns: 1fr;
	}

	.product-logo,
	.product-aside {
		width: min(11.25rem, 72%);
		margin-top: 0.35rem;
		margin-inline: auto;
	}

	.nav-toggle {
		display: inline-flex;
	}

	.site-nav {
		display: none;
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		background: var(--paper);
		border-bottom: 1px solid var(--line);
		padding: 0.5rem 1.25rem 1rem;
	}

	.site-nav.is-open {
		display: block;
	}

	.site-nav ul {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.15rem;
	}

	.site-nav a {
		display: flex;
		align-items: center;
		max-width: 100%;
		min-height: 44px;
		white-space: normal;
	}

	.hero,
	.page-hero {
		padding: 3.2rem 0 2rem;
	}

	.wrap {
		width: min(var(--wrap), calc(100% - 1.5rem));
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
