/*
Theme Name: Frischer Informatique
Theme URI: https://www.frischer.ch/
Author: David Frischer
Description: Site de Frischer Informatique. Tout le site vit dans les fichiers du thème : textes dans lang/, gabarit dans templates/, styles ici.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: frischer-informatique
*/

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */

@font-face {
	font-family: "Bricolage Grotesque";
	font-style: normal;
	font-weight: 200 800;
	font-display: swap;
	src: url("assets/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
}
@font-face {
	font-family: "IBM Plex Sans";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
	font-family: "IBM Plex Sans";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("assets/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
	font-family: "IBM Plex Sans";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("assets/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
	font-family: "IBM Plex Mono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
	font-family: "IBM Plex Mono";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}

/* ---------- Tokens ---------- */

:root {
	--ground: #f2f3ee;
	--tint: #e7e9e1;
	--surface: #ffffff;
	--ink: #12150f;
	--ink-soft: #3a4035;
	--muted: #4e5548;
	--rule: #d5d8ce;
	--rule-soft: #e4e6de;
	--accent: #1e3ed6;
	--on-dark: #f2f3ee;
	--on-dark-soft: #d5d8ce;
	--on-dark-muted: #b4baab;
	--rule-dark: #3a4035;

	--display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
	--body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

	--gutter: clamp(20px, 5vw, 48px);
	--section: clamp(56px, 8vw, 104px);
	--radius: 10px;
}

/* ---------- Base ---------- */

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

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--ground);
	color: var(--ink);
	font-family: var(--body);
	font-size: 17px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
dl,
dd,
ol,
ul {
	margin: 0;
}

ol,
ul {
	padding: 0;
	list-style: none;
}

a {
	color: inherit;
}

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

[id] {
	scroll-margin-top: 24px;
}

.wrap {
	max-width: 1160px;
	margin: 0 auto;
	padding-left: var(--gutter);
	padding-right: var(--gutter);
}

.skip {
	position: absolute;
	left: -9999px;
	top: 8px;
	padding: 12px 16px;
	background: var(--ink);
	color: var(--on-dark);
	border-radius: 6px;
	z-index: 10;
}
.skip:focus {
	left: 8px;
}

.eyebrow {
	font-family: var(--mono);
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

h1,
h2,
h3 {
	font-family: var(--display);
	font-weight: 700;
}

h1 {
	font-size: clamp(38px, 6.2vw, 80px);
	line-height: 1.02;
	letter-spacing: -0.02em;
}

h2 {
	font-size: clamp(30px, 4vw, 48px);
	line-height: 1.08;
	letter-spacing: -0.015em;
}

.accent {
	color: var(--accent);
}

.lead {
	max-width: 620px;
	font-size: clamp(17px, 1.6vw, 20px);
	color: var(--ink-soft);
}

/* ---------- Buttons ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 0 28px;
	border: 1.5px solid transparent;
	border-radius: 6px;
	font-weight: 600;
	text-decoration: none;
	transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.btn:hover {
	transform: translateY(-1px);
}
.btn--primary {
	background: var(--accent);
	color: #ffffff;
}
.btn--ghost {
	border-color: var(--ink);
	color: var(--ink);
}
.btn--ghost:hover {
	background: var(--ink);
	color: var(--ground);
}
.btn--light {
	min-height: 56px;
	background: var(--on-dark);
	color: var(--ink);
}
.btn--outline {
	min-height: 56px;
	border-color: var(--on-dark);
	color: var(--on-dark);
}
.btn--outline:hover {
	background: var(--on-dark);
	color: var(--ink);
}

/* ---------- Header ---------- */

.site-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 32px;
	padding-top: 24px;
	padding-bottom: 24px;
}

.brand {
	padding: 10px 0;
	font-family: var(--display);
	font-weight: 700;
	font-size: 20px;
	text-decoration: none;
}

.nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 28px;
	font-size: 15px;
}
.nav > a {
	padding: 12px 0;
	text-decoration: none;
}
.nav > a:hover {
	text-decoration: underline;
	text-underline-offset: 6px;
}

.lang {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 4px;
	border: 1px solid #c4c8bb;
	border-radius: 999px;
	font-family: var(--mono);
	font-size: 13px;
}
.lang__item {
	padding: 8px 14px;
	border-radius: 999px;
	text-decoration: none;
}
.lang__item.is-current {
	background: var(--ink);
	color: var(--on-dark);
}
a.lang__item:hover {
	background: var(--tint);
}

/* ---------- Hero ---------- */

.hero {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 48px 64px;
	padding-top: clamp(40px, 7vw, 96px);
	padding-bottom: clamp(56px, 8vw, 112px);
}
.hero__main {
	flex: 999 1 520px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 28px;
}
.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.facts {
	flex: 1 1 300px;
	padding: 8px 24px;
	background: var(--surface);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	font-size: 15px;
}
.facts__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	padding: 16px 0;
	border-bottom: 1px solid var(--rule-soft);
}
.facts__row:last-child {
	border-bottom: 0;
}
.facts dt {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
}
.facts dd {
	text-align: right;
	font-weight: 500;
}

/* ---------- Sections ---------- */

