/* =========================================================
   Homo Habilis — website mockup, v2
   The client chose style C, "territoire" (html[data-style="territoire"]),
   now the only style shown. Its rules are at the end of this file.
   The base rules below are the first draft's "carnet" style and still
   serve as the foundation; "epure" (style B) is kept for reference only.
   ========================================================= */

/* ---------- Tokens (Carnet = default) ---------- */
:root {
  --bg: #f7f4ec;
  --bg-alt: #efeadc;
  --bg-panel: #e8e2d1;
  --card: #fcfaf5;
  --ink: #1d1f17;
  --ink-soft: #57594c;
  --ink-faint: #8d8c7d;
  --line: #dcd4c0;
  --accent: #4a6b1f;
  --accent-ink: #ffffff;
  --accent-soft: #e3e9d1;
  --note: #b0592e;
  --dark: #23281c;
  --dark-ink: #f4f1e8;
  --dark-soft: #bdbcab;
  --overlay: rgba(18, 20, 14, 0.62);

  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: var(--font-body);
  --font-hand: "Caveat", "Segoe Print", cursive;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-bold-serif: "Fraunces", Georgia, serif;

  --radius: 12px;
  --radius-sm: 8px;
  --wrap: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --gap: 12px;
  --header-h: 76px;
  --section-y: clamp(64px, 8vw, 120px);
  --vh: 1vh; /* fixed to px in screenshot mode so heroes keep their height */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; }
p { margin: 0 0 1em; }

/* Language switching: only the active language is shown */
html[data-lang="fr"] [data-l="en"],
html[data-lang="en"] [data-l="fr"] { display: none !important; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.todo {
  color: var(--ink-faint);
  font-style: italic;
  border-bottom: 1px dashed currentColor;
}

/* ---------- Type ---------- */
.eyebrow {
  display: block;
  margin: 0 0 12px;
  font-family: var(--font-hand);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--note);
}
.display {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 4.8vw, 4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.display em {
  font-family: var(--font-hand);
  font-style: normal;
  font-weight: 600;
  font-size: 1.3em;
  line-height: 0.8;
  letter-spacing: 0;
  color: var(--accent);
  white-space: nowrap; /* keep the underlined words on one line */
  padding: 0 0.04em 0.1em;
  background: url("../img/squiggle.f7d7eda12616.svg") no-repeat 0 100% / 100% 0.26em;
}
.h2 {
  font-family: var(--font-hand);
  font-size: clamp(2.4rem, 4vw, 3.3rem);
  font-weight: 600;
  line-height: 1.02;
}
.h2 em { font-style: normal; color: var(--accent); }
.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink-soft);
}
.note {
  display: inline-block;
  margin: 0;
  font-family: var(--font-hand);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.1;
  color: var(--note);
  transform: rotate(-2deg);
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(3px); }

.link-arrow {
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.link-arrow:hover { color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  line-height: 1;
}
.logo-mark {
  display: none;
  width: 34px;
  height: 34px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}
.logo-text { display: flex; flex-direction: column; }
.logo-main {
  font-family: var(--font-hand);
  font-size: 2.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.logo-sub {
  display: none;
  margin-top: 6px;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.6vw, 34px);
}
.nav a {
  padding: 6px 0;
  font-size: 0.98rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
}
.nav a[aria-current="page"] {
  color: var(--accent);
  font-family: var(--font-hand);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1;
}
.nav a:hover { color: var(--accent); }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.lang-switch button {
  border: 0;
  background: transparent;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.menu-toggle { display: none; }

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .logo-main { font-size: 1.9rem; }
  .menu-toggle {
    display: inline-flex;
    border: 1px solid var(--line);
    background: transparent;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.85rem;
    cursor: pointer;
  }
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { font-size: 1.15rem; }
}

/* ---------- Home hero: slideshow + headline ---------- */
.hero { display: flex; flex-direction: column; position: relative; }
.hero-slider {
  position: relative;
  order: 0;
  height: min(calc(var(--vh) * 72), 760px);
  min-height: 380px;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg-panel);
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-caption {
  position: absolute;
  left: var(--gutter);
  bottom: 22px;
  z-index: 3;
  max-width: calc(100% - 2 * var(--gutter));
  padding: 6px 12px;
  border-radius: 4px;
  background: var(--bg);
  font-size: 0.82rem;
  text-decoration: none;
}
.hero-caption em { font-style: normal; color: var(--ink-soft); }
.hero-caption:hover { color: var(--accent); }
.hero-dots {
  position: absolute;
  right: var(--gutter);
  bottom: 28px;
  z-index: 3;
  display: flex;
  gap: 8px;
}
.hero-dots button {
  width: 9px; height: 9px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #fff;
  background: transparent;
  cursor: pointer;
}
.hero-dots button[aria-current="true"] { background: #fff; }

.hero-text {
  order: 1;
  padding-top: clamp(48px, 7vw, 96px);
  text-align: center;
}
.hero-text .eyebrow { margin-bottom: 8px; }
.hero-text .display { max-width: 17ch; margin: 0 auto 22px; }
.hero-text .side { max-width: 640px; margin: 0 auto; }
.hero-text .lead { margin-bottom: 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

@media (max-width: 760px) {
  .hero-slider { height: calc(var(--vh) * 58); min-height: 320px; }
}

/* ---------- Sections ---------- */
.section { padding: var(--section-y) 0; }
.section--flush-top { padding-top: 0; }
.section--alt { background: var(--bg-alt); }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px 32px;
  margin-bottom: clamp(28px, 4vw, 52px);
}
.section-head .h2 { max-width: 22ch; }
.section-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  padding-bottom: 6px;
}
.section-intro {
  max-width: 62ch;
  margin: -14px 0 clamp(32px, 4vw, 52px);
}
@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; }
  .section-side { align-items: flex-start; }
}

