/* =============================================================
   Wilson Amedome — Portfolio v1 « Spécification technique »
   Archivo · Newsreader · IBM Plex Mono. Sans cadriciel.
   ============================================================= */

/* ---------- 1. Jetons ---------- */
:root {
  --paper:      #EFEBE2;
  --paper-2:    #E7E2D7;
  --paper-3:    #DED7C8;
  --ink:        #14130F;
  --ink-2:      #555147;
  --ink-3:      #8B8579;
  --rule:       #D3CCBC;
  --rule-2:     #B4AB98;
  --signal:     #B8431F;
  --signal-dim: #D97A56;
  --grain:      .045;
  --grain-mode: multiply;

  --bar-h: 46px;
  --gutter: clamp(20px, 5.5vw, 88px);
  --measure: 1240px;

  --f-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --ease: cubic-bezier(.22,.61,.24,1);
}

[data-theme="dark"] {
  --paper:      #100F0D;
  --paper-2:    #171613;
  --paper-3:    #201E19;
  --ink:        #EDE8DC;
  --ink-2:      #A49E90;
  --ink-3:      #6E6A5E;
  --rule:       #2B2924;
  --rule-2:     #423E36;
  --signal:     #E4703F;
  --signal-dim: #8A4426;
  --grain:      .06;
  --grain-mode: screen;
}

/* ---------- 2. Réinitialisation ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 28px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.028em; line-height: 1.08; }
p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

::selection { background: var(--signal); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

/* Grain papier : la seule « texture », 4 % d’opacité */
body::after {
  content: "";
  position: fixed;
  inset: -100px;
  z-index: 9998;
  pointer-events: none;
  opacity: var(--grain);
  mix-blend-mode: var(--grain-mode);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 3. Utilitaires typographiques ---------- */
.mono {
  font-family: var(--f-mono);
  font-size: .72rem;
  letter-spacing: .045em;
  font-variant-numeric: tabular-nums;
}
.dim { color: var(--ink-3); }
.lede {
  font-family: var(--f-serif);
  font-size: clamp(1.12rem, 1.05rem + .55vw, 1.5rem);
  line-height: 1.48;
  font-weight: 300;
  letter-spacing: -.005em;
  color: var(--ink);
}
.lede em { font-style: italic; }
.lede--sm { font-size: clamp(1.02rem, .98rem + .3vw, 1.2rem); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10000;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; font-family: var(--f-mono); font-size: .72rem;
  transition: top .2s var(--ease);
}
.skip:focus { top: 10px; }

/* ---------- 4. Barre de document ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--bar-h);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.bar__in {
  height: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 28px;
}
.bar__id { display: flex; align-items: baseline; gap: 10px; flex: 0 0 auto; }
.bar__mark {
  font-family: var(--f-mono); font-weight: 500; font-size: .78rem;
  width: 19px; height: 19px; display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  align-self: center; transform: translateY(-.5px);
}
.bar__name { font-weight: 600; font-size: .85rem; letter-spacing: -.015em; white-space: nowrap; }
.bar__role {
  font-family: var(--f-mono); font-size: .66rem; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .1em; white-space: nowrap;
}
.bar__nav { margin-left: auto; }
.bar__nav ol { display: flex; gap: 22px; }
.bar__nav a {
  display: flex; align-items: baseline; gap: 6px;
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .06em;
  color: var(--ink-3);
  padding: 4px 0;
  transition: color .25s var(--ease);
}
.bar__nav a i { font-style: normal; font-size: .6rem; opacity: .65; }
.bar__nav a:hover { color: var(--ink); }
.bar__nav a.is-active { color: var(--ink); }
.bar__nav a.is-active i { color: var(--signal); opacity: 1; }

.bar__ctl { display: flex; align-items: center; gap: 6px; margin-left: 24px; }
.bar__nav + .bar__ctl { margin-left: 26px; }
.ctl {
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .06em;
  color: var(--ink-3);
  padding: 5px 8px;
  border: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.ctl:hover { color: var(--ink); border-color: var(--rule-2); }
.ctl__sep { opacity: .4; margin: 0 2px; }
.ctl__a { color: var(--ink); }
.ctl__b { color: var(--ink-3); }
[data-lang="en"] .ctl__a { color: var(--ink-3); }
[data-lang="en"] .ctl__b { color: var(--ink); }
.ctl--icon { display: grid; place-items: center; padding: 6px; }
.ctl--icon svg { display: block; }
[data-theme="dark"] .ctl--icon svg { transform: rotate(180deg); }

.ctl--menu { display: none; flex-direction: column; gap: 4px; padding: 8px 6px; }
.ctl--menu span { display: block; width: 17px; height: 1px; background: currentColor; transition: transform .28s var(--ease); }
.ctl--menu[aria-expanded="true"] span:first-child { transform: translateY(2.5px) rotate(45deg); }
.ctl--menu[aria-expanded="true"] span:last-child  { transform: translateY(-2.5px) rotate(-45deg); }

.bar__progress {
  position: absolute; left: 0; bottom: -1px; height: 1px;
  width: 0; background: var(--signal);
}

/* Index plein écran (mobile) */
.index {
  position: fixed; inset: var(--bar-h) 0 0 0; z-index: 99;
  background: var(--paper);
  padding: clamp(28px, 8vh, 70px) var(--gutter);
  overflow-y: auto;
}
.index[hidden] { display: none; }
.index ol { display: flex; flex-direction: column; }
.index a {
  display: flex; align-items: baseline; gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  font-size: clamp(1.5rem, 8vw, 2.4rem);
  font-weight: 600; letter-spacing: -.035em;
}
.index a i {
  font-family: var(--f-mono); font-style: normal;
  font-size: .68rem; letter-spacing: .08em; color: var(--signal);
}

/* ---------- 5. Document ---------- */
.doc {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- 6. Page de titre ---------- */
.cover { padding: clamp(96px, 17vh, 190px) 0 clamp(56px, 8vh, 90px); }
.cover__slug {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline;
  color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .14em; font-size: .66rem;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
}
.cover__slug b { color: var(--rule-2); font-weight: 400; }

.cover__name {
  font-size: clamp(3.1rem, 12.2vw, 9.2rem);
  font-weight: 700;
  letter-spacing: -.055em;
  line-height: .86;
  margin: clamp(26px, 4vw, 48px) 0 clamp(34px, 5vw, 60px);
  margin-left: -.045em;
}
.cover__name span { display: block; }
.cover__name span:last-child { padding-left: clamp(0px, 7vw, 118px); }

.cover__body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(230px, .75fr);
  gap: clamp(30px, 4.5vw, 76px);
  align-items: start;
  padding-bottom: clamp(40px, 6vw, 72px);
}

.specsheet > div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  padding: 9px 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}
.specsheet > div:last-child { border-bottom: 1px solid var(--rule); }
.specsheet dt {
  font-family: var(--f-mono); font-size: .62rem;
  text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3);
}
.specsheet dd { font-size: .84rem; line-height: 1.45; }
.dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--signal); margin-right: 8px; transform: translateY(-1px);
  box-shadow: 0 0 0 0 var(--signal);
  animation: pulse 2.8s var(--ease) infinite;
}
@keyframes pulse {
  0%, 70%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--signal) 55%, transparent); }
  35% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--signal) 0%, transparent); }
}

