/* =========================================================================
   Thomas Douart – Atlas
   Minimal suisse, version visuelle : fond gris-vert très clair, vert forêt
   pour les actions, Schibsted Grotesk pour les titres, Public Sans (la
   police de l'administration américaine, conçue pour les services publics)
   pour le texte.
   ====================================================================== */

@font-face {
	font-family: "Schibsted Grotesk";
	src: url("../fonts/schibsted-grotesk.woff2") format("woff2");
	font-weight: 400 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Public Sans";
	src: url("../fonts/public-sans.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

:root {
	--paper: #f3f5f2;
	--surface: #ffffff;
	--ink: #10221a;
	--muted: #4f5e56;
	--line: #d3dcd5;
	--green: #0b5d3b;
	--green-deep: #08452c;
	--tint: #dceadf;

	--display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
	--text: "Public Sans", "Helvetica Neue", Arial, sans-serif;
	--gutter: clamp(16px, 3vw, 40px);
	--max: 1320px;
	--r-card: 10px;
	--r-media: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--text);
	font-size: 1.0625rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--green-deep); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; }
.skip:focus { left: 8px; top: 8px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* ---------- Boutons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 12px 22px;
	border-radius: 999px; border: 2px solid var(--green);
	background: var(--green); color: #fff;
	font-family: var(--display); font-weight: 600; font-size: 1rem; line-height: 1.1;
	text-decoration: none; white-space: nowrap;
	transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--small { min-height: 40px; padding: 8px 16px; font-size: 0.94rem; }
.btn--light { background: #fff; color: var(--green-deep); border-color: #fff; }
.btn--light:hover { background: var(--tint); border-color: var(--tint); color: var(--green-deep); }
.btn--line { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn--line:hover { background: #fff; color: var(--green-deep); border-color: #fff; }

/* ---------- En-tête ---------- */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(243,245,242,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-head__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 1.08rem; }
.brand:hover { color: var(--ink); }
.brand__mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--green); color: #fff; font-size: 0.82rem; letter-spacing: 0.02em; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a:hover, .site-nav .current-menu-item > a { background: var(--tint); color: var(--green-deep); }

/* ---------- Accroche + planche d'images ---------- */
.hero {
	display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px);
	align-items: center;
	padding-top: clamp(40px, 7vw, 104px); padding-bottom: clamp(56px, 8vw, 120px);
}
.hero__role { margin: 0 0 20px; color: var(--muted); font-weight: 500; }
.hero__title {
	margin: 0; max-width: 17ch;
	font-size: clamp(2.4rem, 5.2vw, 4.6rem); line-height: 1.02; font-weight: 700; letter-spacing: -0.03em;
	text-wrap: balance;
}
.hero__intro { margin: 28px 0 0; max-width: 50ch; font-size: 1.2rem; line-height: 1.55; color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 36px 0 0; }

.plates { list-style: none; margin: 0; padding: 0 0 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.plate:nth-child(even) { transform: translateY(56px); }
.plate a { display: block; position: relative; text-decoration: none; color: var(--ink); }
.plate img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-media); background: var(--tint); }
.plate__cap {
	display: block; margin-top: 8px;
	font-size: 0.84rem; line-height: 1.3; color: var(--muted);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.plate a:hover .plate__cap { color: var(--green-deep); text-decoration: underline; }

/* ---------- Blocs ---------- */
.block { padding-top: clamp(56px, 8vw, 112px); padding-bottom: clamp(24px, 4vw, 48px); }
.block--projects { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-bottom: clamp(56px, 8vw, 112px); }
.block__head { margin-bottom: clamp(28px, 4vw, 48px); }
.block__back { margin: 0 0 12px; }
.block__title { margin: 0; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.05; font-weight: 700; letter-spacing: -0.025em; }
.block__lead { margin: 12px 0 0; max-width: 60ch; color: var(--muted); }

/* ---------- Filtres ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.filter {
	display: inline-flex; align-items: center; gap: 8px;
	min-height: 40px; padding: 6px 14px 6px 16px;
	border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
	color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.95rem;
	transition: background-color .15s, border-color .15s;
}
.filter:hover { border-color: var(--green); color: var(--green-deep); }
.filter__n { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--paper); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.filter.is-active { background: var(--green); border-color: var(--green); color: #fff; }
.filter.is-active .filter__n { background: rgba(255,255,255,.2); color: #fff; }
.filters__status { margin: 14px 0 0; color: var(--muted); font-size: 0.95rem; }
.filters__status:empty { display: none; }

/* ---------- Cartes projets ---------- */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.block--projects .card { background: var(--paper); border-color: transparent; }
.card[hidden] { display: none; }
.card__media { display: block; aspect-ratio: 16 / 10; background: var(--tint); overflow: hidden; }
.card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.card__themes { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.tag { padding: 2px 10px; border-radius: 999px; background: var(--tint); color: var(--green-deep); font-size: 0.8rem; font-weight: 600; }
.card__title { margin: 0; font-size: 1.32rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--green-deep); text-decoration: underline; text-decoration-thickness: 2px; }
.card__excerpt { margin: 10px 0 0; color: var(--muted); font-size: 0.97rem; line-height: 1.55; }
.card__fiche { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.88rem; }
.card__fiche div { display: grid; grid-template-columns: 82px 1fr; gap: 12px; padding: 3px 0; }
.card__fiche dt { color: var(--muted); }
.card__fiche dd { margin: 0; color: var(--ink); }
.card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: auto 0 0; padding-top: 20px; }
.card__more { font-weight: 600; font-size: 0.95rem; }
.empty { color: var(--muted); }

/* ---------- Parcours ---------- */
.parcours { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 96px); }
.parcours__lead { align-self: start; position: sticky; top: 100px; }
.parcours__photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-card); }
.parcours__monogram {
	display: grid; place-items: center; aspect-ratio: 4 / 5; border-radius: var(--r-card);
	background: var(--green); color: var(--tint);
	font-family: var(--display); font-weight: 700; font-size: clamp(4rem, 10vw, 9rem); letter-spacing: -0.04em;
}
.parcours__employers { margin: 20px 0 0; color: var(--muted); font-size: 0.95rem; }
.parcours__employers strong { display: block; color: var(--ink); font-family: var(--display); }
.parcours__title { margin: 20px 0 0; font-family: var(--display); font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; max-width: 30ch; text-wrap: balance; }
.parcours__text { margin: 20px 0 0; max-width: 64ch; font-size: 1.1rem; }
.parcours__h { margin: 48px 0 16px; font-size: 1.15rem; font-weight: 700; }
.expertise { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.expertise__item { padding: 20px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); }
.expertise dt { font-family: var(--display); font-weight: 700; line-height: 1.3; }
.expertise dd { margin: 8px 0 0; color: var(--muted); font-size: 0.96rem; }
.formation { list-style: none; margin: 0; padding: 0 0 0 20px; border-left: 2px solid var(--tint); }
.formation li { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 2px 16px; padding: 10px 0 14px; }
.formation li::before { content: ""; position: absolute; left: -27px; top: 17px; width: 12px; height: 12px; border-radius: 50%; background: var(--green); border: 3px solid var(--paper); }
.formation__year { grid-row: span 2; font-family: var(--display); font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; }
.formation__deg { font-weight: 600; }
.formation__school { color: var(--muted); font-size: 0.95rem; }