/* ---------- Domains (3 fields of work) ---------- */
.domains {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.domain {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.domain-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-panel); }
.domain-img img { width: 100%; height: 100%; object-fit: cover; }
.domain-body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 40px 26px 26px;
}
.domain-picto {
  position: absolute;
  top: -28px;
  left: 22px;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--accent);
}
.domain-picto .picto { width: 28px; height: 28px; }
.domain h3 {
  margin-bottom: 10px;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
}
.domain p { font-size: 0.97rem; color: var(--ink-soft); }
.domain ul {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
}
.domain li {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px dashed var(--line);
}
.domain li::before { content: "—"; color: var(--accent); }
.domain .link-arrow { margin-top: auto; align-self: flex-start; }
@media (max-width: 980px) { .domains { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .domains { grid-template-columns: 1fr; } }

/* ---------- Approach steps + key figures ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.step { padding-top: 18px; border-top: 1.5px dashed var(--line); }
.step-num {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-hand);
  font-size: 2.9rem;
  font-weight: 600;
  line-height: 1;
  color: var(--note);
}
.step h3 { margin-bottom: 8px; font-size: 1.15rem; font-weight: 600; }
.step p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }
@media (max-width: 980px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: clamp(48px, 6vw, 80px) 0 0;
  padding: clamp(28px, 4vw, 44px) 0 0;
  border-top: 1px solid var(--line);
  text-align: center;
}
.stat-value {
  display: block;
  font-family: var(--font-hand);
  font-size: clamp(3.2rem, 6vw, 4.8rem);
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
}
.stat-label { display: block; margin-top: 8px; font-size: 0.95rem; color: var(--ink-soft); }
.stats-note { grid-column: 1 / -1; margin: 0; font-size: 0.78rem; color: var(--ink-faint); }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } }

/* ---------- Contact band ---------- */
.cta-band { padding: clamp(32px, 4vw, 56px) 0 var(--section-y); }
.section--alt + .cta-band { padding-top: var(--section-y); }
.cta-box {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto;
  align-items: center;
  gap: 24px 48px;
  padding: clamp(36px, 6vw, 72px) clamp(24px, 5vw, 64px);
  border-radius: calc(var(--radius) + 6px);
  background: var(--accent-soft);
}
.cta-title {
  margin: 0 0 10px;
  font-family: var(--font-hand);
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  font-weight: 600;
  line-height: 1.02;
  color: var(--accent);
}
.cta-box p { margin: 0; font-size: 1.08rem; color: var(--ink-soft); }
.cta-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.cta-mail { font-size: 0.95rem; text-decoration: none; border-bottom: 1px solid currentColor; }
@media (max-width: 760px) { .cta-box { grid-template-columns: 1fr; } }

/* ---------- Page heading (inner pages) ---------- */
.page-head { padding: clamp(48px, 7vw, 96px) 0 clamp(28px, 4vw, 48px); }
.page-head .display { max-width: 20ch; margin-bottom: 18px; }
.page-head .lead { max-width: 62ch; margin: 0; }

/* ---------- Filters ---------- */
.filters-bar { margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0;
  padding: 16px 0;
  list-style: none;
}
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-size: 0.95rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.filter-btn:hover { color: var(--ink); }
.filter-btn[aria-pressed="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.filter-btn .count { font-size: 0.75rem; font-weight: 400; color: var(--ink-faint); }

.picto {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Project grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Inner pages: room before the footer when no contact band follows */
.page-main--end { padding-bottom: var(--section-y); }
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid, .grid--2 { grid-template-columns: 1fr; } }

.tile { position: relative; }
.tile[hidden] { display: none; }
.tile a,
.tile .tile-inner {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  text-decoration: none;
}
.grid--2 .tile a { aspect-ratio: 4 / 3; }
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.tile a:hover img,
.tile a:focus-visible img { transform: scale(1.03); }

.tile-info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  color: #fff;
  background: linear-gradient(to top, var(--overlay), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.tile a:hover .tile-info,
.tile a:focus-visible .tile-info,
.grid--2 .tile-info { opacity: 1; }
.tile-cats { display: none; }
.tile-title { margin: 0 0 4px; font-size: 1.08rem; font-weight: 600; line-height: 1.3; }
.grid--2 .tile-title { font-size: 1.35rem; }
.tile-meta { font-size: 0.86rem; opacity: 0.9; }

.tile-picto {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg);
  color: var(--accent);
}
.tile-picto .picto { width: 20px; height: 20px; }

/* Touch screens and phones have no hover: caption goes under the image */
@media (hover: none), (max-width: 560px) {
  .tile-info {
    position: static;
    opacity: 1;
    color: var(--ink);
    background: none;
    padding: 12px 2px 4px;
  }
  .tile a, .tile .tile-inner { aspect-ratio: auto; background: none; overflow: visible; }
  .tile a img, .tile .tile-inner .placeholder-art { aspect-ratio: 1 / 1; height: auto; border-radius: var(--radius-sm); }
  .grid--2 .tile a img { aspect-ratio: 4 / 3; }
  .tile-meta { color: var(--ink-soft); }
}

/* Placeholder tiles (projects still to come) */
.placeholder-art {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(0, 0, 0, 0.035) 14px 15px),
    var(--bg-panel);
}
.placeholder-art .picto { width: 46px; height: 46px; stroke-width: 1.1; }
.tile--placeholder .tile-info { opacity: 1; color: var(--ink-soft); background: none; }
.tile--placeholder .tile-title { font-weight: 500; }
.empty-msg { padding: 40px 0 80px; color: var(--ink-soft); }

/* ---------- Project page ---------- */
.project-hero {
  position: relative;
  height: min(calc(var(--vh) * 72), 720px);
  min-height: 320px;
  overflow: hidden;
  background: var(--bg-panel);
}
.project-hero button[data-lightbox] {
  all: unset;
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}
.project-hero img { width: 100%; height: 100%; object-fit: cover; }
.video-slot {
  position: absolute;
  right: var(--gutter);
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 4px;
  background: var(--bg);
  font-size: 0.8rem;
  color: var(--ink-soft);
  pointer-events: none;
}
.video-slot svg { width: 14px; height: 14px; fill: var(--accent); }
@media (max-width: 760px) {
  .project-hero { height: auto; min-height: 0; aspect-ratio: 4 / 3; }
  .video-slot { bottom: 10px; font-size: 0.72rem; }
}

.project-head { padding: clamp(28px, 5vw, 56px) 0 clamp(20px, 3vw, 36px); }
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
}
.tag .picto { width: 17px; height: 17px; }
.tag:hover { background: var(--accent); color: var(--accent-ink); }

.project-title {
  max-width: 22ch;
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.4vw, 3.4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
}
.project-sub { margin: 0; font-size: 1.05rem; color: var(--ink-soft); }

.project-body {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(28px, 4vw, 64px);
  padding-bottom: 72px;
}
.project-aside { position: sticky; top: calc(var(--header-h) + 24px); }
@media (max-width: 900px) {
  .project-body { grid-template-columns: 1fr; }
  .project-aside { position: static; order: -1; }
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 18px;
  margin: 0 0 26px;
  font-size: 0.93rem;
}
.facts dt { font-weight: 600; }
.facts dd { margin: 0; color: var(--ink-soft); }

.figures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 30px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.figure-value {
  display: block;
  font-family: var(--font-hand);
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
}
.figure-label { display: block; margin-top: 6px; font-size: 0.78rem; line-height: 1.35; color: var(--ink-soft); }
.figures.is-todo .figure-value { color: var(--ink-faint); }

.project-text h2 {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.project-text p { margin: 0 0 1em; }
.project-text .lead { font-size: 1.12rem; line-height: 1.55; color: var(--ink); }

/* Gallery: mixed formats, every image opens the lightbox */
.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
.gallery li { position: relative; }
.gallery .span-2 { grid-column: span 2; }
.gallery button {
  all: unset;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  cursor: zoom-in;
}
.gallery button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.gallery button:hover img { transform: scale(1.02); }
/* .gallery prefix: must beat `.gallery button { all: unset }` */
.gallery .ratio-landscape { aspect-ratio: 4 / 3; }
.gallery .ratio-wide { aspect-ratio: 16 / 9; }
.gallery .ratio-portrait { aspect-ratio: 4 / 5; }
.gallery .ratio-square { aspect-ratio: 1 / 1; }
/* Maps & drawings: never cropped */
.gallery .fit-contain { display: grid; place-items: center; padding: clamp(12px, 3vw, 28px); }
.gallery .fit-contain img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.gallery .fit-contain:hover img { transform: none; }

.badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.72rem;
  color: var(--ink-soft);
  pointer-events: none;
}
.badge--warn { color: #8a4b0f; background: #fbefdc; }
.missing-art {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 16px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-faint);
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(0, 0, 0, 0.035) 14px 15px),
    var(--bg-panel);
}

.project-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}
.project-nav a { text-decoration: none; }
.project-nav a:hover { color: var(--accent); }
.project-nav .next { text-align: right; }
.project-nav small { display: block; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.project-nav .all { font-weight: 600; border-bottom: 1px solid currentColor; }

/* ---------- About page ---------- */
.wide-image {
  aspect-ratio: 21 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-panel);
}
.wide-image img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .wide-image { aspect-ratio: 4 / 3; } }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: start;
}
.split-text p { font-size: 1.05rem; color: var(--ink-soft); }
.split-text p:first-child { font-size: 1.2rem; color: var(--ink); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 40px);
  margin: clamp(40px, 6vw, 72px) 0 0;
  padding: 0;
  list-style: none;
}
.value { padding-top: 18px; border-top: 1.5px dashed var(--line); }
.value-icon { display: block; color: var(--accent); }
.value .picto { width: 30px; height: 30px; margin-bottom: 14px; }
.value h3 { margin-bottom: 8px; font-size: 1.15rem; font-weight: 600; }
.value p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }
@media (max-width: 760px) { .values { grid-template-columns: 1fr; } }