.figures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
}
.figures li {
  padding: 20px 24px 22px 0;
  display: flex; flex-direction: column; gap: 8px;
}
.figures li + li { border-left: 1px solid var(--rule); padding-left: 24px; }
.figures b {
  font-family: var(--f-mono); font-weight: 500;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  letter-spacing: -.03em; line-height: 1;
  color: var(--signal);
}
.figures span {
  font-size: .8rem; color: var(--ink-2); line-height: 1.4; max-width: 24ch;
}

/* ---------- 7. Sections ---------- */
.section {
  border-top: 1px solid var(--ink);
  padding-top: 16px;
  margin-top: clamp(72px, 10vw, 132px);
}
.section--last { padding-bottom: clamp(72px, 9vw, 120px); }
.section__head {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: baseline;
  margin-bottom: clamp(34px, 5vw, 62px);
}
.idx {
  font-size: .68rem; letter-spacing: .12em; color: var(--signal);
}
.section__head h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.9vw, 2.55rem);
  letter-spacing: -.038em;
}
.section__meta {
  text-transform: uppercase; letter-spacing: .12em;
  font-size: .62rem; color: var(--ink-3); text-align: right;
}
.sub {
  text-transform: uppercase; letter-spacing: .13em;
  font-size: .64rem; color: var(--ink-3); font-weight: 500;
  margin-bottom: 14px;
}
.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, .88fr);
  gap: clamp(32px, 5vw, 78px);
  align-items: start;
}

