/* ---------------------------------------------------------------
   ordalie.fr — Julien Levesque
   Une page, deux langues, aucune dépendance.
   --------------------------------------------------------------- */

@font-face {
  font-family: 'Archivo';
  src: url('assets/fonts/archivo-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-stretch: 75% 125%;
  font-display: swap;
  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+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  src: url('assets/fonts/archivo-latin-ext.woff2') format('woff2');
  font-weight: 400 700;
  font-stretch: 75% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+2113, U+2C60-2C7F;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('assets/fonts/sourceserif4-latin.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
  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+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('assets/fonts/sourceserif4-latin-ext.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+2113, U+2C60-2C7F;
}

/* --- tokens ---------------------------------------------------- */

:root {
  color-scheme: light dark;

  --paper:      #EFEFE9;
  --paper-sunk: #E5E5DD;
  --ink:        #16202B;
  --ink-soft:   #55606C;
  --ink-faint:  #636B73;
  --rule:       #D2D3C9;
  --rule-faint: #E1E2D9;
  --link:       #2C5C8A;

  --k-field:  #4C7A5E;
  --k-editor: #2F5D8A;
  --k-teach:  #A07634;
  --k-found:  #8C4550;

  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Source Serif 4', Charter, 'Bitstream Charter', Georgia, serif;

  --gut: clamp(1.25rem, 5vw, 5rem);
  --hero-pt: clamp(2.75rem, 8vh, 5rem);
  --hero-pb: clamp(2.5rem, 6vh, 4rem);
  --measure: 34rem;
  --rail-w: clamp(9rem, 16vw, 14rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #11161C;
    --paper-sunk: #181E26;
    --ink:        #E3E6E1;
    --ink-soft:   #9AA3AC;
    --ink-faint:  #757E88;
    --rule:       #29313A;
    --rule-faint: #1E252D;
    --link:       #7FAEDC;

    --k-field:  #74B08C;
    --k-editor: #6FA3D6;
    --k-teach:  #CFA45F;
    --k-found:  #D18B94;
  }
}

/* --- base ------------------------------------------------------ */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.62;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, dt {
  font-family: var(--sans);
  font-weight: 600;
  font-stretch: 105%;
  letter-spacing: -0.015em;
  line-height: 1.14;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0; }

/* --- header ---------------------------------------------------- */

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 2rem;
  padding: 1.5rem var(--gut) 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  font-family: var(--sans);
  text-decoration: none;
  color: inherit;
  margin-right: auto;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.wordmark-name { font-weight: 600; font-stretch: 112%; letter-spacing: -0.01em; }
.wordmark-role { color: var(--ink-faint); font-size: 0.875rem; }

.nav {
  font-family: var(--sans);
  font-size: 0.9375rem;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a[aria-current='true'] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.lang { display: flex; font-family: var(--sans); font-size: 0.8125rem; }
.lang-btn {
  appearance: none;
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink-faint);
  font: inherit;
  padding: 0.22rem 0.6rem;
  cursor: pointer;
}
.lang-btn + .lang-btn { border-left: 0; }
.lang-btn:hover { color: var(--ink); }
.lang-btn[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* --- hero ------------------------------------------------------ */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(12rem, 24vw, 19rem);
  align-items: stretch;
  gap: clamp(1.75rem, 5vw, 4.5rem);
  padding: var(--hero-pt) var(--gut) var(--hero-pb);
  border-bottom: 1px solid var(--rule);
  min-height: min(30rem, 62vh);
}

.hero-text { align-self: center; }

.hero-portrait {
  margin: calc(-1 * var(--hero-pt)) calc(-1 * var(--gut)) calc(-1 * var(--hero-pb)) 0;
  background: var(--paper-sunk);
  border-left: 1px solid var(--rule);
  overflow: hidden;
}
.hero-portrait picture { display: block; height: 100%; }
.hero-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 14%;
}

.hero-eyebrow {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--ink-faint);
  margin-bottom: 1.1rem;
}

.hero-title {
  font-size: clamp(2.15rem, 5.6vw, 4.1rem);
  font-weight: 700;
  font-stretch: 96%;
  letter-spacing: -0.028em;
  line-height: 1.03;
  max-width: 14ch;
  margin-bottom: 0;
}

.hero-body { max-width: var(--measure); margin-top: clamp(1.5rem, 3.5vw, 2.25rem); }
.hero-body p { color: var(--ink-soft); }
.hero-body p:first-child { color: var(--ink); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 1.75rem;
}

.action {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--ink);
}
.action:hover { background: var(--link); border-color: var(--link); }

