/* design-director · critique: P4 H4 E4 S4 R5 V4 · fingerprint: hanging/two-col-asym/hairline+one-bleed-block/outlined/none-type-carries/fade-up */

:root {
  --paper: #F4F6F8;
  --bone: #E9EEF3;
  --ink: #16203A;
  --ink-soft: #46536E;
  --brand: #14213C;
  --brand-2: #1C2D50;
  --brand-3: #2C4A7C;
  --amber: #B78A33;
  --amber-bright: #D3A94A;
  --amber-deep: #8A6414;
  --text-on-brand: #E9EDF5;
  --text-on-brand-soft: #A5B1C9;
  --text-on-brand-2: #C3CCDD;
  --line: rgba(22, 32, 58, 0.14);
  --line-on-brand: rgba(233, 237, 245, 0.16);
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html, body { overflow-x: clip; }
strong { font-weight: 600; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--amber); color: var(--brand); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: var(--text-on-brand);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus-visible { left: 0.5rem; top: 0.5rem; }

.wrap {
  max-width: 76rem;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 3rem);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
  gap: 1.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}
.brand svg { flex: none; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-stretch: 110%;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  list-style: none;
}
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 160ms ease;
}
.nav-lang {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.3rem 0.55rem;
  color: var(--ink) !important;
}
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { color: var(--brand); }
  .nav-lang:hover { border-color: var(--brand); }
}
.nav-links a:focus-visible,
.brand:focus-visible {
  outline: 2px solid var(--amber-deep);
  outline-offset: 3px;
}
@media (max-width: 760px) {
  .nav-links li.nav-hide { display: none; }
}
@media (max-width: 480px) {
  .nav-inner { gap: 0.6rem; }
  .brand { gap: 0.5rem; }
  .brand-name { font-size: 0.95rem; }
  .nav-links { gap: 0.7rem; }
  .nav-lang { padding: 0.25rem 0.45rem; }
}

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

.hero { border-bottom: 1px solid var(--line); }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(3rem, 8vh, 5.5rem) 0 clamp(3rem, 8vh, 5rem);
}
.hero h1 {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 620;
  font-size: clamp(2.1rem, 4.6vw, 3.7rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
  min-width: 0;
  max-width: 24ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--brand-3);
}
.hero-sub {
  margin-top: 1.4rem;
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: 1.1rem;
}
.hero-ctas {
  margin-top: 2.2rem;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  appearance: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-display);
  font-stretch: 105%;
  font-weight: 560;
  font-size: 0.98rem;
  color: var(--brand);
  text-decoration: none;
  border: 1.5px solid var(--brand);
  border-radius: 2px;
  padding: 0.78rem 1.5rem;
  white-space: nowrap;
  transition: background 180ms ease, color 180ms ease, transform 160ms ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--brand); color: var(--text-on-brand); }
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--amber-deep); outline-offset: 3px; }

.btn-on-pine { color: var(--text-on-brand); border-color: var(--text-on-brand); }
@media (hover: hover) and (pointer: fine) {
  .btn-on-pine:hover { background: var(--text-on-brand); color: var(--brand); }
}

.link-quiet {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--amber);
  text-decoration-thickness: 1.5px;
  transition: color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .link-quiet:hover { color: var(--brand-3); }
}
.link-quiet:focus-visible { outline: 2px solid var(--amber-deep); outline-offset: 3px; }

/* Marque : poulpe Polypus */
.hero-mark {
  display: flex;
  justify-content: center;
  align-self: end;
  min-width: 0;
}
.hero-mark img {
  width: min(100%, 15rem);
  height: auto;
  margin-bottom: 0.4rem;
  mix-blend-mode: multiply;
}
.brand-mark {
  height: 2.1rem;
  width: auto;
  flex: none;
  mix-blend-mode: multiply;
}
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-mark { display: none; }
}

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

.section { padding: clamp(3.5rem, 9vh, 6.5rem) 0; }

.section-head {
  max-width: 60ch;
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
}
h2 {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 620;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.section-head p {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* Holding: two-column asymmetric */
.holding-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.holding-grid > h2 { position: sticky; top: 6rem; max-width: 14ch; }
.holding-body p + p { margin-top: 1.1rem; }
.holding-body strong { color: var(--brand); }

.timeline {
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
  list-style: none;
}
.timeline li {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line);
}
.timeline .year {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--amber-deep);
  padding-top: 0.2rem;
}
.timeline .what { color: var(--ink); }

@media (max-width: 860px) {
  .holding-grid { grid-template-columns: minmax(0, 1fr); }
  .holding-grid > h2 { position: static; }
}

/* ---------- Projects chapter (one deliberate bleed block) ---------- */

.chapter {
  background: var(--brand);
  color: var(--text-on-brand);
}
.chapter .section-head { margin-bottom: clamp(1.5rem, 4vh, 2.5rem); }
.chapter h2 { color: var(--text-on-brand); }
.chapter .section-head p { color: var(--text-on-brand-soft); }

.proj-list { border-top: 1px solid var(--line-on-brand); }

.proj { border-bottom: 1px solid var(--line-on-brand); }

.proj-head {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: baseline;
  gap: 1rem;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  color: var(--text-on-brand);
  padding: 1.4rem 0.25rem;
  font-family: inherit;
  transition: background 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .proj-head:hover { background: var(--brand-2); }
}
.proj-head:focus-visible { outline: 2px solid var(--amber-bright); outline-offset: -2px; }
.proj-head:active .proj-name { transform: scale(0.99); }