/* ---------- 8. 01 · Profil ---------- */
.prose { font-size: 1rem; line-height: 1.68; color: var(--ink-2); max-width: 62ch; }
.prose p + p { margin-top: 1.05em; }
.prose em { font-family: var(--f-serif); font-style: italic; font-size: 1.08em; color: var(--ink); }
.prose__note {
  font-size: .88rem; color: var(--ink-3);
  padding-top: 1.1em; margin-top: 1.5em !important;
  border-top: 1px solid var(--rule);
}
.portrait { margin: 0; position: relative; }
.portrait img {
  width: 100%;
  filter: grayscale(1) contrast(1.06);
  mix-blend-mode: multiply;
}
[data-theme="dark"] .portrait img {
  filter: grayscale(1) contrast(1.02) brightness(.92);
  mix-blend-mode: normal;
}
.portrait figcaption {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--rule);
  color: var(--ink-3); font-size: .64rem;
  text-transform: uppercase; letter-spacing: .1em;
}
.portrait figcaption b { color: var(--rule-2); font-weight: 400; margin: 0 6px; }

/* ---------- 9. 02 · Travaux ---------- */
.case { border-top: 1px solid var(--rule); padding: clamp(24px, 3vw, 36px) 0; }
.case:first-child { border-top: 0; padding-top: 0; }
.case__head {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 22px clamp(24px, 3vw, 46px);
  align-items: start;
}
.case__ref { color: var(--ink-3); padding-top: .35em; }
.case__title h3 {
  font-size: clamp(1.18rem, 1rem + .85vw, 1.65rem);
  letter-spacing: -.032em;
}
.case__org {
  margin-top: 9px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .09em; font-size: .62rem;
}
.case__org b { color: var(--rule-2); font-weight: 400; margin: 0 7px; }
.case__hook {
  font-family: var(--f-serif); font-weight: 300;
  font-size: 1.06rem; line-height: 1.5; color: var(--ink-2);
}

