/* bertrandblanchard.com : grille typographique, un seul aplat vert */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F2F2EE;
  --ink: #111111;
  --ink-2: #3D3D3A;
  --accent: #1E4631;
  --accent-ink: #E4F0E9;
  --white: #FFFFFF;
  --gutter: clamp(16px, 3.4vw, 48px);
  --gap: clamp(16px, 1.7vw, 24px);
  --rule: 2px solid var(--ink);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-color: var(--ink) var(--paper); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1rem, .95rem + .25vw, 1.125rem);
  line-height: 1.55;
  font-kerning: normal;
  font-variant-numeric: lining-nums;
  overflow-wrap: break-word;
}
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

::selection { background: var(--accent); color: var(--white); }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: .2em; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  background: var(--ink); color: var(--white); padding: 12px 18px; font-weight: 700;
}
.skip:focus { top: 12px; }

/* ===== En-tête ===== */
.top {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 8px 32px;
  padding: 18px var(--gutter) 14px;
  border-bottom: var(--rule);
  font-weight: 600;
}
.mark { text-decoration: none; letter-spacing: .01em; }
.top ul { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; text-decoration-color: var(--accent); }

/* ===== Premier écran ===== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-rows: 1fr auto;
  min-height: min(calc(100svh - 58px), 900px);
}
.field {
  grid-row: 1 / 3;
  background: var(--accent);
  color: var(--white);
  padding: clamp(32px, 4vw, 56px) var(--gutter);
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
  container-type: inline-size;
}
.field h1 {
  font-size: clamp(2.6rem, 19.5cqi, 9rem);
  line-height: .84;
  overflow-wrap: normal;
  font-weight: 800;
  font-stretch: 64%;
  text-transform: uppercase;
  letter-spacing: -.01em;
}
.field h1 span { display: block; }
.role { font-size: clamp(1.05rem, .9rem + .5vw, 1.375rem); font-weight: 500; line-height: 1.35; }

.statement {
  padding: clamp(40px, 6vw, 96px) var(--gutter) 48px calc(var(--gutter) + 7%);
  align-self: center;
}
.accroche {
  font-size: clamp(1.9rem, 1rem + 2.8vw, 3.6rem);
  line-height: 1.05;
  font-weight: 700;
  font-stretch: 86%;
  letter-spacing: -.012em;
  max-width: 21em;
}
.context { margin-top: 28px; max-width: 36em; color: var(--ink-2); }
.actions { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--ink); color: var(--white);
  padding: 15px 22px 14px;
  font-weight: 700; text-decoration: none;
  transition: background-color .25s var(--ease);
}
.btn svg { transition: transform .3s var(--ease); }
.btn:hover { background: var(--accent); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--white); }
.actions .btn { max-width: 100%; overflow-wrap: anywhere; }
.more { font-weight: 600; }

.ledger {
  grid-column: 2;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 var(--gutter) 0 calc(var(--gutter) + 7%);
  border-top: var(--rule);
}
.ledger li { padding: 14px var(--gap) 28px 0; }
.ledger li + li { padding-left: calc(var(--gap) + 4px); }
.ledger li + li { border-left: 1px solid var(--ink); }
.ledger strong {
  display: block;
  font-size: clamp(2.2rem, 1.2rem + 2.2vw, 3rem);
  line-height: 1;
  font-weight: 800;
  font-stretch: 64%;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ledger span { display: block; margin-top: 8px; font-size: .875rem; line-height: 1.35; color: var(--ink-2); }

/* ===== Sections : titre à gauche, contenu à droite ===== */
main > section:not(.hero) {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  padding: clamp(56px, 8vw, 120px) var(--gutter) clamp(48px, 6vw, 88px);
  border-top: var(--rule);
}
main > section:not(.hero) > h2 {
  grid-column: 1 / 5;
  font-size: clamp(2rem, 1.2rem + 2.6vw, 3.6rem);
  line-height: .95;
  font-weight: 800;
  font-stretch: 64%;
  text-transform: uppercase;
  margin-bottom: 32px;
}
main > section:not(.hero) > :not(h2) { grid-column: 5 / 13; }

h3 { font-size: 1.15em; line-height: 1.25; font-weight: 700; }

/* Apport */
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.cols > div { border-top: var(--rule); padding-top: 14px; }
.cols p { margin-top: 10px; color: var(--ink-2); }
.themes { margin-top: clamp(48px, 6vw, 80px); }
.themes h3 { margin-bottom: 8px; }
.themes li {
  border-top: 1px solid var(--ink);
  padding: 12px 0;
  font-size: clamp(1.1rem, 1rem + .5vw, 1.4rem);
  font-weight: 500;
  font-stretch: 92%;
  line-height: 1.3;
}
.themes li:last-child { border-bottom: 1px solid var(--ink); }

