/* tools.undust.co — index ombrelle.
   Concept : document d'ingénierie maîtrisé — cartouche de plan, registre d'outils.
   Typo : Titillium Web (display, marque undust) + JetBrains Mono (références). */

/* ===== Fonts (auto-hébergées, copiées d'undust--hugo, SIL OFL) ===== */
@font-face {
  font-family: 'Titillium Web'; font-style: normal; font-weight: 300; font-display: swap;
  src: url('/fonts/titillium-300-latin.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: 'Titillium Web'; font-style: normal; font-weight: 300; font-display: swap;
  src: url('/fonts/titillium-300-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Titillium Web'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/fonts/titillium-600-latin.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: 'Titillium Web'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/fonts/titillium-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Titillium Web'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/fonts/titillium-700-latin.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: 'Titillium Web'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/fonts/titillium-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/fonts/jetbrains-400-latin.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-style: normal; font-weight: 400; font-display: swap;
  src: url('/fonts/jetbrains-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/fonts/jetbrains-500-latin.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-style: normal; font-weight: 500; font-display: swap;
  src: url('/fonts/jetbrains-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ===== Tokens ===== */
:root {
  --paper:       #F4F4F0;
  --ink:         #17191C;
  --muted:       #565B61;
  --line:        #C8C8C0;
  --line-strong: #17191C;
  --accent:      #E85A26; /* orange marque undust — grands éléments seulement */
  --accent-text: #B8430F; /* variante AA pour texte sur papier */

  --font-display: 'Titillium Web', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;

  --max-w: 68rem;
  --pad-x: clamp(1.25rem, 4vw, 3rem);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  /* Papier millimétré, très discret */
  background-image:
    linear-gradient(to right, rgba(23, 25, 28, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(23, 25, 28, 0.045) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--ink); }
a:focus-visible, .registre-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* ===== Cartouche (en-tête + pied) ===== */
.cartouche {
  max-width: var(--max-w);
  margin: clamp(1rem, 3vw, 2rem) auto 0;
  border: 1.5px solid var(--line-strong);
  background: var(--paper);
  display: flex;
  flex-wrap: wrap;
}

.cartouche-cell {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem 1rem 0.55rem;
  border-right: 1px solid var(--line-strong);
  min-width: 0;
}
.cartouche-cell:last-child { border-right: none; }

.cartouche-brand {
  flex: 1 1 auto;
  justify-content: center;
}

.wordmark {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.wordmark-dim { color: var(--muted); font-weight: 400; }

.cart-label {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.cart-value {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.stamp-inline {
  color: var(--accent-text);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cartouche-footer {
  margin: 0 auto clamp(1.5rem, 4vw, 3rem);
  flex-direction: column;
}
.cartouche-footer .cartouche-cell {
  border-right: none;
  border-bottom: 1px solid var(--line-strong);
  flex-direction: row;
  align-items: baseline;
  gap: 1rem;
}
.cartouche-footer .cartouche-cell:last-child { border-bottom: none; }
.cartouche-footer .cart-label { flex: 0 0 5.5rem; }
.cartouche-footer .cart-value { font-size: 0.78rem; line-height: 1.5; }

/* ===== Hero ===== */
.hero {
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(2.5rem, 6vw, 4rem);
  max-width: 46rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-text);
  margin-bottom: 1.25rem;
}

h1 {
  font-weight: 700;
  font-size: clamp(2.1rem, 5.4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.lede {
  font-size: clamp(1.0625rem, 1.9vw, 1.1875rem);
  line-height: 1.65;
  color: var(--muted);
  max-width: 42rem;
}

/* ===== Registre ===== */
.registre { padding-bottom: clamp(2.5rem, 6vw, 4rem); }

.registre-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  border-bottom: 1.5px solid var(--line-strong);
  padding-bottom: 0.75rem;
  margin-bottom: 0;
}

h2 {
  font-weight: 600;
  font-size: 1.375rem;
  letter-spacing: -0.005em;
}

.registre-note {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.registre-list { list-style: none; }

.registre-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr auto;
  gap: 1.5rem;
  align-items: start;
  padding: 1.35rem 0.25rem;
  border-bottom: 1px solid var(--line);
}
.registre-row:hover { background: rgba(23, 25, 28, 0.025); }

.ref {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink);
  padding-top: 0.2rem;
}

.designation h3 {
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.3;
  margin-bottom: 0.3rem;
}

.designation p {
  font-size: 0.9375rem;
  color: var(--muted);
  max-width: 36rem;
}

/* Tampon « en construction » */
.stamp {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-text);
  border: 1.5px solid currentColor;
  padding: 0.3rem 0.55rem;
  white-space: nowrap;
  transform: rotate(-2deg);
  justify-self: end;
  margin-top: 0.15rem;
}

/* ===== Engagements ===== */
.engagements {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  border-top: 1.5px solid var(--line-strong);
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.engagement h3 {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.engagement p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ===== Reveal discret au chargement ===== */
@media (prefers-reduced-motion: no-preference) {
  .hero, .registre, .engagements {
    animation: rise 0.5s ease-out backwards;
  }
  .registre { animation-delay: 0.08s; }
  .engagements { animation-delay: 0.16s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
  }
}

/* ===== Responsive ===== */
@media (max-width: 760px) {
  .cartouche { flex-direction: column; }
  .cartouche-cell {
    border-right: none;
    border-bottom: 1px solid var(--line-strong);
    flex-direction: row;
    align-items: baseline;
    gap: 0.75rem;
  }
  .cartouche-cell:last-child { border-bottom: none; }
  .cart-label { flex: 0 0 5.5rem; }
  .cartouche-brand { justify-content: flex-start; padding: 0.75rem 1rem; }

  .registre-row {
    grid-template-columns: 1fr auto;
    gap: 0.5rem 1rem;
  }
  .ref { grid-column: 1; padding-top: 0; }
  .stamp { grid-column: 2; grid-row: 1; }
  .designation { grid-column: 1 / -1; }

  .engagements { grid-template-columns: 1fr; }
}