.action-quiet {
  background: none;
  color: var(--ink);
  border-color: var(--rule);
}
.action-quiet:hover { background: none; color: var(--link); border-color: var(--link); }

/* --- sections -------------------------------------------------- */

.section-head { margin-bottom: clamp(1.75rem, 4vw, 2.5rem); }
.section-head h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  font-stretch: 100%;
}
.section-lede {
  max-width: var(--measure);
  color: var(--ink-soft);
  margin-top: 0.9rem;
}

.trace-section, .practice, .contact {
  padding: clamp(3rem, 8vh, 5.5rem) var(--gut);
  border-bottom: 1px solid var(--rule);
}

/* --- trace ----------------------------------------------------- */

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin-bottom: 1.75rem;
}
.legend span { display: inline-flex; align-items: center; gap: 0.45rem; }
.legend i {
  width: 1.6rem;
  height: 0.5rem;
  border-radius: 1px;
  background: var(--c);
  flex: none;
}

.trace { position: relative; }

.axis {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 1.9rem;
  margin-left: var(--rail-w);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.tick {
  position: absolute;
  top: 0;
  bottom: 0;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-faint);
  padding-left: 0.35rem;
  border-left: 1px solid var(--rule);
  font-variant-numeric: tabular-nums;
}

.spans { list-style: none; margin: 0; padding: 0; position: relative; z-index: 1; }

.grid-lines {
  position: absolute;
  z-index: 0;
  left: var(--rail-w);
  right: 0;
  top: 1.9rem;
  bottom: 0;
  pointer-events: none;
}
.grid-lines i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--rule-faint);
}

.span { border-bottom: 1px solid var(--rule-faint); }

.span-row {
  display: grid;
  grid-template-columns: var(--rail-w) 1fr;
  align-items: center;
  width: 100%;
  min-height: 3.35rem;
  padding: 0.55rem 0;
  gap: 0 0.75rem;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;
}
.span-row:hover .span-org { color: var(--link); }
.span-row[disabled] { cursor: default; }

.span-label { padding-right: 0.5rem; min-width: 0; }
.span-org {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  font-stretch: 100%;
  line-height: 1.2;
  display: block;
}
.span-org img {
  width: 1em;
  height: 1em;
  vertical-align: -0.14em;
  margin-right: 0.4em;
}
.span-role {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  line-height: 1.3;
  display: block;
  margin-top: 0.12rem;
}

.span-dates { display: none; font-variant-numeric: tabular-nums; }

.span-track { position: relative; height: 1.55rem; }

.bar {
  position: absolute;
  top: 0.3rem;
  height: 0.95rem;
  min-width: 4px;
  background: var(--c);
  border-radius: 2px;
  transform-origin: left center;
}
.bar-open .bar { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }

.bar-live::after {
  content: '';
  position: absolute;
  top: 0;
  right: -0.55rem;
  bottom: 0;
  width: 0.55rem;
  background: linear-gradient(to right, var(--c), transparent);
  border-radius: 0 2px 2px 0;
}

.span-meta {
  position: absolute;
  top: 0.34rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-faint);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  line-height: 0.95rem;
}

.animate .bar { transform: scaleX(0); }
.animate.drawn .bar {
  transform: scaleX(1);
  transition: transform 520ms cubic-bezier(0.22, 0.9, 0.3, 1);
  transition-delay: var(--d, 0ms);
}
.animate .span-meta { opacity: 0; }
.animate.drawn .span-meta {
  opacity: 1;
  transition: opacity 300ms ease;
  transition-delay: calc(var(--d, 0ms) + 300ms);
}

.span-detail {
  background: var(--paper-sunk);
  margin: 0 0 0.65rem;
  padding: 1.15rem 1.35rem 1.25rem;
  border-left: 3px solid var(--c);
}
.span-detail > p:first-child {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin-bottom: 0.8rem;
}
.span-detail ul {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 60rem;
}
.span-detail li {
  padding-left: 1.1rem;
  position: relative;
  margin-bottom: 0.55rem;
  color: var(--ink-soft);
}
.span-detail li:last-child { margin-bottom: 0; }
.span-detail li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.45rem;
  height: 1px;
  background: var(--c);
}

.span-link {
  margin-top: 0.9rem;
  font-family: var(--sans);
  font-size: 0.875rem;
}