.proj-titles { min-width: 0; }
.proj-name {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 620;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  letter-spacing: -0.01em;
  display: inline-block;
  transition: transform 160ms ease-out;
  overflow-wrap: anywhere;
  min-width: 0;
}
.proj-tease {
  display: block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-on-brand-soft);
  margin-top: 0.3rem;
}
.proj-status {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--text-on-brand-2);
  white-space: nowrap;
}
.proj-mark {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  color: var(--amber-bright);
  transition: transform 240ms var(--ease-out);
}
.proj.open .proj-mark { transform: rotate(45deg); }

.proj-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms var(--ease-out);
}
.proj.open .proj-body { grid-template-rows: 1fr; }
.proj-body-inner { overflow: hidden; min-width: 0; }
.proj-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: 0.5rem 0.25rem 2.2rem;
}
.proj-lede {
  font-family: var(--font-display);
  font-stretch: 106%;
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.35;
  color: var(--text-on-brand);
  max-width: 34ch;
}
.proj-desc { margin-top: 1rem; color: var(--text-on-brand-soft); font-size: 0.99rem; }
.proj-desc + .proj-desc { margin-top: 0.8rem; }
.proj-facts { list-style: none; border-top: 1px solid var(--line-on-brand); }
.proj-facts li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-on-brand);
  color: var(--text-on-brand);
  font-size: 0.97rem;
}
.proj-holder {
  margin-top: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-on-brand-soft);
}
@media (max-width: 760px) {
  .proj-head { grid-template-columns: minmax(0, 1fr) auto; }
  .proj-status { display: none; }
  .proj-body-grid { grid-template-columns: minmax(0, 1fr); }
}
.proj-status-mobile { display: none; }
@media (max-width: 760px) {
  .proj-status-mobile {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: var(--text-on-brand-2);
    margin-bottom: 0.8rem;
  }
}

/* ---------- Partners ---------- */

.partners { list-style: none; border-top: 1px solid var(--line); }
.partners li {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 1rem;
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--line);
}
.partners .p-name {
  font-family: var(--font-display);
  font-stretch: 108%;
  font-weight: 600;
  font-size: 1.12rem;
}
.partners .p-role { color: var(--ink-soft); }
@media (max-width: 640px) {
  .partners li { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
}

/* ---------- Contact ---------- */

#contact { border-top: 1px solid var(--line); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.contact-cta { padding-top: 0.5rem; }
.contact-aud { list-style: none; margin-top: 1.5rem; }
.contact-aud li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}
.contact-aud li::before { content: "→ "; color: var(--amber-deep); }
.contact-cta { text-align: left; }
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.footer a { color: var(--ink-soft); }
.footer a:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---------- Barrière professionnel de santé ---------- */
/* z-index : nav 50 · cookies 80 · gate 90 */

.btn-solid {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--text-on-brand);
}
@media (hover: hover) and (pointer: fine) {
  .btn-solid:hover { background: var(--brand-2); border-color: var(--brand-2); color: var(--text-on-brand); }
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: color-mix(in srgb, var(--paper) 55%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.gate[hidden] { display: none; }
body.gate-locked { overflow: hidden; }

.gate-card {
  background: #FCFDFE;
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: 0 24px 60px rgba(20, 33, 60, 0.18);
  max-width: 34rem;
  width: 100%;
  padding: clamp(1.6rem, 4vw, 2.75rem);
  text-align: center;
}
.gate-card img { width: 3.4rem; height: auto; mix-blend-mode: multiply; margin-bottom: 1rem; }
.gate-card h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.gate-sub { margin-top: 0.7rem; color: var(--ink-soft); }
.gate-actions {
  margin-top: 1.7rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.8rem;
}
.gate-actions .btn { white-space: normal; }
.gate-denied p { margin-top: 0.7rem; color: var(--ink-soft); }

/* ---------- Bannière cookies ---------- */

.cookies {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  background: var(--brand);
  color: var(--text-on-brand);
  box-shadow: 0 -10px 30px rgba(20, 33, 60, 0.25);
}
.cookies[hidden] { display: none; }
.cookies-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  padding: 1rem 0;
}
.cookies p { font-size: 0.93rem; max-width: 62ch; color: var(--text-on-brand-2); }
.cookies-actions { display: flex; gap: 0.7rem; flex: none; }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.9rem; }
.btn-on-brand { color: var(--text-on-brand); border-color: var(--text-on-brand); }
@media (hover: hover) and (pointer: fine) {
  .btn-on-brand:hover { background: var(--text-on-brand); color: var(--brand); }
}
.btn-accept { background: var(--text-on-brand); border-color: var(--text-on-brand); color: var(--brand); }
@media (hover: hover) and (pointer: fine) {
  .btn-accept:hover { background: var(--bone); border-color: var(--bone); color: var(--brand); }
}
.cookies .btn:focus-visible,
.gate .btn:focus-visible { outline: 2px solid var(--amber-bright); outline-offset: 3px; }
.gate .btn:focus-visible { outline-color: var(--amber-deep); }

/* ---------- Reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
  }
  .reveal.in { opacity: 1; transform: none; }
}
