/* katec2 — « Plan d'exécution » : papier quadrillé, bleu plan, IBM Plex */
:root {
  --papier: #f7f7f3;
  --grille: #dfe4ee;
  --bleu: #1946a6;
  --encre: #101c3a;
  --gris: #5c6478;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; color: var(--encre); font-family: var(--sans); font-size: 1rem; line-height: 1.55;
  background-color: var(--papier);
  background-image: linear-gradient(var(--grille) 1px, transparent 1px), linear-gradient(90deg, var(--grille) 1px, transparent 1px);
  background-size: 24px 24px;
  padding: 12px;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--bleu); }
p { margin: 0; }
h1, h2 { margin: 0; font-weight: 600; line-height: 1.1; }
h2 { font-size: 1.5rem; border-bottom: 2px solid var(--bleu); padding-bottom: .5rem; margin-bottom: 1.5rem; display: flex; gap: 1rem; align-items: baseline; }
h2 .mono { color: var(--bleu); }
.mono { font-family: var(--mono); font-size: .85rem; letter-spacing: .02em; }
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 3px; }

.sheet { border: 2px solid var(--bleu); background: rgba(247,247,243,.55); max-width: 1180px; margin: 0 auto; min-height: calc(100vh - 24px); }
.sheet > section { padding: 2.5rem clamp(1rem, 4vw, 3rem); border-bottom: 1px solid var(--bleu); }

.plan-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; padding: .8rem clamp(1rem, 4vw, 3rem); border-bottom: 2px solid var(--bleu); font-family: var(--mono); font-size: .85rem; position: sticky; top: 12px; background: var(--papier); z-index: 10; }
.ph-left strong { color: var(--bleu); margin-right: .5rem; }
.ph-nav { display: flex; gap: 1.5rem; }
.ph-nav a { text-decoration: none; color: var(--encre); }
.ph-nav a:hover { color: var(--bleu); text-decoration: underline; }
.ph-right { text-align: right; color: var(--gris); }

.hero h1 { font-size: clamp(1.8rem, 3.6vw, 3rem); max-width: 26ch; margin-top: .5rem; }
.hero .mono { color: var(--gris); }
.lead { max-width: 60ch; margin-top: 1.5rem; color: #2a3350; }
.dim { display: flex; align-items: center; gap: .75rem; margin: 2rem 0 0; max-width: 40rem; font-family: var(--mono); font-size: .85rem; color: var(--bleu); }
.dim-line { flex: 1; height: 1px; background: var(--bleu); position: relative; }
.dim-line::before, .dim-line::after { content: ""; position: absolute; top: -6px; width: 1px; height: 13px; background: var(--bleu); }
.dim-line::before { left: 0; } .dim-line::after { right: 0; }

.table-wrap { overflow-x: auto; }
.nomenclature { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 640px; }
.nomenclature th, .nomenclature td { border: 1px solid var(--bleu); padding: .6rem .75rem; text-align: left; vertical-align: top; }
.nomenclature thead th { font-family: var(--mono); font-weight: 500; font-size: .8rem; background: rgba(25,70,166,.08); }
.nomenclature td:first-child, .nomenclature td:last-child { font-family: var(--mono); font-size: .85rem; white-space: nowrap; }
.nomenclature td:nth-child(2) { font-weight: 600; }

.coupe { background: rgba(255,255,255,.6); border: 1px solid var(--bleu); padding: 1rem; }
.coupe svg { width: 100%; height: auto; }
.coupe .l { fill: none; stroke: var(--bleu); stroke-width: 2; }
.coupe .thin { stroke-width: 1; }
.coupe .dash { stroke-dasharray: 6 4; }
.coupe .hatch { stroke-width: .8; opacity: .7; }
.coupe .t { font-family: var(--mono); font-size: 13px; fill: var(--encre); }
.coupe .mid { text-anchor: middle; }
.note { color: var(--gris); margin-top: .75rem; }

.figs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.figs figure { margin: 0; }
.figs img { border: 1px solid var(--bleu); aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.figs figcaption { margin-top: .5rem; font-size: .9rem; }
.figs .mono { color: var(--bleu); margin-right: .5rem; }

.cartouche { width: 100%; border-collapse: collapse; font-size: .95rem; }
.cartouche th, .cartouche td { border: 1px solid var(--bleu); padding: .7rem .8rem; text-align: left; vertical-align: top; }
.cartouche th { font-family: var(--mono); font-weight: 500; font-size: .8rem; width: 9rem; background: rgba(25,70,166,.08); }
.cartouche a { text-decoration: none; font-weight: 600; }
.cartouche a:hover { text-decoration: underline; }
.cta { display: inline-block; background: var(--bleu); color: #fff !important; padding: .5rem 1rem; margin-left: .5rem; }
.cta:hover { background: #12367f; text-decoration: none !important; }

footer { padding: 1.5rem clamp(1rem, 4vw, 3rem); color: var(--gris); line-height: 1.6; }

@media (max-width: 800px) {
  .plan-head { grid-template-columns: 1fr; text-align: left; gap: .4rem; position: static; }
  .ph-right { text-align: left; }
  .figs { grid-template-columns: 1fr; }
  .cartouche, .cartouche tr, .cartouche th, .cartouche td { display: block; width: auto; }
  .cartouche th { border-bottom: 0; }
  .cartouche td { border-top: 0; margin-bottom: -1px; }
}