.trace-note {
  margin-top: 2rem;
  max-width: var(--measure);
  font-size: 0.9375rem;
  color: var(--ink-faint);
}

/* --- practice -------------------------------------------------- */

.practice-list { margin: 0; }

.practice-item {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 34rem);
  gap: 0.5rem 3rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--rule-faint);
}
.practice-item:last-child { border-bottom: 1px solid var(--rule-faint); }

.practice-item dt {
  font-size: 1.0625rem;
  font-stretch: 100%;
}
.practice-item dd {
  margin: 0;
  color: var(--ink-soft);
}

/* --- produits ------------------------------------------------- */

.products {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(3.5rem, 9vh, 6rem) var(--gut);
}
.products-head { max-width: 40rem; margin-bottom: clamp(2.25rem, 5vw, 3.25rem); }
.products-kicker {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--paper) 55%, transparent);
  margin-bottom: 0.9rem;
}
.products h2 {
  font-size: clamp(1.75rem, 3.8vw, 2.6rem);
  font-weight: 700;
  font-stretch: 94%;
  letter-spacing: -0.025em;
  margin-bottom: 1.15rem;
}
.products-lede {
  color: color-mix(in srgb, var(--paper) 72%, transparent);
  max-width: 36rem;
}

.products-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem clamp(1.5rem, 3.5vw, 3rem);
}
.product {
  display: flex;
  flex-direction: column;
  padding-top: 1.35rem;
  border-top: 1px solid color-mix(in srgb, var(--paper) 22%, transparent);
}
.product h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 1.75rem;
  font-size: 1.3125rem;
  font-stretch: 100%;
}
.product h3 img { width: 1.75rem; height: 1.75rem; flex: none; }
.product-date {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: color-mix(in srgb, var(--paper) 55%, transparent);
  margin: 0.45rem 0 0.9rem;
}
.product-desc {
  color: color-mix(in srgb, var(--paper) 72%, transparent);
  font-size: 0.9875rem;
  margin-bottom: 1.25rem;
}
.product-link {
  margin-top: auto;
  align-self: flex-start;
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--paper);
  text-decoration-color: color-mix(in srgb, var(--paper) 45%, transparent);
  text-underline-offset: 0.2em;
}
.product-link:hover { text-decoration-color: var(--paper); }
.products :focus-visible { outline-color: var(--paper); }

/* --- contact --------------------------------------------------- */

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 46rem;
}
.contact-list li {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule-faint);
  align-items: baseline;
}
.contact-list li:last-child { border-bottom: 1px solid var(--rule-faint); }
.contact-label {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--ink-faint);
}
.contact-list a { color: var(--ink); text-decoration-color: var(--ink-faint); }
.contact-links { display: flex; flex-wrap: wrap; gap: 0.2rem 1.25rem; }
.contact-list a:hover { color: var(--link); }

.certs {
  margin-top: 2rem;
  max-width: var(--measure);
  font-size: 0.9375rem;
  color: var(--ink-faint);
}

/* --- footer ---------------------------------------------------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 2rem;
  padding: 1.75rem var(--gut) 2.5rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--ink-faint);
}
.foot p { margin: 0; }

/* --- narrow ---------------------------------------------------- */

@media (max-width: 60rem) {
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: 0;
    gap: clamp(1.5rem, 5vw, 2.5rem);
  }
  .hero-title { max-width: 18ch; }
  .products-list { grid-template-columns: 1fr; max-width: 36rem; }

  .hero-portrait {
    order: -1;
    margin: calc(-1 * var(--hero-pt)) 0 0;
    width: min(64%, 18rem);
    aspect-ratio: 3 / 4;
    border-left: 0;
  }
  .hero-portrait img { object-position: 50% 12%; }
}

@media (max-width: 46rem) {
  :root { --rail-w: 0; }

  .top { padding-bottom: 1rem; }
  .nav { order: 3; width: 100%; gap: 1rem; }

  .axis { margin-left: 0; }
  .grid-lines { left: 0; }

  .span-row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
    padding: 0.8rem 0 0.65rem;
  }
  .span-label { padding-right: 0; }
  .span-track { height: 1.4rem; }
  .span-dates { display: block; color: var(--ink-faint); }
  .span-meta { display: none; }

  .practice-item { grid-template-columns: 1fr; gap: 0.4rem; }
  .contact-list li { grid-template-columns: 1fr; gap: 0.15rem; }
}

@media (max-width: 30rem) {
  .span-meta { font-size: 0.6875rem; }
}