/* ---------- Contact ---------- */
.contact { margin-top: clamp(56px, 8vw, 112px); background: var(--green); color: #fff; }
.contact__in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px var(--gutter); align-items: end; padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(56px, 8vw, 104px); }
.contact__title { margin: 0; color: #fff; font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1; font-weight: 700; letter-spacing: -0.03em; }
.contact__text { margin: 18px 0 0; max-width: 46ch; font-size: 1.2rem; color: var(--tint); }
.contact__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* ---------- Pied ---------- */
.site-foot { background: var(--green-deep); color: var(--tint); padding: 24px 0 32px; font-size: 0.9rem; }
.site-foot a { color: #fff; }
.site-foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }
.site-foot p { margin: 0; }
.site-foot__links { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }

/* ---------- Page projet ---------- */
.project { padding-top: clamp(32px, 5vw, 72px); }
.project__crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; font-size: 0.9rem; }
.project__crumbs a { padding: 2px 10px; border-radius: 999px; background: var(--tint); color: var(--green-deep); text-decoration: none; font-weight: 600; }
.project__crumbs a:first-child { background: transparent; padding-left: 0; color: var(--muted); }
.project__crumbs a:hover { text-decoration: underline; }
.project__title { margin: 0; max-width: 24ch; font-size: clamp(2.1rem, 4.6vw, 4rem); line-height: 1.04; font-weight: 700; letter-spacing: -0.03em; text-wrap: balance; }
.project__grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 32px clamp(32px, 5vw, 72px); margin-top: clamp(28px, 4vw, 48px); }
.project__body { grid-column: 1; grid-row: 1; min-width: 0; }
.fiche {
	grid-column: 2; grid-row: 1; align-self: start; position: sticky; top: 100px;
	padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
}
.fiche .btn { width: 100%; }
.fiche dl { margin: 8px 0 0; }
.fiche dt { margin-top: 16px; font-size: 0.85rem; color: var(--muted); }
.fiche dd { margin: 2px 0 0; font-weight: 500; }
.project__media { margin: 0 0 36px; }
.project__media img { display: block; width: 100%; height: auto; border-radius: var(--r-card); }
.project__again { margin-top: 36px; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: clamp(48px, 7vw, 96px); }
.pager a { display: block; padding: 20px 22px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.1rem; line-height: 1.25; }
.pager a:hover { border-color: var(--green); }
.pager span { display: block; margin-bottom: 6px; font-family: var(--text); font-weight: 400; font-size: 0.85rem; color: var(--muted); }
.pager__next { grid-column: 2; text-align: right; }