.team {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.portrait {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: var(--radius);
  color: var(--ink-faint);
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(0, 0, 0, 0.035) 14px 15px),
    var(--bg-panel);
}
.portrait svg { width: 38%; height: auto; fill: none; stroke: currentColor; stroke-width: 1; opacity: 0.7; }
.portrait .badge { left: 12px; top: 12px; }
.member h3 { font-size: 1.2rem; font-weight: 600; }
.member p { margin: 2px 0 0; font-size: 0.93rem; color: var(--ink-soft); }
@media (max-width: 860px) { .team { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .team { grid-template-columns: 1fr; } }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.95rem;
}
.chips-note { margin: 16px 0 0; font-size: 0.82rem; color: var(--ink-faint); }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 0.88rem; font-weight: 600; }
.field label .req { color: var(--note); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-size: 1rem;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--accent); }
.check {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.check input { margin-top: 4px; accent-color: var(--accent); }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.form-msg { margin: 0; font-size: 0.9rem; color: var(--accent); }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

.info-card {
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius);
  background: var(--accent-soft);
}
.info-card h2 { margin-bottom: 18px; font-family: var(--font-hand); font-size: 2.2rem; font-weight: 600; line-height: 1; color: var(--accent); }
.info-list { display: grid; gap: 16px; margin: 0 0 24px; }
.info-list dt { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.info-list dd { margin: 2px 0 0; font-size: 1rem; }
.info-list a { text-decoration: none; border-bottom: 1px solid currentColor; }

.map-ph {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--card) url("../img/topo-dark.cefa93a099c7.svg") center / cover no-repeat;
}
.map-ph .pin {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -100%);
  fill: var(--note);
}
.map-ph > span {
  position: absolute;
  left: 12px;
  bottom: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.72rem;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: clamp(48px, 6vw, 72px) 0 28px;
  background: var(--bg-alt);
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1.3fr 0.8fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.footer-brand .logo { color: var(--ink); }
.footer-brand p { max-width: 34ch; margin: 16px 0 0; }
.footer-col h3 {
  margin-bottom: 14px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}
.footer-col ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 22px;
  font-size: 0.82rem;
}
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.mockup-flag { color: var(--note); }
html:not(.is-shot) .footer-bottom { padding-bottom: 60px; } /* room for the mockup style switch */
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  grid-template-rows: auto 1fr auto;
  background: var(--bg);
}
.lightbox.is-open { display: grid; }
.lb-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px var(--gutter);
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.lb-close, .lb-prev, .lb-next {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: var(--bg-panel); }
.lb-close svg, .lb-prev svg, .lb-next svg {
  width: 22px; height: 22px;
  fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round;
}
.lb-stage {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 0;
  padding: 0 12px;
  touch-action: pan-y;
}
.lb-figure { margin: 0; height: 100%; min-height: 0; display: grid; place-items: center; }
.lb-figure img {
  max-width: 100%;
  max-height: calc(100vh - 150px);
  max-height: calc(100dvh - 150px);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.lb-caption {
  padding: 14px var(--gutter) 20px;
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
@media (max-width: 600px) {
  .lb-prev, .lb-next { display: none; }
  .lb-stage { grid-template-columns: 1fr; padding: 0; }
}

/* ---------- Mockup-only controls ---------- */
.mockup-panel {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  border-radius: 999px;
  background: #1d1f19;
  color: #f1f0e8;
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: 0.78rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}
.mockup-panel > span:first-child { opacity: 0.75; }
.mockup-panel .seg { display: inline-flex; padding: 2px; border-radius: 999px; background: #34372d; }
.mockup-panel button {
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #f1f0e8;
  font-size: 0.78rem;
  cursor: pointer;
}
.mockup-panel button[aria-pressed="true"] { background: #f1f0e8; color: #1d1f19; }
@media (max-width: 560px) {
  .mockup-panel { left: 12px; right: 12px; justify-content: center; }
}

/* Screenshot mode (?shot=1): no mockup controls, no motion, one tile shown "hovered" */
.is-shot .mockup-panel { display: none !important; }
.is-shot *, .is-shot *::before, .is-shot *::after { transition: none !important; animation: none !important; }
.is-shot .tile.is-demo-hover .tile-info { opacity: 1; }
.is-shot .tile.is-demo-hover img { transform: scale(1.03); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}


/* =========================================================
   Style B — Épure (minimal editorial, after lagraine-studio)
   ========================================================= */
html[data-style="epure"] {
  --bg: #ffffff;
  --bg-alt: #f6f6f3;
  --bg-panel: #efefea;
  --card: #ffffff;
  --ink: #121212;
  --ink-soft: #5d5d58;
  --ink-faint: #9c9c95;
  --line: #e3e3dd;
  --accent: #121212;
  --accent-ink: #ffffff;
  --accent-soft: #f3f3ef;
  --note: #121212;
  --font-display: var(--font-serif);
  --radius: 0px;
  --radius-sm: 0px;
  --gap: 28px;
  --header-h: 124px;
}
html[data-style="epure"] .note { display: none; }

html[data-style="epure"] .eyebrow {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
html[data-style="epure"] .display {
  font-size: clamp(2.8rem, 6.4vw, 6rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.015em;
}
html[data-style="epure"] .display em,
html[data-style="epure"] .h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1em;
  line-height: inherit;
  color: inherit;
  background: none;
  padding: 0;
}
html[data-style="epure"] .h2 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  font-weight: 400;
  line-height: 1.04;
}
html[data-style="epure"] .btn,
html[data-style="epure"] .btn--ghost {
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  background: none;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
html[data-style="epure"] .btn--ghost { color: var(--ink-soft); }
html[data-style="epure"] .btn:hover { background: none; color: var(--ink-soft); }
html[data-style="epure"] .link-arrow {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Header: centred logo above the menu */
html[data-style="epure"] .site-header { background: rgba(255, 255, 255, 0.96); }
html[data-style="epure"] .site-header .wrap {
  height: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  row-gap: 16px;
  padding-top: 24px;
  padding-bottom: 18px;
}
html[data-style="epure"] .site-header .logo { grid-column: 2; flex-direction: column; text-align: center; }
html[data-style="epure"] .site-header .logo-text { align-items: center; }
html[data-style="epure"] .logo-main {
  font-family: var(--font-serif);
  font-size: 2.3rem;
  font-weight: 400;
  letter-spacing: 0;
}
html[data-style="epure"] .logo-sub { display: block; }
html[data-style="epure"] .site-header .nav { grid-column: 1 / -1; justify-content: center; gap: 40px; }
html[data-style="epure"] .nav a,
html[data-style="epure"] .nav a[aria-current="page"] {
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--ink);
}
html[data-style="epure"] .nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 7px; }
html[data-style="epure"] .nav a:hover { color: var(--ink-soft); }
html[data-style="epure"] .lang-switch { border: 0; gap: 2px; }
html[data-style="epure"] .lang-switch button { padding: 2px 6px; font-weight: 500; }
html[data-style="epure"] .lang-switch button[aria-pressed="true"] { background: none; color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }

/* Hero: headline first, framed photo below */
html[data-style="epure"] .hero-text {
  order: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  align-items: end;
  gap: 20px 64px;
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(36px, 5vw, 64px);
  text-align: left;
}
html[data-style="epure"] .hero-text .eyebrow { grid-column: 1 / -1; }
html[data-style="epure"] .hero-text .display { max-width: 13ch; margin: 0; }
html[data-style="epure"] .hero-text .side { max-width: none; margin: 0; padding-bottom: 10px; }
html[data-style="epure"] .hero-text .lead { font-size: 1.05rem; }
html[data-style="epure"] .hero-cta { justify-content: flex-start; gap: 14px 28px; }
html[data-style="epure"] .hero-slider {
  order: 1;
  width: calc(min(100%, var(--wrap)) - 2 * var(--gutter));
  margin: 0 auto;
  height: min(calc(var(--vh) * 70), 720px);
}
html[data-style="epure"] .hero-caption {
  left: 0;
  bottom: 0;
  padding: 10px 16px;
  border-radius: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Sections */
html[data-style="epure"] .section--alt {
  background: var(--bg);
  border-top: 1px solid var(--line);
}

/* Domains: text columns, no images */
html[data-style="epure"] .domain {
  border: 0;
  border-top: 1px solid var(--ink);
  border-radius: 0;
  background: none;
  overflow: visible;
}
html[data-style="epure"] .domain-img { display: none; }
html[data-style="epure"] .domain-body { padding: 28px 0 0; }
html[data-style="epure"] .domain-picto {
  position: static;
  display: block;
  width: auto;
  height: auto;
  margin-bottom: 28px;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ink);
}
html[data-style="epure"] .domain-picto .picto { width: 36px; height: 36px; stroke-width: 1.1; }
html[data-style="epure"] .domain h3 {
  margin-bottom: 14px;
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 400;
  line-height: 1.08;
}
html[data-style="epure"] .domain li { border-top-style: solid; }
html[data-style="epure"] .domain li::before { content: none; }

/* Projects: captions under the images */
html[data-style="epure"] .grid { gap: 52px 28px; }
html[data-style="epure"] .tile a,
html[data-style="epure"] .tile .tile-inner { aspect-ratio: auto; background: none; overflow: visible; }
html[data-style="epure"] .tile img,
html[data-style="epure"] .tile .placeholder-art { height: auto; aspect-ratio: 4 / 5; }
html[data-style="epure"] .grid--2 .tile img { aspect-ratio: 4 / 3; }
html[data-style="epure"] .tile a:hover img { transform: none; opacity: 0.88; }
html[data-style="epure"] .tile-picto { display: none; }
html[data-style="epure"] .tile-info,
html[data-style="epure"] .tile--placeholder .tile-info {
  position: static;
  opacity: 1;
  padding: 18px 0 0;
  background: none;
  color: var(--ink);
}
html[data-style="epure"] .tile-title,
html[data-style="epure"] .grid--2 .tile-title {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1.12;
}
html[data-style="epure"] .grid--2 .tile-title { font-size: 2rem; }
html[data-style="epure"] .tile-meta {
  margin-top: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 1;
}

/* Steps & figures */
html[data-style="epure"] .step { padding: 4px 0 4px 24px; border-top: 0; border-left: 1px solid var(--line); }
html[data-style="epure"] .step-num {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
}
html[data-style="epure"] .step h3 { font-weight: 500; }
html[data-style="epure"] .stats { text-align: left; }
html[data-style="epure"] .stat-value {
  font-family: var(--font-serif);
  font-size: clamp(3.6rem, 7vw, 5.6rem);
  font-weight: 400;
  color: var(--ink);
}
html[data-style="epure"] .stat-label { font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; }

/* Contact band: a ruled line instead of a coloured box */
html[data-style="epure"] .cta-band { padding-top: 0; }
html[data-style="epure"] .page-main { padding-bottom: var(--section-y); }
html[data-style="epure"] .cta-box {
  padding: clamp(40px, 6vw, 72px) 0 0;
  border-top: 1px solid var(--ink);
  border-radius: 0;
  background: none;
}
html[data-style="epure"] .cta-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  font-weight: 400;
  color: var(--ink);
}

/* Inner pages */
html[data-style="epure"] .page-head .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  align-items: end;
  gap: 20px 64px;
}
html[data-style="epure"] .page-head .eyebrow { grid-column: 1 / -1; }
html[data-style="epure"] .page-head .display { margin: 0; }
html[data-style="epure"] .page-head .lead { padding-bottom: 10px; font-size: 1.05rem; }

html[data-style="epure"] .filters-bar { border-top: 1px solid var(--line); }
html[data-style="epure"] .filter-btn {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
html[data-style="epure"] .filter-btn .picto { width: 19px; height: 19px; stroke-width: 1.2; }
html[data-style="epure"] .filter-btn[aria-pressed="true"] { color: var(--ink); border-bottom-width: 1px; font-weight: 500; }

html[data-style="epure"] .project-hero {
  width: calc(min(100%, var(--wrap)) - 2 * var(--gutter));
  margin: clamp(24px, 4vw, 48px) auto 0;
}
html[data-style="epure"] .project-title { font-weight: 400; font-size: clamp(2.4rem, 5.4vw, 4.6rem); line-height: 1.02; }
html[data-style="epure"] .tag {
  padding: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
html[data-style="epure"] .tag:hover { background: none; color: var(--ink); }
html[data-style="epure"] .tags { gap: 8px 24px; }
html[data-style="epure"] .figure-value { font-family: var(--font-serif); font-size: 2.8rem; font-weight: 400; color: var(--ink); }

html[data-style="epure"] .value { border-top: 1px solid var(--ink); }
html[data-style="epure"] .value-icon { color: var(--ink); }
html[data-style="epure"] .value .picto { stroke-width: 1.1; }
html[data-style="epure"] .value h3,
html[data-style="epure"] .member h3 { font-family: var(--font-serif); font-size: 1.7rem; font-weight: 400; line-height: 1.1; }
html[data-style="epure"] .chips li { border-radius: 0; border-color: var(--ink); background: none; }

html[data-style="epure"] .field label { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
html[data-style="epure"] .field input,
html[data-style="epure"] .field select,
html[data-style="epure"] .field textarea {
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: none;
}
html[data-style="epure"] .field textarea { border: 1px solid var(--ink); padding: 12px; }
html[data-style="epure"] .info-card { padding: 28px 0 0; border-top: 1px solid var(--ink); background: none; }
html[data-style="epure"] .info-card h2 { font-family: var(--font-serif); font-size: 2.2rem; font-weight: 400; color: var(--ink); }
html[data-style="epure"] .map-ph { filter: grayscale(1); }
html[data-style="epure"] .map-ph .pin { fill: var(--ink); }

html[data-style="epure"] .site-footer { background: var(--bg); border-top: 1px solid var(--line); }
html[data-style="epure"] .footer-brand .logo-main { font-size: 2rem; }
html[data-style="epure"] .footer-brand .logo-sub { display: block; }
html[data-style="epure"] .mockup-flag { color: var(--ink-faint); }

@media (max-width: 760px) {
  html[data-style="epure"] { --header-h: 64px; }
  html[data-style="epure"] .site-header .wrap {
    display: flex;
    height: var(--header-h);
    padding-top: 0;
    padding-bottom: 0;
  }
  html[data-style="epure"] .site-header .logo-text { align-items: flex-start; }
  html[data-style="epure"] .site-header .logo-main { font-size: 1.8rem; }
  html[data-style="epure"] .site-header .logo-sub { display: none; }
  html[data-style="epure"] .site-header .nav { align-items: flex-start; gap: 14px; }
  html[data-style="epure"] .hero-text,
  html[data-style="epure"] .page-head .wrap { grid-template-columns: 1fr; }
  html[data-style="epure"] .step { padding-left: 18px; }
}


/* =========================================================
   Logo lockup + rock-art marks (used by the chosen style C)
   The logo images are masks (white + alpha) painted with currentColor,
   so one file works on light, dark and ochre backgrounds.
   ========================================================= */
.logo-hands {
  display: block;
  flex: none;
  height: 40px;
  aspect-ratio: 614 / 381;
  background: currentColor;
  -webkit-mask: url("../img/logo/hh-mains.65f70e18f98d.png") center / contain no-repeat;
  mask: url("../img/logo/hh-mains.65f70e18f98d.png") center / contain no-repeat;
}
.logo-word {
  display: block;
  width: 168px;
  aspect-ratio: 1276 / 115;
  background: currentColor;
  -webkit-mask: url("../img/logo/hh-wordmark.feec3f97a565.png") center / contain no-repeat;
  mask: url("../img/logo/hh-wordmark.feec3f97a565.png") center / contain no-repeat;
}
.logo-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Tally marks: section numbers painted like counting strokes */
.tally {
  display: inline-block;
  flex: none;
  height: 1.5em;
  width: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

/* Step pictograms (approach) */
.step-picto { display: block; margin-bottom: 18px; }
.step-picto .picto { width: 54px; height: 54px; }

/* Pictograms: strokes + filled shapes ("painted" look) */
.picto .f { fill: currentColor; stroke: none; }


/* =========================================================
   Style C — Territoire, v2 (chosen by the client, 24 Nov 2026)
   Rock-art palette: charcoal black, limestone off-white,
   red ochre, yellow ochre. Contour lines from the logo.
   ========================================================= */
html[data-style="territoire"] {
  --bg: #f5f0e5;          /* calcaire / limestone */
  --bg-alt: #ebe3d2;
  --bg-panel: #e3d9c5;
  --card: #fbf8f1;
  --ink: #1f231c;         /* charbon / charcoal */
  --ink-soft: #54564a;
  --ink-faint: #8c8a7c;
  --line: #d9cfbb;
  --accent: #a9562b;      /* ocre rouge / red ochre */
  --accent-hover: #8f4521;
  --accent-ink: #ffffff;
  --accent-soft: #f0dccb;
  --accent-light: #d8a25a; /* ocre jaune / yellow ochre */
  --note: var(--accent);
  --dark: #1f231c;
  --dark-2: #2a2e25;
  --dark-ink: #f5f0e5;
  --dark-soft: #b3b0a2;
  --dark-line: rgba(245, 240, 229, 0.18);
  --overlay: rgba(20, 22, 17, 0.66);
  --font-display: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --radius: 3px;
  --radius-sm: 2px;
  --gap: 22px;
  --header-h: 84px;
}
html[data-style="territoire"] .note { display: none; }

/* ---------- Type ---------- */
html[data-style="territoire"] .eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
}
html[data-style="territoire"] .eyebrow::before { content: ""; flex: none; width: 32px; height: 1.5px; background: currentColor; }
html[data-style="territoire"] .eyebrow[data-tally]::before { display: none; }
html[data-style="territoire"] .display {
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 5.9vw, 5.5rem);
  font-weight: 450;
  line-height: 1.02;
  letter-spacing: -0.022em;
}
html[data-style="territoire"] .display em,
html[data-style="territoire"] .h2 em {
  font-family: inherit;
  font-style: normal;
  font-weight: inherit;
  font-size: 1em;
  line-height: inherit;
  letter-spacing: inherit;
  color: var(--accent);
  background: none;
  padding: 0;
  white-space: normal;
}
html[data-style="territoire"] .h2 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3.8vw, 3.4rem);
  font-weight: 450;
  line-height: 1.06;
  letter-spacing: -0.018em;
}
html[data-style="territoire"] .lead { color: var(--ink-soft); }
html[data-style="territoire"] .btn {
  padding: 16px 26px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
html[data-style="territoire"] .btn:hover { background: var(--dark); border-color: var(--dark); color: var(--dark-ink); }
html[data-style="territoire"] .btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
html[data-style="territoire"] .link-arrow {
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom-width: 1.5px;
}
html[data-style="territoire"] .link-arrow:hover { color: var(--ink); }

/* ---------- Header: charcoal band with the logo ---------- */
html[data-style="territoire"] .site-header {
  background: var(--dark);
  color: var(--dark-ink);
  border-bottom: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html[data-style="territoire"] .logo { gap: 14px; color: var(--dark-ink); }
html[data-style="territoire"] .logo-mark,
html[data-style="territoire"] .logo-main { display: none; }
html[data-style="territoire"] .logo-text { gap: 9px; }
html[data-style="territoire"] .logo-sub {
  display: flex;
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.33em;
  color: var(--accent-light);
}
html[data-style="territoire"] .nav a,
html[data-style="territoire"] .nav a[aria-current="page"] {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--dark-ink);
}
html[data-style="territoire"] .nav a[aria-current="page"],
html[data-style="territoire"] .nav a:hover { color: var(--accent-light); }
html[data-style="territoire"] .nav a.nav-cta,
html[data-style="territoire"] .nav a.nav-cta[aria-current="page"] {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
}
html[data-style="territoire"] .nav a.nav-cta:hover { background: var(--accent-hover); color: #fff; }
html[data-style="territoire"] .lang-switch { border-color: var(--dark-line); }
html[data-style="territoire"] .lang-switch button { color: var(--dark-soft); font-family: var(--font-display); letter-spacing: 0.08em; }
html[data-style="territoire"] .lang-switch button[aria-pressed="true"] { background: var(--dark-ink); color: var(--dark); }
html[data-style="territoire"] .menu-toggle { border-color: rgba(245, 240, 229, 0.35); color: var(--dark-ink); font-family: var(--font-display); }

/* ---------- Hero: headline over the photo ---------- */
html[data-style="territoire"] .hero-slider { height: min(calc(var(--vh) * 88), 860px); min-height: 560px; }
html[data-style="territoire"] .hero-slider::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(20, 22, 17, 0.82) 0%, rgba(20, 22, 17, 0.45) 50%, rgba(20, 22, 17, 0) 78%),
    linear-gradient(0deg, rgba(20, 22, 17, 0.55) 0%, rgba(20, 22, 17, 0) 42%);
}
html[data-style="territoire"] .hero-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(56px, 9vw, 120px);
  z-index: 2;
  padding-top: 0;
  text-align: left;
  color: var(--dark-ink);
}
html[data-style="territoire"] .hero-text .eyebrow { color: var(--accent-light); }
html[data-style="territoire"] .hero-text .display { max-width: 12ch; margin: 0 0 26px; }
html[data-style="territoire"] .hero-text .display em { color: var(--accent-light); }
html[data-style="territoire"] .hero-text .side { max-width: 560px; margin: 0; }
html[data-style="territoire"] .hero-text .lead { color: rgba(245, 240, 229, 0.88); }
html[data-style="territoire"] .hero-cta { justify-content: flex-start; }
html[data-style="territoire"] .hero .btn--ghost { color: var(--dark-ink); border-color: rgba(245, 240, 229, 0.7); }
html[data-style="territoire"] .hero .btn--ghost:hover { background: var(--dark-ink); color: var(--dark); }
html[data-style="territoire"] .hero-caption {
  left: auto;
  right: var(--gutter);
  bottom: 58px;
  padding: 0;
  background: none;
  color: rgba(245, 240, 229, 0.85);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
html[data-style="territoire"] .hero-caption em { color: rgba(245, 240, 229, 0.6); }
html[data-style="territoire"] .hero-dots button { width: 26px; height: 3px; border: 0; border-radius: 2px; background: rgba(255, 255, 255, 0.4); }
html[data-style="territoire"] .hero-dots button[aria-current="true"] { background: var(--accent-light); }

/* ---------- Dark sections with contour lines ---------- */
html[data-style="territoire"] .section--steps,
html[data-style="territoire"] .page-head,
html[data-style="territoire"] .site-footer {
  background: var(--dark) url("../img/topo-light.89e48cf432a7.svg") center / cover no-repeat;
  color: var(--dark-ink);
}
html[data-style="territoire"] .section--steps .eyebrow,
html[data-style="territoire"] .page-head .eyebrow { color: var(--accent-light); }
html[data-style="territoire"] .section--steps .h2 em,
html[data-style="territoire"] .page-head .display em { color: var(--accent-light); }
html[data-style="territoire"] .section--steps .lead,
html[data-style="territoire"] .page-head .lead { color: var(--dark-soft); }

/* ---------- Domains: photo cards with an ochre pictogram ---------- */
html[data-style="territoire"] .domain { border: 0; border-radius: var(--radius); box-shadow: 0 1px 0 var(--line); }
html[data-style="territoire"] .domain-img { aspect-ratio: 3 / 2; }
html[data-style="territoire"] .domain-picto {
  top: -32px;
  left: 24px;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--dark-ink);
}
html[data-style="territoire"] .domain-picto .picto { width: 34px; height: 34px; }
html[data-style="territoire"] .domain-body { padding-top: 48px; }
html[data-style="territoire"] .domain h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; letter-spacing: -0.01em; }
html[data-style="territoire"] .domain li { border-top-style: solid; align-items: baseline; }
html[data-style="territoire"] .domain li::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-1px);
}

