/* TLabs : planche d'architecte.
   Vélin froid, encre bleu nuit, un seul rouge de correction. */

/* Polices auto-hébergées (sous-ensemble latin). */
@font-face {
  font-family: "Barlow";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/barlow-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Barlow";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/barlow-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Barlow";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/barlow-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Barlow Condensed";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/barlow-condensed-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Barlow Condensed";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/barlow-condensed-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Barlow Condensed";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/barlow-condensed-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --vellum: #edf0f4;
  --paper: #f8fafc;
  --ink: #0e1b3a;
  --ink-soft: #44506b;
  --line: rgba(14, 27, 58, 0.3);
  --hair: rgba(14, 27, 58, 0.14);
  --cyan: #00e5ff;

  --f-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-text: "Barlow", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  scrollbar-color: var(--ink) var(--vellum);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--vellum);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--f-text);
  -webkit-font-smoothing: antialiased;
}

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

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

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--ink);
  color: #fff;
}

::selection {
  background: var(--cyan);
  color: var(--ink);
}

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

.night :focus-visible {
  outline-color: var(--cyan);
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono {
  font: 400 0.75rem/1.5 var(--f-mono);
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 30;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* Titres */

h1,
h2,
h3 {
  font-family: var(--f-display);
  font-weight: 700;
  text-transform: uppercase;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2.2rem, 4.6vw, 4rem);
  line-height: 0.98;
  letter-spacing: 0.005em;
}

h3 {
  font-size: 1.5rem;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

/* Règle verticale */

.ruler {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 5;
  width: 26px;
  border-right: 1px solid var(--line);
  background-image:
    repeating-linear-gradient(to bottom, rgba(14, 27, 58, 0.35) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(to bottom, rgba(14, 27, 58, 0.75) 0 1px, transparent 1px 40px);
  background-size: 6px 100%, 14px 100%;
  background-repeat: no-repeat;
  pointer-events: none;
}

.ruler-mark {
  position: absolute;
  left: 0;
  top: calc(var(--p, 0) * (100% - 3px));
  width: 26px;
  height: 3px;
  background: var(--cyan);
}

@media (max-width: 1199px) {
  .ruler {
    display: none;
  }
}

/* En-tête */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--vellum);
  border-bottom: 1px solid var(--line);
}

.topbar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
}

.brand-name {
  font: 700 1.75rem/1 var(--f-display);
  letter-spacing: 0.01em;
}