/* ---------- Pages simples ---------- */
.page-plain { padding-top: clamp(32px, 5vw, 72px); }
.page-plain__title { margin: 0 0 clamp(24px, 4vw, 48px); max-width: 22ch; font-size: clamp(2.1rem, 4.6vw, 4rem); line-height: 1.04; font-weight: 700; letter-spacing: -0.03em; text-wrap: balance; }
.page-plain .prose { max-width: 70ch; }

/* ---------- Texte riche ---------- */
.prose { font-size: 1.1rem; line-height: 1.7; }
.prose > * { margin-top: 0; margin-bottom: 1.1em; }
.prose h2, .prose h3, .prose h4 { line-height: 1.2; letter-spacing: -0.015em; margin-top: 1.8em; margin-bottom: .5em; }
.prose h2 { font-size: 1.7rem; }
.prose h3 { font-size: 1.3rem; }
.prose p, .prose li { max-width: 70ch; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--green); font-size: 1.2rem; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose img { border-radius: var(--r-media); }
.prose figcaption, .prose .wp-element-caption { font-size: .88rem; color: var(--muted); margin-top: 8px; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; background: var(--surface); }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { background: var(--tint); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose .wp-block-button__link { background: var(--green); color: #fff; border-radius: 999px; padding: 12px 22px; font-family: var(--display); font-weight: 600; text-decoration: none; }
.prose .wp-block-button__link:hover { background: var(--green-deep); color: #fff; }
.prose .is-style-outline .wp-block-button__link { background: transparent; color: var(--green); border: 2px solid var(--green); }
.prose iframe { width: 100%; border: 0; border-radius: var(--r-media); }

/* ---------- Commentaires ---------- */
.comments { max-width: 70ch; margin-top: clamp(48px, 6vw, 88px); }
.comments__title, .comment-reply-title { font-size: 1.6rem; }
.comments__list { padding-left: 0; list-style: none; }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-form label { display: block; font-weight: 500; margin-bottom: 4px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; font: inherit; padding: 12px 14px; border: 1px solid #9fb0a5; border-radius: 8px; background: var(--surface);
}
.comment-form .submit { font: inherit; font-family: var(--display); font-weight: 600; padding: 12px 24px; border-radius: 999px; background: var(--green); color: #fff; border: 0; cursor: pointer; }
.comment-form .submit:hover { background: var(--green-deep); }
.comment-notes, .logged-in-as { color: var(--muted); font-size: .95rem; }
.nav-links { display: flex; gap: 16px; padding: 32px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
	.hero { grid-template-columns: 1fr; }
	.plates { grid-template-columns: repeat(4, minmax(140px, 1fr)); overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
	.plate { scroll-snap-align: start; }
	.plate:nth-child(even) { transform: none; }
	.plate img { aspect-ratio: 1; }
	.parcours { grid-template-columns: 1fr; }
	.parcours__lead { position: static; display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: center; }
	.parcours__monogram, .parcours__photo { aspect-ratio: 1; font-size: 2.6rem; }
	.parcours__employers { margin: 0; }
	.project__grid { grid-template-columns: 1fr; }
	.fiche { grid-column: 1; grid-row: 1; position: static; }
	.project__body { grid-row: 2; }
	.contact__in { grid-template-columns: 1fr; }
	.contact__links { justify-content: flex-start; }
}
@media (max-width: 640px) {
	.site-head__in { flex-wrap: wrap; min-height: 0; padding-top: 10px; padding-bottom: 10px; gap: 6px; }
	.site-nav { width: 100%; margin-left: -14px; }
	.cards { grid-template-columns: 1fr; }
	.expertise { grid-template-columns: 1fr; }
	.pager { grid-template-columns: 1fr; }
	.pager__next { grid-column: 1; text-align: left; }
	.hero__actions .btn { flex: 1 1 auto; }
}