/* ---------- Projects: cards with caption ---------- */
html[data-style="territoire"] .tile a,
html[data-style="territoire"] .tile .tile-inner { aspect-ratio: auto; height: 100%; background: var(--card); border-radius: var(--radius); }
html[data-style="territoire"] .tile img,
html[data-style="territoire"] .tile .placeholder-art { height: auto; aspect-ratio: 4 / 3; border-radius: 0; }
html[data-style="territoire"] .tile-info,
html[data-style="territoire"] .tile--placeholder .tile-info {
  position: static;
  opacity: 1;
  padding: 18px 20px 22px;
  background: none;
  color: var(--ink);
}
html[data-style="territoire"] .tile-cats {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
html[data-style="territoire"] .tile-title,
html[data-style="territoire"] .grid--2 .tile-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.005em;
}
html[data-style="territoire"] .grid--2 .tile-title { font-size: 1.7rem; font-weight: 450; }
html[data-style="territoire"] .tile-meta { color: var(--ink-soft); opacity: 1; }
html[data-style="territoire"] .tile-picto { width: 42px; height: 42px; border-radius: var(--radius-sm); background: var(--accent); color: var(--dark-ink); }
html[data-style="territoire"] .tile-picto .picto { width: 24px; height: 24px; }
html[data-style="territoire"] .placeholder-art {
  color: var(--accent);
  background: var(--bg-panel) url("../img/topo-dark.cefa93a099c7.svg") center / cover no-repeat;
}
html[data-style="territoire"] .placeholder-art .picto { width: 64px; height: 64px; stroke-width: 2.1; opacity: 0.85; }