.more { margin-top: 22px; margin-left: 84px; }
.more summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  text-transform: uppercase; letter-spacing: .12em; font-size: .62rem;
  color: var(--ink-3);
  padding: 7px 0;
  transition: color .2s var(--ease);
}
.more summary::-webkit-details-marker { display: none; }
.more summary:hover { color: var(--signal); }
.more__sign {
  position: relative; width: 9px; height: 9px; flex: 0 0 auto;
}
.more__sign::before, .more__sign::after {
  content: ""; position: absolute; background: currentColor;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
}
.more__sign::before { width: 9px; height: 1px; }
.more__sign::after  { width: 1px; height: 9px; transition: transform .28s var(--ease); }
.more[open] .more__sign::after { transform: translate(-50%, -50%) scaleY(0); }
.more[open] > summary { color: var(--ink); }
.more > .spec { animation: unfold .38s var(--ease) both; }
@keyframes unfold { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.spec { margin-top: 10px; }
.spec > div {
  display: grid;
  grid-template-columns: minmax(94px, 128px) minmax(0, 1fr);
  gap: 6px clamp(20px, 2.6vw, 40px);
  padding: 15px 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.spec dt {
  font-family: var(--f-mono); font-size: .62rem;
  text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3);
  padding-top: .28em;
}
.spec dd { font-size: .935rem; line-height: 1.62; color: var(--ink-2); max-width: 78ch; }
.spec dd em { font-family: var(--f-serif); font-style: italic; font-size: 1.06em; color: var(--ink); }
.dd--stack { font-size: .72rem !important; color: var(--ink-3) !important; line-height: 1.75 !important; }
.spec--tight > div { padding: 13px 0; grid-template-columns: minmax(70px, 92px) minmax(0, 1fr); }
.spec--tight dd { font-size: .89rem; }
.grid-2--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.dd--links { display: flex; gap: 20px; flex-wrap: wrap; }

.coda {
  margin-top: clamp(34px, 4vw, 56px);
  padding: 24px 0 0;
  border-top: 1px solid var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px clamp(24px, 4vw, 60px);
  align-items: start;
}
.coda__lead { font-size: .88rem; color: var(--ink-3); line-height: 1.6; max-width: 62ch; }
.coda__list { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.coda__list a {
  color: var(--ink-2); font-size: .7rem; letter-spacing: .04em;
  border-bottom: 1px solid var(--rule-2);
  padding-bottom: 2px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.coda__list a span { margin-left: 4px; font-size: .85em; }
.coda__list a:hover { color: var(--signal); border-color: var(--signal); }

/* ---------- 10. 03 · Parcours ---------- */
.ledger__wrap { overflow-x: auto; margin-bottom: clamp(34px, 4.5vw, 58px); }
.ledger { min-width: 640px; }
.ledger th {
  font-family: var(--f-mono); font-weight: 400;
  font-size: .6rem; text-transform: uppercase; letter-spacing: .13em;
  color: var(--ink-3); text-align: left;
  padding: 0 24px 10px 0;
  border-bottom: 1px solid var(--ink);
}
.ledger td {
  padding: 16px 24px 16px 0;
  border-bottom: 1px solid var(--rule);
  font-size: .9rem; vertical-align: top; color: var(--ink-2);
}
.ledger td:first-child {
  color: var(--ink-3); font-size: .7rem; white-space: nowrap;
  padding-left: 12px; position: relative;
}
.ledger td:nth-child(2) { color: var(--ink); font-weight: 500; }
.ledger tbody tr { transition: background .22s var(--ease); }
.ledger tbody tr:hover { background: var(--paper-2); }
.ledger tbody tr td:first-child::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px;
  background: var(--signal); opacity: 0;
  transition: opacity .22s var(--ease);
}
.ledger tbody tr:hover td:first-child::before { opacity: 1; }
.foot-note {
  font-size: .8rem; color: var(--ink-3);
  padding-left: 18px; border-left: 1px solid var(--rule-2);
  max-width: 62ch;
}

/* ---------- 11. 04 · Stack ---------- */
.layers > div {
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
  gap: 10px clamp(24px, 3vw, 52px);
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.layers > div:last-child { border-bottom: 1px solid var(--rule); }
.layers dt {
  font-family: var(--f-mono); font-size: .64rem;
  text-transform: uppercase; letter-spacing: .12em; color: var(--ink);
  padding-top: .2em;
}
.layers dd { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.t {
  position: relative; padding-left: 15px;
  font-size: .86rem; color: var(--ink-2);
}
.t::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 6px; height: 6px; border-radius: 50%;
}
.t--prod::before { background: var(--signal); }
.t--notion::before { border: 1px solid var(--rule-2); }
.legend {
  margin-top: 22px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  color: var(--ink-3); font-size: .62rem;
  text-transform: uppercase; letter-spacing: .1em;
}
.legend span + .key { margin-left: 20px; }
.key { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.key--prod { background: var(--signal); }
.key--notion { border: 1px solid var(--rule-2); }

/* ---------- 12. 05 · Titres ---------- */
.certs li {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: baseline;
  padding: 15px 0;
  border-top: 1px solid var(--rule);
}
.certs li:last-child { border-bottom: 1px solid var(--rule); }
.certs__yr { color: var(--ink-3); font-size: .66rem; }
.certs__nm { font-size: .93rem; font-weight: 500; }
.certs__nm .dim { display: block; font-weight: 400; font-size: .8rem; margin-top: 3px; }
.certs__lk {
  font-size: .62rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-3);
  border-bottom: 1px solid var(--rule-2); padding-bottom: 2px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
}
.certs__lk span + span { margin-left: 4px; }
.certs__lk:hover { color: var(--signal); border-color: var(--signal); }

/* ---------- 13. 06 · Contact ---------- */
.lk {
  color: var(--ink);
  border-bottom: 1px solid var(--rule-2);
  padding-bottom: 1px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.lk span { margin-left: 4px; font-size: .85em; }
.lk:hover { color: var(--signal); border-color: var(--signal); }

.form { display: flex; flex-direction: column; gap: 4px; }
.field { display: flex; flex-direction: column; gap: 4px; padding-bottom: 18px; }
.field label {
  font-size: .62rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--ink-3);
}
.field label .dim { text-transform: none; letter-spacing: .04em; opacity: .75; }
.field input, .field textarea {
  font-family: var(--f-sans); font-size: .95rem; color: var(--ink);
  background: transparent;
  border: 0; border-bottom: 1px solid var(--rule-2);
  padding: 9px 0;
  border-radius: 0;
  transition: border-color .22s var(--ease);
}
.field textarea { resize: vertical; line-height: 1.55; min-height: 108px; }
.field input:focus, .field textarea:focus {
  outline: none; border-bottom-color: var(--signal);
}
.field input:focus-visible, .field textarea:focus-visible { outline: none; }
.field.is-invalid input, .field.is-invalid textarea { border-bottom-color: var(--signal); }
.field.is-invalid label { color: var(--signal); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--ink);
  padding: 12px 22px;
  font-size: .68rem; text-transform: uppercase; letter-spacing: .14em;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.btn:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.btn:disabled { opacity: .45; cursor: progress; }
.form__status { font-size: .66rem; letter-spacing: .06em; color: var(--ink-3); min-height: 1.2em; }
.form__status.is-ok { color: var(--signal); }
.form__status.is-err { color: var(--signal); }

/* ---------- 14. Colophon ---------- */
.colophon { border-top: 1px solid var(--ink); }
.colophon__in {
  max-width: var(--measure); margin: 0 auto;
  padding: 22px var(--gutter) 30px;
  display: flex; flex-wrap: wrap; gap: 12px 34px; align-items: baseline;
  color: var(--ink-3); font-size: .64rem; letter-spacing: .06em;
}
.colophon__in b { color: var(--rule-2); font-weight: 400; margin: 0 8px; }
.colophon__note { margin-right: auto; }

/* ---------- 15. Apparition au défilement ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .62s var(--ease), transform .62s var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 16. Adaptatif ---------- */
@media (max-width: 1080px) {
  .bar__nav { display: none; }
  .ctl--menu { display: flex; }
  .bar__nav + .bar__ctl, .bar__ctl { margin-left: auto; }
}
@media (max-width: 900px) {
  .cover__body { grid-template-columns: 1fr; gap: 34px; }
  .grid-2 { grid-template-columns: 1fr; gap: 38px; }
  .case__head { grid-template-columns: 46px minmax(0, 1fr); }
  .case__hook { grid-column: 2; }
  .more { margin-left: 68px; }
  .layers > div { grid-template-columns: 1fr; gap: 8px; }
  .coda { grid-template-columns: 1fr; }
  .portrait { max-width: 380px; }
}
@media (max-width: 620px) {
  :root { --bar-h: 52px; }
  .bar__role, .bar__name { display: none; }
  .bar__id::after {
    content: "Wilson Amedome";
    font-weight: 600; font-size: .85rem; letter-spacing: -.015em;
  }
  .figures { grid-template-columns: 1fr; border-top: 0; }
  .figures li { border-top: 1px solid var(--rule); padding: 16px 0; }
  .figures li + li { border-left: 0; padding-left: 0; }
  .figures span { max-width: none; }
  .section__head { grid-template-columns: 42px minmax(0, 1fr); }
  .section__meta { display: none; }
  .case__head { grid-template-columns: 1fr; gap: 14px; }
  .case__ref { padding-top: 0; }
  .case__hook { grid-column: 1; }
  .more { margin-left: 0; }
  .spec > div { grid-template-columns: 1fr; gap: 5px; }
  .specsheet > div { grid-template-columns: 76px 1fr; }
  .certs li { grid-template-columns: 44px 1fr; }

  /* Le registre devient une suite de fiches : pas de défilement latéral */
  .ledger__wrap { overflow-x: visible; }
  .ledger { min-width: 0; }
  .ledger thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ledger tr { display: block; padding: 15px 0; border-bottom: 1px solid var(--rule); }
  .ledger td { display: block; border: 0; padding: 0 0 3px; }
  .ledger td:first-child { padding-left: 0; margin-bottom: 7px; }
  .ledger tbody tr:hover { background: none; }
  .ledger tbody tr td:first-child::before { display: none; }
  .ledger td:nth-child(2) { font-size: .98rem; }
  .ledger td:nth-child(3) { font-size: .85rem; }
  .ledger td:nth-child(4) { font-size: .8rem; color: var(--ink-3); }
  .certs__lk { grid-column: 2; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- 17. Impression ---------- */
@media print {
  .bar, .index, .form, .skip, body::after { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .doc { max-width: none; padding: 0; }
  .section { break-inside: avoid; margin-top: 26pt; }
  .more[open] .spec, .more .spec { display: block; }
  .more summary { display: none; }
  .case { break-inside: avoid; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; }
}
