:root {
  font: 16px/1.5 system-ui, sans-serif;
  color: #1f3029;
  background: #f4f4ed;
  --vert: #205445;
  --bordure: #d0d8cd;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.entete, main { max-width: 1440px; margin: auto; padding: 1.25rem clamp(1rem, 3vw, 3rem); }
.entete, .barre, .projet { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; justify-content: space-between; }
.rubrique { color: #456459; margin: 0; }
h1, h2 { margin: 0; line-height: 1.2; }
h1 { font: 600 clamp(1.7rem, 4vw, 2.8rem)/1.15 Georgia, serif; }
h2 { font-size: 1.15rem; margin-bottom: .65rem; }
.barre h2 { margin: 0; }
.projet, .carte { background: #fffefa; border: 1px solid var(--bordure); border-radius: 14px; padding: 1rem; }
.projet { justify-content: flex-start; margin-bottom: 1rem; gap: .6rem 1rem; }
.projet p { flex-basis: 100%; margin: 0; }
.projet p:empty, #erreur-calibration:empty { display: none; }
.atelier { display: grid; grid-template-columns: minmax(0, 1fr) minmax(295px, 340px); gap: 1rem; align-items: start; }
aside { display: grid; gap: .75rem; }
.groupe { display: flex; flex-wrap: wrap; gap: .4rem; align-items: end; }
label { display: grid; gap: .2rem; font-size: .9rem; }
button, input, select { font: inherit; color: inherit; border: 1px solid #82988c; border-radius: 7px; background: #fffefa; min-height: 42px; padding: .32rem .56rem; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
button[aria-pressed="true"], .principal { background: var(--vert); color: white; border-color: var(--vert); }
:focus-visible { outline: 3px solid #a84920; outline-offset: 2px; }
select { max-width: 100%; }
input[type="file"] { width: 100%; }
.surface { position: relative; height: clamp(320px, 63vh, 700px); margin-top: .8rem; border-radius: 9px; background: #e8ede5; overflow: hidden; display: grid; place-items: center; }
.surface svg { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.surface svg:focus-visible { outline-offset: -3px; }
.surface svg.deplacement { cursor: grab; }
.aide { font-size: .9rem; color: #456459; margin: .45rem 0 .65rem; }
.repere { display: grid; grid-template-columns: auto 1fr 1fr; gap: .4rem; align-items: end; margin: .45rem 0; }
.repere input, #distance { width: 100%; }
.repere label { min-width: 0; }
#distance { margin-bottom: .55rem; }
#erreur, #erreur-calibration { color: #922b20; }
line { stroke-width: 2; vector-effect: non-scaling-stroke; }
.calibration { stroke: #1b5747; }
.mesure { stroke: #943c1b; stroke-dasharray: 5 3; }
@media (max-width: 800px) { .atelier { grid-template-columns: minmax(0, 1fr); } .surface { height: min(55vh, 480px); min-height: 280px; } }