/* ---------- Approach (pictograms) & key figures on the charcoal band ---------- */
html[data-style="territoire"] .step { padding-top: 26px; border-top: 1px solid var(--dark-line); }
html[data-style="territoire"] .step-picto { color: var(--accent-light); }
html[data-style="territoire"] .step-num {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--dark-soft);
}
html[data-style="territoire"] .step h3 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 500; color: var(--dark-ink); }
html[data-style="territoire"] .step p { color: var(--dark-soft); }
html[data-style="territoire"] .stats { border-top-color: var(--dark-line); text-align: left; }
html[data-style="territoire"] .stat-value {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 6.5vw, 5.2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--accent-light);
}
html[data-style="territoire"] .stat-label {
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dark-ink);
}
html[data-style="territoire"] .stats-note { color: var(--dark-soft); }

/* ---------- Contact band: red ochre with a hand-print watermark ---------- */
html[data-style="territoire"] .cta-band {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 8vw, 104px) 0;
  background: var(--accent);
  color: #fff;
}
html[data-style="territoire"] .cta-band::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -3%;
  height: 135%;
  aspect-ratio: 614 / 381;
  transform: translateY(-50%) rotate(-8deg);
  background: rgba(40, 14, 2, 0.16);
  -webkit-mask: url("../img/logo/hh-mains.65f70e18f98d.png") center / contain no-repeat;
  mask: url("../img/logo/hh-mains.65f70e18f98d.png") center / contain no-repeat;
  pointer-events: none;
}
html[data-style="territoire"] .cta-band .wrap { position: relative; }
html[data-style="territoire"] .cta-box { padding: 0; border-radius: 0; background: none; }
html[data-style="territoire"] .cta-title {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 4.4vw, 3.8rem);
  font-weight: 450;
  letter-spacing: -0.02em;
  color: #fff;
}
html[data-style="territoire"] .cta-box p { color: rgba(255, 255, 255, 0.88); }
html[data-style="territoire"] .cta-band .btn { background: var(--dark); border-color: var(--dark); color: var(--dark-ink); }
html[data-style="territoire"] .cta-band .btn:hover { background: #fff; border-color: #fff; color: var(--dark); }

/* ---------- Inner pages ---------- */
html[data-style="territoire"] .page-head {
  margin-bottom: clamp(32px, 5vw, 56px);
  padding: clamp(56px, 8vw, 112px) 0 clamp(48px, 7vw, 88px);
}
html[data-style="territoire"] .filters-bar { border-bottom: 0; }
html[data-style="territoire"] .filters { gap: 10px; }
html[data-style="territoire"] .filter-btn {
  gap: 10px;
  padding: 9px 18px 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 0.92rem;
}
html[data-style="territoire"] .filter-btn .picto { width: 24px; height: 24px; color: var(--accent); }
html[data-style="territoire"] .filter-btn[aria-pressed="true"] { background: var(--dark); border-color: var(--dark); color: var(--dark-ink); }
html[data-style="territoire"] .filter-btn[aria-pressed="true"] .picto { color: var(--accent-light); }
html[data-style="territoire"] .filter-btn[aria-pressed="true"] .count { color: var(--dark-soft); }

html[data-style="territoire"] .tag {
  padding: 6px 13px 6px 9px;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-sm);
  background: transparent;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
html[data-style="territoire"] .tag .picto { width: 19px; height: 19px; color: var(--accent); }
html[data-style="territoire"] .tag:hover .picto { color: #fff; }
html[data-style="territoire"] .project-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  font-weight: 450;
  line-height: 1.04;
  letter-spacing: -0.022em;
}
html[data-style="territoire"] .project-text h2 { font-family: var(--font-display); font-weight: 500; letter-spacing: 0.24em; color: var(--accent); }
html[data-style="territoire"] .project-aside { padding: 28px; border-radius: var(--radius); background: var(--card); }
html[data-style="territoire"] .figure-value { font-family: var(--font-display); font-size: 2.6rem; font-weight: 400; color: var(--accent); }
html[data-style="territoire"] .figures.is-todo .figure-value { color: #d6ab8f; }
html[data-style="territoire"] .video-slot svg { fill: var(--accent); }
html[data-style="territoire"] .project-nav small { font-family: var(--font-display); letter-spacing: 0.2em; }

html[data-style="territoire"] .value { padding-top: 24px; border-top: 1px solid var(--line); }
html[data-style="territoire"] .value .picto { width: 46px; height: 46px; margin-bottom: 16px; }
html[data-style="territoire"] .value h3,
html[data-style="territoire"] .member h3 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; letter-spacing: -0.005em; }
html[data-style="territoire"] .portrait { background: var(--bg-panel) url("../img/topo-dark.cefa93a099c7.svg") center / cover no-repeat; }
html[data-style="territoire"] .chips li { border-radius: var(--radius-sm); }

html[data-style="territoire"] .field input,
html[data-style="territoire"] .field select,
html[data-style="territoire"] .field textarea { border-radius: var(--radius-sm); background: #fff; }
html[data-style="territoire"] .info-card { background: var(--dark) url("../img/topo-light.89e48cf432a7.svg") center / cover no-repeat; color: var(--dark-ink); }
html[data-style="territoire"] .info-card h2 { font-family: var(--font-display); font-size: 1.9rem; font-weight: 450; color: var(--dark-ink); }
html[data-style="territoire"] .info-list dt { font-family: var(--font-display); font-weight: 500; letter-spacing: 0.22em; color: var(--accent-light); }
html[data-style="territoire"] .info-card .todo { color: var(--dark-soft); }
/* The ochre contact band needs a gap above it */
html[data-style="territoire"] .page-main { padding-bottom: var(--section-y); }
html[data-style="territoire"] .map-ph { background-color: var(--bg); }
html[data-style="territoire"] .map-ph .pin { fill: var(--accent); }

/* ---------- Footer: charcoal band with the full logo ---------- */
html[data-style="territoire"] .site-footer { color: var(--dark-soft); }
html[data-style="territoire"] .footer-brand .logo { flex-direction: column; align-items: flex-start; gap: 18px; color: var(--dark-ink); }
html[data-style="territoire"] .footer-brand .logo-hands { height: 64px; }
html[data-style="territoire"] .footer-brand .logo-word { width: 230px; }
html[data-style="territoire"] .footer-brand .logo-sub { font-size: 0.62rem; }
html[data-style="territoire"] .footer-col h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: 0.22em; color: var(--accent-light); }
html[data-style="territoire"] .footer-grid { border-bottom-color: var(--dark-line); }
html[data-style="territoire"] .site-footer a:hover { color: var(--accent-light); }
html[data-style="territoire"] .site-footer .todo { color: var(--dark-soft); }
html[data-style="territoire"] .mockup-flag { color: var(--accent-light); }
html[data-style="territoire"]:not(.is-shot) .footer-bottom { padding-bottom: 0; }

@media (max-width: 760px) {
  html[data-style="territoire"] { --header-h: 68px; }
  html[data-style="territoire"] .site-header .logo-hands { height: 32px; }
  html[data-style="territoire"] .site-header .logo-word { width: 132px; }
  html[data-style="territoire"] .site-header .logo-sub { display: none; }
  html[data-style="territoire"] .nav { background: var(--dark); border-bottom: 0; }
  html[data-style="territoire"] .nav a.nav-cta { margin-top: 8px; }
  html[data-style="territoire"] .hero-slider { height: calc(var(--vh) * 86); min-height: 520px; }
  html[data-style="territoire"] .hero-slider::after {
    background: linear-gradient(0deg, rgba(20, 22, 17, 0.88) 0%, rgba(20, 22, 17, 0.52) 55%, rgba(20, 22, 17, 0.12) 100%);
  }
  html[data-style="territoire"] .hero-text { bottom: 72px; }
  html[data-style="territoire"] .hero-caption { display: none; }
  html[data-style="territoire"] .hero-dots { left: var(--gutter); right: auto; }
  html[data-style="territoire"] .cta-band::before { right: -30%; height: 90%; top: 78%; }
  html[data-style="territoire"] .hero-text .eyebrow { gap: 10px; font-size: 0.68rem; letter-spacing: 0.17em; }
  html[data-style="territoire"] .hero-text .eyebrow::before { width: 18px; }
  html[data-style="territoire"] .filters { gap: 8px; }
  html[data-style="territoire"] .filter-btn { gap: 8px; padding: 7px 13px 7px 10px; font-size: 0.84rem; }
  html[data-style="territoire"] .filter-btn .picto { width: 20px; height: 20px; }
}

/* =========================================================
   Identity board (identite.html): logo, palette, type, pictograms
   ========================================================= */
.board-head {
  padding: 76px 0 84px;
  background: var(--dark) url("../img/topo-light.89e48cf432a7.svg") center / cover no-repeat;
  color: var(--dark-ink);
}
.board-head-grid { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 72px; align-items: center; }
.board-lockup { display: flex; flex-direction: column; align-items: center; gap: 18px; color: var(--dark-ink); }
.board-lockup .logo-hands { height: 150px; }
.board-lockup .logo-word { width: 340px; }
.board-tagline {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--accent-light);
}
.board-tagline::before,
.board-tagline::after { content: ""; flex: none; width: 36px; height: 1.5px; background: currentColor; }
.board-baseline {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dark-soft);
}
html[data-style] .board-head .eyebrow { color: var(--accent-light); }
html[data-style] .board-head .display { margin: 0 0 22px; font-size: clamp(2.3rem, 3.9vw, 3.5rem); }
html[data-style] .board-head .display em { color: var(--accent-light); }
html[data-style] .board-head .lead { max-width: 60ch; margin: 0; color: var(--dark-soft); }