.nav {
  display: flex;
  gap: 32px;
  margin-left: auto;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav a {
  text-decoration: none;
  padding-block: 4px;
  background: linear-gradient(var(--cyan), var(--cyan)) left bottom / 0 2px no-repeat;
  transition: background-size 0.4s var(--ease);
}

.nav a:hover {
  background-size: 100% 2px;
}

/* Boutons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 13px 22px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: 600 0.95rem/1.2 var(--f-text);
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.btn-ghost {
  padding: 9px 18px;
}

.btn-ghost:hover {
  background: var(--ink);
  color: #fff;
}

.btn-cta {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink);
}

.btn-cta:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cyan);
}

.arrow {
  position: relative;
  width: 20px;
  height: 1px;
  background: currentColor;
  transition: transform 0.4s var(--ease);
}

.arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 7px;
  height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
  transform-origin: 100% 0;
}

.btn:hover .arrow {
  transform: translateX(5px);
}

.textlink {
  font-weight: 500;
  font-size: 0.95rem;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.textlink:hover {
  text-decoration-color: var(--cyan);
  text-decoration-thickness: 3px;
}

/* Lignes de cote */

.cote {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 0.75rem/1 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.4s var(--ease);
}

.cote b {
  font-weight: 500;
  white-space: nowrap;
}

.cote-l,
.cote-r {
  position: relative;
  flex: 1;
  height: 1px;
  background: currentColor;
}

.cote-l::before,
.cote-r::before {
  content: "";
  position: absolute;
  top: -3px;
  width: 7px;
  height: 7px;
  border-left: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}

.cote-l::before {
  left: 0;
  transform: translateX(2px) rotate(45deg);
}

.cote-r::before {
  right: 0;
  transform: translateX(-2px) rotate(-135deg);
}

/* Planche d'accueil */

.hero {
  padding-block: 34px 56px;
  background-image:
    linear-gradient(rgba(14, 27, 58, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 27, 58, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
}

.sheet {
  position: relative;
  margin-top: 8px;
  padding: clamp(18px, 3vw, 36px);
  border: 1px solid var(--ink);
  background: var(--paper);
}

.sheet::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid var(--hair);
  pointer-events: none;
}

.sheet > * {
  position: relative;
  z-index: 1;
}

.sheet-head {
  display: grid;
  grid-template-columns: minmax(0, 9fr) minmax(0, 4fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: end;
  margin-bottom: clamp(24px, 4.5vh, 44px);
}

.sheet-head h1 {
  font-size: clamp(2.3rem, 4.8vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: 0.005em;
}

.sheet-head h1 span {
  font-weight: 500;
  color: var(--ink-soft);
}

.lead {
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.55;
}

.layers {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.layer {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  min-height: clamp(200px, 31vh, 300px);
  margin: 0 0 0 -1px;
  padding: 14px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

.layer:first-child {
  margin-left: 0;
}

.layer:focus-visible {
  position: relative;
  z-index: 2;
}

.layer.is-active {
  background: var(--ink);
  color: #fff;
}

.layer .cote {
  color: var(--ink-soft);
}

.layer.is-active .cote {
  color: var(--cyan);
}

.layer.is-active .cote b {
  color: #fff;
}

.glyph {
  align-self: center;
  width: 100%;
  max-height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tags {
  font: 400 0.75rem/1.4 var(--f-mono);
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  transition: color 0.5s var(--ease);
}

.layer.is-active .tags {
  color: rgba(255, 255, 255, 0.78);
}

.overall {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-block: 14px 22px;
  font: 400 0.75rem/1 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Cartouche */

.titleblock {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 3fr) auto;
  border: 1px solid var(--ink);
  background: var(--paper);
}

.tb-cell {
  padding: 14px 20px 16px;
  border-left: 1px solid var(--ink);
}

.tb-cell:first-child {
  border-left: 0;
}

.tb-label {
  display: block;
  margin-bottom: 4px;
  font: 400 0.75rem/1.4 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.tb-cell strong {
  display: block;
  font: 700 1.7rem/1.05 var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.tb-cell p {
  max-width: 62ch;
  font-size: 0.98rem;
  line-height: 1.5;
}

.tb-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  padding-block: 14px;
}

.js #layer-text,
.js #layer-name {
  transition: opacity 0.25s var(--ease);
}

.is-swapping #layer-text,
.is-swapping #layer-name {
  opacity: 0;
}

/* Bandes de contenu */

.band {
  padding-block: clamp(64px, 10vw, 128px);
  border-top: 1px solid var(--line);
}

.band-tight {
  padding-top: clamp(56px, 8vw, 96px);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 40px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head p {
  max-width: 46ch;
  color: var(--ink-soft);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.split-head {
  position: sticky;
  top: 100px;
}

.split-head p {
  margin-top: 20px;
  max-width: 36ch;
  color: var(--ink-soft);
}

.bom {
  border-bottom: 1px solid var(--ink);
}

.bom-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 2.2fr);
  gap: 6px 28px;
  padding: 24px 0;
  border-top: 1px solid var(--ink);
}

.bom-row::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 3px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}

.bom-row:hover::before {
  transform: scaleX(1);
}

.bom-row h3 {
  grid-row: span 2;
}

.bom-row p {
  max-width: 56ch;
  color: var(--ink-soft);
}

.bom-row .mono {
  grid-column: 2;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }

  .split-head {
    position: static;
  }
}

@media (max-width: 560px) {
  .bom-row {
    grid-template-columns: 1fr;
  }

  .bom-row h3 {
    grid-row: auto;
  }

  .bom-row .mono {
    grid-column: 1;
  }
}

/* Références */

.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  font: 400 0.75rem/1 var(--f-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.swatch {
  display: inline-block;
  width: 26px;
  border-top: 2px solid var(--ink);
}

.swatch-hair {
  border-top: 1px solid var(--line);
}

.sheets {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.refsheet {
  display: grid;
  gap: 14px;
  padding: 26px 28px 24px;
  border: 1px solid var(--ink);
  background: var(--paper);
}

.refsheet header {
  display: grid;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
}

.refsheet h3 {
  font-size: 1.9rem;
}

.ref-a {
  grid-column: span 8;
}

.ref-a h3 {
  font-size: 2.6rem;
}

.ref-b {
  grid-column: span 4;
}

.ref-c {
  grid-column: span 5;
}

.ref-d {
  grid-column: span 7;
}

.refsheet.is-hair {
  border-color: var(--line);
  background: transparent;
}

.refsheet.is-hair header {
  border-bottom-color: var(--line);
}

.ref-lead {
  color: var(--ink-soft);
}

.ticks li {
  position: relative;
  padding: 3px 0 3px 22px;
  font-size: 0.98rem;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95em;
  width: 11px;
  height: 1px;
  background: var(--ink);
}

.ext {
  width: fit-content;
  text-underline-offset: 3px;
}

.ext:hover {
  text-decoration-color: var(--cyan);
  text-decoration-thickness: 2px;
}

@media (max-width: 1000px) {
  .ref-a,
  .ref-b,
  .ref-c,
  .ref-d {
    grid-column: 1 / -1;
  }
}

/* Méthode */

.phases {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0 28px;
  padding-top: 44px;
}

.phases::before,
.phases::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}

.phases::after {
  top: 11px;
  height: 3px;
  background: var(--cyan);
  transform: scaleX(var(--m, 0));
  transform-origin: left;
}

.phase {
  position: relative;
}

.phase-dot {
  position: absolute;
  top: -37px;
  left: 0;
  width: 9px;
  height: 9px;
  border: 1px solid var(--ink);
  background: var(--vellum);
  transition: background-color 0.5s var(--ease);
}

.phase.in .phase-dot {
  background: var(--ink);
}

.phase h3 {
  margin-bottom: 8px;
}

.phase p {
  font-size: 0.97rem;
  color: var(--ink-soft);
  max-width: 28ch;
}

@media (max-width: 900px) {
  .phases {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 0 0 0 30px;
  }

  .phases::before,
  .phases::after {
    top: 0;
    bottom: 0;
    left: 4px;
    right: auto;
    width: 1px;
    height: auto;
  }

  .phases::after {
    left: 3px;
    width: 3px;
    transform: scaleY(var(--m, 0));
    transform-origin: top;
  }

  .phase-dot {
    top: 8px;
    left: -30px;
  }

  .phase p {
    max-width: 52ch;
  }
}

/* Planche inversée : outils */

.night {
  padding-block: clamp(64px, 10vw, 128px);
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  color: #fff;
}

.night .section-head p {
  color: rgba(255, 255, 255, 0.74);
}

/* Contact */

.close {
  padding-block: clamp(72px, 11vw, 144px) clamp(56px, 8vw, 96px);
}

.close h2 {
  max-width: 14ch;
  font-size: clamp(2.6rem, 7.4vw, 6rem);
  line-height: 0.94;
}

.titleblock-close {
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(0, 3fr) auto;
  margin-top: clamp(36px, 6vw, 64px);
}

/* Pied de page */

/* Adaptation */

@media (max-width: 1000px) {
  .sheet-head {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .titleblock,
  .titleblock-close {
    grid-template-columns: 1fr 1fr;
  }

  .tb-wide {
    grid-column: 1 / -1;
    grid-row: 2;
    border-left: 0;
    border-top: 1px solid var(--ink);
  }

  .tb-cta {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px 24px;
    border-left: 0;
    border-top: 1px solid var(--ink);
  }

  .titleblock-close .tb-wide {
    grid-row: 2;
  }
}

@media (max-width: 760px) {
  .hero {
    padding-top: 22px;
  }

  .layers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .layer {
    min-height: 168px;
  }

  .layer:nth-child(odd) {
    margin-left: 0;
  }

  .layer:nth-child(n + 3) {
    margin-top: -1px;
  }

  .layer:last-child {
    grid-column: 1 / -1;
    min-height: 130px;
  }

  .layer:last-child .glyph {
    max-height: 70px;
  }

  .tb-cell strong {
    font-size: 1.5rem;
  }
}

@media (max-width: 420px) {
  .titleblock,
  .titleblock-close {
    grid-template-columns: 1fr;
  }

  .tb-cell {
    border-left: 0;
    border-top: 1px solid var(--ink);
  }

  .tb-cell:first-child {
    border-top: 0;
  }

  .titleblock-close .tb-wide {
    grid-row: auto;
  }

  .btn-cta {
    width: 100%;
    justify-content: space-between;
  }

  .refsheet {
    padding: 20px 18px;
  }

  .ref-a h3 {
    font-size: 2.1rem;
  }
}

/* Mouvement */

.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0ms);
}

.reveal-ready .section-head[data-reveal],
.reveal-ready .split-head[data-reveal],
.reveal-ready h2[data-reveal] {
  transform: translateY(32px);
  transition-duration: 1.1s;
}

.reveal-ready [data-reveal].in {
  opacity: 1;
  transform: none;
}

@keyframes draw {
  from {
    stroke-dashoffset: 1;
  }
}

/* L'état « non tracé » n'existe que dans l'animation : sans elle, les traits restent visibles. */
.js .glyph * {
  stroke-dasharray: 1;
  animation: draw 1.5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 120ms + 250ms);
}

.layer:nth-child(2) .glyph * {
  --i: 1;
}

.layer:nth-child(3) .glyph * {
  --i: 2;
}

.layer:nth-child(4) .glyph * {
  --i: 3;
}

.layer:nth-child(5) .glyph * {
  --i: 4;
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal-ready [data-reveal],
  .reveal-ready .section-head[data-reveal],
  .reveal-ready .split-head[data-reveal],
  .reveal-ready h2[data-reveal] {
    opacity: 1;
    transform: none;
  }

  .js .glyph * {
    stroke-dashoffset: 0;
  }
}

/* Descripteurs de secteur : texte courant, donc Barlow */

.sector {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

/* Pile technique : nomenclature réglée sur la planche inversée */

.nomen {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 5vw, 80px);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
}

.nomen-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.chip {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  background: #fff;
}

.chip img {
  width: 34px;
  height: 34px;
}

.nomen-row strong {
  font: 700 1.6rem/1 var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.nomen-note {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  text-align: right;
}

@media (max-width: 900px) {
  .nomen {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .nomen-row {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 4px 16px;
  }

  .nomen-note {
    grid-column: 2;
    text-align: left;
  }
}

/* Pied de page : cartouche de révision */

/* Hachure de coupe sur les plaques des références nommées */

.refsheet:not(.is-hair)::before {
  content: "";
  display: block;
  height: 10px;
  margin: -26px -28px 0;
  background: repeating-linear-gradient(135deg, var(--ink) 0 1px, transparent 1px 7px);
  border-bottom: 1px solid var(--ink);
}

@media (max-width: 420px) {
  .refsheet:not(.is-hair)::before {
    margin: -20px -18px 0;
  }
}

/* Entrées variées : lignes qui glissent, plaques qui montent */

.reveal-ready .bom-row[data-reveal] {
  transform: translateX(-20px);
}

.reveal-ready .refsheet[data-reveal] {
  transform: translateY(28px);
}

.reveal-ready .bom-row[data-reveal].in,
.reveal-ready .refsheet[data-reveal].in {
  transform: none;
}

/* Cibles tactiles */

@media (pointer: coarse) {
  .textlink,
  .foot a,
  .ext {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* Mobile : lien de contact rouge dès le premier écran, navigation en rangée défilante */

@media (max-width: 760px) {
  .topbar-in {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .topbar .btn-ghost {
    background: var(--cyan);
    border-color: var(--cyan);
    color: var(--ink);
  }

  .nav {
    display: flex;
    order: 3;
    width: 100%;
    margin: 0;
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 4px;
    font-size: 0.9rem;
    white-space: nowrap;
  }
}

/* Planche : cadre à double trait, repères de zone et cartouche d'angle (Expertises, Méthode) */

.plate {
  position: relative;
  padding: clamp(28px, 4vw, 56px) clamp(20px, 4vw, 56px) clamp(64px, 7vw, 84px);
  border: 1px solid var(--ink);
  background: var(--paper);
}

.plate::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid var(--hair);
  pointer-events: none;
}

.plate > * {
  position: relative;
  z-index: 1;
}

.plate-tag {
  position: absolute !important;
  right: -1px;
  bottom: -1px;
  margin: 0;
  padding: 8px 20px 10px;
  border: 1px solid var(--ink);
  background: var(--paper);
}

.plate-tag strong {
  display: block;
  font: 700 1.3rem/1.05 var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.plate .phase-dot {
  background: var(--paper);
}

.plate .section-head {
  margin-bottom: clamp(28px, 4vw, 48px);
}

@media (max-width: 420px) {
  .plate {
    padding-inline: 16px;
  }
}

/* Pile : filet cyan sur la planche inversée */

.nomen {
  border-top: 3px solid var(--cyan);
}

/* Mentions légales */

.legal-page {
  padding-block: clamp(40px, 7vw, 88px);
}

.legal {
  display: grid;
  gap: 32px;
}

.legal h1 {
  font-size: clamp(2.2rem, 4.6vw, 4rem);
  line-height: 0.98;
}

.legal h2 {
  margin-bottom: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--ink);
  font-size: 1.6rem;
  line-height: 1.05;
}

.legal p {
  max-width: 72ch;
  margin-top: 10px;
  color: var(--ink-soft);
}

.legal a {
  color: var(--ink);
  text-underline-offset: 4px;
}

.legal a:hover {
  text-decoration-color: var(--cyan);
  text-decoration-thickness: 3px;
}

.legal-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 3fr);
  gap: 4px 24px;
  padding: 8px 0;
  border-bottom: 1px solid var(--hair);
}

.legal dt {
  font: 400 0.75rem/1.6 var(--f-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.legal dd {
  margin: 0;
}

@media (max-width: 560px) {
  .legal-row {
    grid-template-columns: 1fr;
  }
}

/* Pied de page : bande encre, trois colonnes, ligne de copyright */

.foot {
  padding-block: clamp(44px, 6vw, 72px) 28px;
  background: var(--ink);
  color: #fff;
  font-size: 0.95rem;
}

.foot :focus-visible {
  outline-color: var(--cyan);
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
  gap: 36px clamp(24px, 5vw, 72px);
}

.foot-brand {
  display: grid;
  gap: 14px;
  align-content: start;
}

.foot .brand-mark {
  stroke: #fff;
}

.foot-brand p {
  max-width: 34ch;
  color: rgba(255, 255, 255, 0.78);
}

.foot-title {
  margin-bottom: 10px;
  font: 400 0.75rem/1.4 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.foot ul {
  display: grid;
  gap: 2px;
}

.foot a:not(.brand) {
  display: inline-block;
  padding-block: 5px;
  text-decoration: none;
  background: linear-gradient(var(--cyan), var(--cyan)) left bottom / 0 2px no-repeat;
  transition: background-size 0.4s var(--ease);
}

.foot a:not(.brand):hover {
  background-size: 100% 2px;
}

.foot-bottom {
  margin-top: clamp(32px, 5vw, 56px);
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

@media (max-width: 760px) {
  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foot-brand {
    grid-column: 1 / -1;
  }
}