/* Parcours : la tranche des années */
.spine li { display: grid; grid-template-columns: minmax(7rem, 2fr) minmax(0, 6fr); column-gap: var(--gap); }
.years {
  border-left: 3px solid var(--ink);
  padding: 0 0 0 14px;
  font-weight: 800;
  font-stretch: 64%;
  font-size: clamp(1.9rem, 1.3rem + 1.6vw, 2.9rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.years .to { display: block; margin-top: 6px; font-size: .875rem; font-weight: 600; font-stretch: 100%; line-height: 1.3; color: var(--ink-2); }
.spine .now .years { border-left-color: var(--accent); color: var(--accent); }
.spine .now .years .to { color: var(--accent); }
.entry { padding-bottom: clamp(32px, 4vw, 48px); }
.entry .org { margin-top: 4px; font-weight: 600; }
.entry p + p:not(.org), .entry .org + p { margin-top: 10px; }
.entry p:not(.org) { color: var(--ink-2); max-width: 42em; }
.group {
  font-size: .875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding-bottom: 10px; margin-bottom: 18px; border-bottom: var(--rule);
}
.spine + .group { margin-top: clamp(24px, 3vw, 40px); }
.formation { margin-top: clamp(24px, 3vw, 40px); }
.formation p { display: grid; grid-template-columns: minmax(7rem, 2fr) minmax(0, 6fr); column-gap: var(--gap); font-weight: 600; }
.span-years { font-variant-numeric: tabular-nums; }

/* Interventions et engagements */
.rows li {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(5.5rem, 1fr);
  column-gap: var(--gap);
  border-top: 1px solid var(--ink);
  padding: 16px 0 18px;
}
.rows li:last-child { border-bottom: 1px solid var(--ink); }
.rows h3 { font-size: 1.05em; }
.rows p { color: var(--ink-2); }
.talks .rows li:not(:has(.when)) p, .engage .rows li p { grid-column: 2 / 4; }
.rows .when { text-align: right; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Contact : le présent, en outremer */
main > section.contact {
  background: var(--accent);
  color: var(--white);
  border-top: 0;
  align-items: end;
}
main > section.contact > h2 { font-size: clamp(2.6rem, 1.4rem + 4.6vw, 6rem); }
.contact p:not(:has(.btn)) { font-size: clamp(1.15rem, 1rem + .7vw, 1.6rem); line-height: 1.35; max-width: 30em; color: var(--accent-ink); }
.contact p + p { margin-top: 28px; }
.btn-invert { background: var(--white); color: var(--accent); }
.btn-invert:hover { background: var(--ink); color: var(--white); }
.btn-ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 2px var(--white); }
.btn-ghost:hover { background: var(--white); color: var(--accent); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.contact :focus-visible { outline-color: var(--white); }
.field :focus-visible { outline-color: var(--white); }

/* ===== Pied de page ===== */
.foot {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap);
  padding: 28px var(--gutter) 40px;
  font-size: .875rem; color: var(--ink-2);
}
.sig { grid-column: 1 / 5; font-weight: 600; color: var(--ink); }
.sig p + p { margin-top: 4px; font-weight: 500; }
.legal { grid-column: 5 / 13; max-width: 52em; }
.legal h2 { font-size: 1em; font-weight: 700; color: var(--ink); }
.legal p { margin-top: 4px; }

/* ===== Page 404 ===== */
.lost { min-height: calc(100svh - 58px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.lost .field h1 { font-size: clamp(5rem, 40cqi, 12rem); }
.lost .statement p + p { margin-top: 28px; }

/* ===== Mouvement : l'aplat se découvre une fois ===== */
@media (prefers-reduced-motion: no-preference) {
  .hero .field { animation: wipe .8s var(--ease) both; }
  .hero .field > * { animation: rise .7s var(--ease) .25s both; }
  @keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ===== Tablettes ===== */
@media (max-width: 1080px) {
  .hero, .lost { grid-template-columns: 1fr; grid-template-rows: auto; min-height: 0; }
  .field { grid-row: auto; gap: 32px; }
  .field h1 { font-size: clamp(2.6rem, 19.5cqi, 8rem); }
  .statement { padding: 48px var(--gutter) 40px; }
  .ledger { grid-column: 1; margin: 0 var(--gutter); }
  main > section:not(.hero) > h2 { grid-column: 1 / -1; }
  main > section:not(.hero) > :not(h2) { grid-column: 1 / -1; }
  .sig, .legal { grid-column: 1 / -1; }
  .legal { margin-top: 12px; }
}

/* ===== Téléphones ===== */
@media (max-width: 720px) {
  .top { font-size: .9375rem; }
  .top ul { gap: 4px 16px; }
  .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger li:nth-child(3) { border-left: 0; padding-left: 0; }
  .ledger li:nth-child(n+3) { border-top: 1px solid var(--ink); }
  .cols { grid-template-columns: 1fr; gap: 32px; }
  .spine li { grid-template-columns: 1fr; }
  .years { display: flex; align-items: baseline; gap: 12px; padding-bottom: 10px; border-left: 0; border-top: 3px solid var(--ink); padding: 10px 0 8px; }
  .spine .now .years { border-top-color: var(--accent); }
  .years .to { margin-top: 0; }
  .formation p { grid-template-columns: 1fr; row-gap: 4px; }
  .rows li { grid-template-columns: 1fr; row-gap: 4px; }
  .talks .rows li:not(:has(.when)) p, .engage .rows li p { grid-column: auto; }
  .rows .when { text-align: left; }
}
.contact-actions .btn { max-width: 100%; overflow-wrap: anywhere; }