.board-section { padding: 72px 0; }
.board-section--alt { background: var(--bg-alt); }
.board-title { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: baseline; margin-bottom: 36px; }
html[data-style] .board-title .eyebrow { margin: 0; font-size: 0.9rem; }
.board-note { margin: 0; max-width: 72ch; font-size: 1.02rem; color: var(--ink-soft); }
.board-note--small { margin-top: 14px; font-size: 0.86rem; color: var(--ink-faint); }
.board-sub {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Logo */
.logo-board { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 20px; }
.lb-tile {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 270px;
  margin: 0;
  padding: 36px 28px 54px;
  overflow: hidden;
  border-radius: var(--radius);
}
.lb-tile figcaption {
  position: absolute;
  left: 18px;
  bottom: 14px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.75;
}
.lb-tile--concept { grid-row: span 2; padding: 0; background: #fcf8ee; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.lb-tile--concept img { width: 100%; height: 100%; object-fit: contain; }
.lb-tile--dark { background: var(--dark) url("../img/topo-light.89e48cf432a7.svg") center / cover no-repeat; color: var(--dark-ink); }
.lb-tile--ochre { background: var(--accent); color: var(--dark); }
.lb-tile--ochre .board-tagline { color: var(--dark-ink); }
.board-lockup--sm { gap: 14px; color: inherit; }
.board-lockup--sm .logo-hands { height: 84px; }
.board-lockup--sm .logo-word { width: 220px; }
.board-lockup--sm .board-tagline { gap: 10px; font-size: 0.58rem; letter-spacing: 0.3em; }
.board-lockup--sm .board-tagline::before,
.board-lockup--sm .board-tagline::after { width: 22px; }
.lb-tile--uses { grid-column: span 2; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 36px; background: var(--card); color: var(--ink); }
.lb-header-demo { display: flex; align-items: center; gap: 14px; padding: 18px 26px; border-radius: var(--radius-sm); background: var(--dark); color: var(--dark-ink); }
.lb-header-demo .logo-hands { height: 40px; }
.lb-hd-text { display: flex; flex-direction: column; gap: 9px; }
.lb-hd-text .board-tagline { font-size: 0.56rem; letter-spacing: 0.33em; }
.lb-hd-text .board-tagline::before,
.lb-hd-text .board-tagline::after { display: none; }
.lb-icons { display: flex; align-items: flex-end; gap: 14px; }
.lb-icon { display: grid; place-items: center; border-radius: 22%; }
.lb-icon .logo-hands { width: 80%; height: auto; }
.lb-icon--dark { width: 72px; height: 72px; background: var(--dark); color: var(--dark-ink); }
.lb-icon--light { width: 56px; height: 56px; background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.lb-icon--ochre { width: 40px; height: 40px; background: var(--accent); color: var(--dark-ink); }

/* Palette */
.swatches { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.swatch { display: flex; flex-direction: column; gap: 3px; font-size: 0.9rem; color: var(--ink-soft); }
.sw-chip { display: block; aspect-ratio: 1 / 1; margin-bottom: 14px; border-radius: var(--radius); background: var(--sw); }
.sw-chip--line { box-shadow: inset 0 0 0 1px var(--line); }
.swatch strong { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; color: var(--ink); }
.swatch code { font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.14em; color: var(--ink); }
.ratio-bar { display: flex; height: 18px; margin-top: 36px; overflow: hidden; border-radius: var(--radius-sm); box-shadow: 0 0 0 1px var(--line); }

/* Type */
.type-board { display: grid; grid-template-columns: 1.45fr 1fr; gap: 20px; }
.type-card { padding: 36px; border-radius: var(--radius); background: var(--card); }
.type-name { margin: 0 0 28px; font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; color: var(--accent); }
.type-name small { margin-left: 10px; font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); }
.type-big { margin: 0 0 18px; font-family: var(--font-display); font-size: 4.3rem; font-weight: 450; line-height: 1; letter-spacing: -0.022em; }
.type-mid { margin: 0 0 22px; font-family: var(--font-display); font-size: 1.9rem; font-weight: 450; line-height: 1.15; }
.type-mid em { font-style: normal; color: var(--accent); }
.type-label { margin: 0; font-family: var(--font-display); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); }
.type-body { font-size: 1.05rem; line-height: 1.65; color: var(--ink-soft); }
.type-alpha { margin: 0; font-size: 2.1rem; font-weight: 500; color: var(--ink); }

/* Pictograms */
.picto-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 16px; padding: 0; list-style: none; }
.picto-board--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 0; }
.picto-board li { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 30px 26px 24px; border-radius: var(--radius); background: var(--card); }
.pb-icon { margin-bottom: 20px; color: var(--accent); }
.pb-icon .picto { width: 88px; height: 88px; }
.picto-board strong { font-family: var(--font-display); font-size: 1.12rem; font-weight: 500; }
.picto-board small { font-size: 0.86rem; color: var(--ink-faint); }
.picto-uses { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 16px; margin: 0 0 48px; }
.pu { display: flex; align-items: center; justify-content: center; gap: 28px; min-height: 124px; border-radius: var(--radius); }
.pu--dark { background: var(--dark) url("../img/topo-light.89e48cf432a7.svg") center / cover no-repeat; color: var(--accent-light); }
.pu--dark .picto { width: 54px; height: 54px; }
.pu--badges { gap: 14px; background: var(--card); }
.pu-badge { display: grid; place-items: center; width: 58px; height: 58px; border-radius: var(--radius-sm); background: var(--accent); color: var(--dark-ink); }
.pu-badge .picto { width: 32px; height: 32px; }
.pu--small { gap: 24px; background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.pu--small .picto { width: 24px; height: 24px; }

/* Motifs */
.motifs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.motifs > li { display: flex; flex-direction: column; gap: 3px; font-size: 0.92rem; color: var(--ink-soft); }
.motifs strong { margin-top: 14px; font-family: var(--font-display); font-size: 1.12rem; font-weight: 500; color: var(--ink); }
.motif { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); }
.motif--topo { background: var(--dark) url("../img/topo-light.89e48cf432a7.svg") center / cover no-repeat; }
.motif--hand { background: var(--accent); }
.motif--hand::before {
  content: "";
  position: absolute;
  inset: 14% 8%;
  background: rgba(40, 14, 2, 0.2);
  -webkit-mask: url("../img/logo/hh-mains.65f70e18f98d.png") center / contain no-repeat;
  mask: url("../img/logo/hh-mains.65f70e18f98d.png") center / contain no-repeat;
  transform: rotate(-8deg);
}
.motif--tally { display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 28px; background: var(--card); }
html[data-style] .motif--tally .eyebrow { margin: 0; }
.motif--dots { display: flex; align-items: center; padding: 24px 28px; background: var(--card); }
.motif--dots ul { width: 100%; margin: 0; padding: 0; list-style: none; font-size: 0.95rem; color: var(--ink); }
.motif--dots li { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.motif--dots li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transform: translateY(-1px); }