.band {
	border-top: 1px solid var(--rule);
}
.band--tint {
	background: var(--tint);
}

.section {
	display: flex;
	flex-direction: column;
	gap: 48px;
	padding-top: var(--section);
	padding-bottom: var(--section);
}
.section__head {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 720px;
}
.section--split {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 40px 64px;
}
.section--split .section__head {
	flex: 1 1 300px;
	min-width: 0;
}

/* ---------- Cards ---------- */

.cards {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}
.card {
	flex: 1 1 300px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 32px;
	background: var(--surface);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
}
.card h3 {
	font-size: 26px;
	line-height: 1.15;
}
.card > p {
	color: var(--ink-soft);
}
.card__num {
	font-family: var(--mono);
	font-size: 14px;
	font-weight: 500;
	color: var(--accent) !important;
}
.card__tag {
	font-family: var(--mono);
	font-size: 13px;
	color: var(--muted) !important;
}
.cards--work {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card--wide {
	grid-column: 1 / -1;
	gap: 16px;
}
.card--wide > p:not(.card__tag) {
	max-width: 760px;
}
.card--small {
	flex: 1 1 260px;
	gap: 16px;
}
.card--small h3 {
	font-size: 22px;
	line-height: 1.2;
}
.card--small > p:not(.card__tag) {
	font-size: 16px;
}

.points {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: auto;
	padding-top: 20px;
	border-top: 1px solid var(--rule-soft);
	font-size: 15px;
}
.points li {
	position: relative;
	padding-left: 18px;
}
.points li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 9px;
	width: 6px;
	height: 6px;
	background: var(--accent);
}

/* ---------- Steps ---------- */

.steps {
	display: flex;
	flex-wrap: wrap;
	gap: 32px 40px;
}
.step {
	flex: 1 1 220px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding-top: 20px;
	border-top: 2px solid var(--ink);
}
.step h3 {
	font-size: 22px;
}
.step p {
	font-size: 16px;
	color: var(--ink-soft);
}
.step .step__num {
	font-family: var(--mono);
	font-size: 13px;
	color: var(--muted);
}

/* ---------- Reasons ---------- */

.reasons {
	flex: 999 1 480px;
	min-width: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 32px 40px;
}
.reason {
	flex: 1 1 220px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.reason h3 {
	font-family: var(--body);
	font-size: 18px;
	font-weight: 600;
}
.reason p {
	font-size: 16px;
	color: var(--ink-soft);
}

/* ---------- Contact and footer ---------- */

.contact {
	background: var(--ink);
	color: var(--on-dark);
}
.contact :focus-visible {
	outline-color: var(--on-dark);
}
.contact__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 40px 64px;
	padding-top: clamp(64px, 9vw, 120px);
	padding-bottom: clamp(64px, 9vw, 120px);
}
.contact__main {
	flex: 999 1 480px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.contact .eyebrow {
	color: var(--on-dark-muted);
}
.contact h2 {
	font-size: clamp(36px, 5.4vw, 68px);
	line-height: 1.03;
	letter-spacing: -0.02em;
}
.contact .lead {
	max-width: 560px;
	font-size: 18px;
	color: var(--on-dark-soft);
}
.contact__actions {
	flex: 1 1 300px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.contact__links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 28px;
	padding-top: 4px;
	font-size: 15px;
}
.contact__links a {
	padding: 6px 0;
	color: var(--on-dark-soft);
	text-underline-offset: 5px;
}
.contact__links a:hover {
	color: var(--on-dark);
}

.site-footer {
	border-top: 1px solid var(--rule-dark);
}
.contact--bare .site-footer {
	border-top: 0;
}
.site-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
}
.site-footer a {
	color: var(--on-dark-soft);
	text-underline-offset: 4px;
}
.site-footer a:hover {
	color: var(--on-dark);
}

/* ---------- Legal pages ---------- */

.legal {
	display: flex;
	flex-direction: column;
	gap: 40px;
	padding-top: clamp(40px, 7vw, 88px);
	padding-bottom: var(--section);
}
.legal > * {
	max-width: 760px;
}
.legal__head {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.legal h1 {
	font-size: clamp(36px, 5vw, 56px);
	line-height: 1.05;
}
.legal__date {
	font-family: var(--mono);
	font-size: 13px;
	color: var(--muted);
}
.legal__section {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding-top: 28px;
	border-top: 1px solid var(--rule);
	color: var(--ink-soft);
}
.legal h2 {
	font-size: 24px;
	line-height: 1.2;
	color: var(--ink);
}
.legal ul {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.legal li {
	position: relative;
	padding-left: 18px;
}
.legal li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 11px;
	width: 6px;
	height: 6px;
	background: var(--accent);
}
.legal strong {
	color: var(--ink);
	font-weight: 600;
}
.legal a {
	color: var(--accent);
	text-underline-offset: 3px;
}
.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	padding-top: 24px;
	padding-bottom: 24px;
	font-family: var(--mono);
	font-size: 13px;
	color: var(--on-dark-muted);
}

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
	.nav {
		gap: 0 20px;
	}
	.lang {
		margin-left: auto;
	}
	.card {
		padding: 24px;
	}
	.actions .btn {
		flex: 1 1 100%;
	}
}

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