/* Interface */
.ui-board { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; align-items: start; }
.ui-col { display: flex; flex-direction: column; gap: 22px; }
.ui-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.ui-row--dark { padding: 26px; border-radius: var(--radius); background: var(--dark); }
html[data-style] .ui-row--dark .link-arrow { color: var(--accent-light); }
.ui-filters { padding: 0; }
.ui-col .tags { margin: 0; }
.ui-card { grid-template-columns: 1fr; }

.board-foot { padding: 26px 0; background: var(--dark); color: var(--dark-soft); font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; }
.board-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

@media (max-width: 900px) {
  .board-head-grid, .board-title, .type-board, .ui-board, .picto-uses { grid-template-columns: 1fr; }
  .board-head-grid { gap: 40px; }
  .logo-board { grid-template-columns: 1fr; }
  .lb-tile--concept { grid-row: auto; }
  .lb-tile--uses { grid-column: auto; }
  .swatches, .picto-board, .picto-board--5, .motifs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .type-big { font-size: 2.8rem; }
}

/* =====================================================================
   v3: finished-site details (no placeholders left on the pages)
   ===================================================================== */

/* Projects: "show more" row under the grid */
.more-row { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: clamp(36px, 5vw, 56px); }
.more-count { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }

/* Project hero: video button */
.video-slot { border: 0; font: inherit; pointer-events: auto; cursor: pointer; }
html[data-style="territoire"] .video-slot {
  bottom: 28px;
  gap: 12px;
  padding: 7px 18px 7px 7px;
  border-radius: 999px;
  background: rgba(31, 35, 28, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dark-ink);
}
html[data-style="territoire"] .video-slot .play { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); }
html[data-style="territoire"] .video-slot .play svg { width: 14px; height: 14px; margin-left: 2px; fill: #fff; }
html[data-style="territoire"] .video-slot .dur { color: var(--accent-light); letter-spacing: 0.08em; }
html[data-style="territoire"] .video-slot:hover .play { background: var(--accent-hover); }

/* Team: one hand print per person, like a stencil on the cave wall */
html[data-style="territoire"] .portrait {
  background:
    radial-gradient(circle at 50% 54%, rgba(169, 86, 43, 0.17), rgba(169, 86, 43, 0) 56%),
    var(--bg-panel);
}
html[data-style="territoire"] .portrait .hand {
  width: 44%;
  aspect-ratio: 307 / 381;
  background: var(--accent);
  -webkit-mask: url("../img/logo/hh-mains.65f70e18f98d.png") 0 50% / 200% 100% no-repeat;
  mask: url("../img/logo/hh-mains.65f70e18f98d.png") 0 50% / 200% 100% no-repeat;
  transform: rotate(-9deg);
}
html[data-style="territoire"] .portrait .hand--r { -webkit-mask-position: 100% 50%; mask-position: 100% 50%; transform: rotate(8deg); }
html[data-style="territoire"] .portrait .hand--ink { background: var(--dark); }
html[data-style="territoire"] .portrait .hand--gold { background: #c4873a; }
html[data-style="territoire"] .member .role {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
html[data-style="territoire"] .member .bio { margin: 10px 0 0; font-size: 0.95rem; line-height: 1.55; color: var(--ink-soft); }

/* Contact: map card that reads like an embedded map */
.map-ph--live img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.map-ph--live .pin { z-index: 1; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.3)); }
.map-ph > .map-zoom {
  left: auto;
  right: 10px;
  top: 10px;
  bottom: auto;
  display: grid;
  padding: 0;
  overflow: hidden;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.map-zoom i { display: grid; place-items: center; width: 28px; height: 28px; font-style: normal; font-size: 16px; line-height: 1; color: #333; }
.map-zoom i + i { border-top: 1px solid #ddd; }
.map-ph .map-link {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 11px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  font-size: 0.72rem;
  color: #fff;
  text-decoration: none;
}

@media (max-width: 760px) {
  html[data-style="territoire"] .video-slot { right: 12px; bottom: 12px; gap: 9px; padding: 5px 14px 5px 5px; font-size: 0.64rem; }
  html[data-style="territoire"] .video-slot .play { width: 28px; height: 28px; }
}

/* Phone menu: full-screen charcoal panel, large links */
@media (max-width: 760px) {
  html[data-style="territoire"] .nav {
    height: calc(var(--vh) * 100 - var(--header-h));
    gap: 0;
    padding: 18px var(--gutter) 32px;
    overflow: hidden auto;
    background: var(--dark) url("../img/topo-light.89e48cf432a7.svg") center / cover no-repeat;
  }
  html[data-style="territoire"] .nav a:not(.nav-cta) {
    width: 100%;
    padding: 20px 0;
    border-bottom: 1px solid var(--dark-line);
    font-size: 1.45rem;
    letter-spacing: 0.14em;
  }
  html[data-style="territoire"] .nav a.nav-cta { margin-top: 30px; padding: 16px 26px; font-size: 0.95rem; }
  html[data-style="territoire"] .nav .lang-switch { margin-top: 24px; }
  html[data-style="territoire"] .nav::after {
    content: "";
    position: absolute;
    right: -24px;
    bottom: 28px;
    width: 230px;
    aspect-ratio: 614 / 381;
    background: rgba(245, 240, 229, 0.08);
    -webkit-mask: url("../img/logo/hh-mains.65f70e18f98d.png") center / contain no-repeat;
    mask: url("../img/logo/hh-mains.65f70e18f98d.png") center / contain no-repeat;
    transform: rotate(-8deg);
    pointer-events: none;
  }
}

/* ---------- v4: the agency's own pictograms, covers for projects awaiting photos ---------- */
/* Traced brush signs: filled, with a hairline outline so thin strokes hold at 17-24px */
.picto .f.b { stroke: currentColor; stroke-width: 0.35; stroke-linejoin: round; }
.tile-cover {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  color: var(--accent);
  background: var(--bg-panel) url("../img/topo-dark.cefa93a099c7.svg") center / cover no-repeat;
}
.tile-cover .picto { width: 34%; height: auto; aspect-ratio: 1; }
.tile-cover small {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.picto-board--combos strong { font-size: 0.95rem; line-height: 1.35; }

/* ---------- v5: the client's panoramas, photomontages and drawings are shown whole ---------- */
/* Wide hero (panorama, photomontage, perspective): the box takes the image's own proportions */
.project-hero.is-natural { height: auto; min-height: 0; aspect-ratio: var(--ratio); max-height: calc(var(--vh) * 82); }
/* Gallery: no crop, the image keeps its proportions */
.gallery .ratio-natural { aspect-ratio: auto; }
.gallery .ratio-natural img { height: auto; }
/* Drawings on white paper: shown on a white plate, never zoomed on hover */
.gallery .plate { box-sizing: border-box; background: #fff; }
.gallery .plate.ratio-natural { padding: clamp(10px, 2vw, 22px); }
.gallery .plate:hover img { transform: none; }
.gallery .fit-contain { box-sizing: border-box; }
