:root {
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: #173144;
  background: #f4f6f7;
  font-size: 16px;
  line-height: 1.55;
  --green: #72d4bd;
  --ink: #122d40;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  background: var(--ink);
  color: white;
  padding: 22px max(20px, calc((100vw - 1120px) / 2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.brand {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 4px;
  text-decoration: none;
  color: white;
}
.brand span {
  display: block;
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--green);
}
.header-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}
#network {
  font-size: 13px;
}
main {
  max-width: 1120px;
  margin: 40px auto;
  padding: 0 22px;
  min-height: 70vh;
}
h1 {
  font-size: clamp(28px, 5vw, 40px);
  letter-spacing: -1px;
  line-height: 1.15;
}
h2 {
  font-size: 22px;
}
h3 {
  font-size: 18px;
}
.muted {
  color: #627582;
}
.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #537568;
}
.card {
  background: white;
  border: 1px solid #dce4e7;
  border-radius: 16px;
  padding: 25px;
  margin: 18px 0;
  box-shadow: 0 8px 30px #122d4005;
}
.narrow {
  max-width: 530px;
  margin: 60px auto;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.grid .card {
  margin: 0;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}
button,
.button {
  border: 0;
  border-radius: 9px;
  padding: 12px 18px;
  background: var(--ink);
  color: white;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button.secondary {
  background: #e9eff1;
  color: var(--ink);
}
button.primary {
  background: var(--green);
  color: #15372f;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin: 15px 0 5px;
}
input,
textarea,
select {
  font: inherit;
  padding: 11px;
  border: 1px solid #c6d3d9;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  max-width: 100%;
}
input:not([type="file"]),
textarea {
  width: 100%;
}
textarea {
  min-height: 130px;
  resize: vertical;
}
.badge {
  display: inline-block;
  border-radius: 30px;
  padding: 5px 11px;
  font-size: 12px;
  background: #edf1f3;
}
.badge.good {
  color: #176647;
  background: #dff7ed;
}
.badge.pending {
  background: #fff0cb;
  color: #785700;
}
.warning {
  border-left: 4px solid #d99c2e;
  background: #fff7e7;
  padding: 15px 20px;
  border-radius: 5px;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.note {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 16px;
  border-left: 3px solid var(--green);
  margin: 16px 0;
  background: #f7faf9;
}
footer {
  text-align: center;
  color: #6c7c85;
  font-size: 12px;
  padding: 25px;
}
#notice {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  border-radius: 10px;
  padding: 16px 22px;
  max-width: 90vw;
  box-shadow: 0 5px 30px #0003;
}
a {
  color: #176f5c;
}
:focus-visible {
  outline: 3px solid #24a588;
  outline-offset: 3px;
}
@media (max-width: 600px) {
  header {
    padding: 16px;
  }
  .header-actions {
    gap: 8px;
    flex-direction: column;
    align-items: flex-end;
  }
  main {
    margin: 25px auto;
    padding: 0 16px;
  }
  .card {
    padding: 20px;
  }
  .row {
    align-items: flex-start;
    flex-direction: column;
  }
  button {
    min-height: 46px;
  }
}

.evidence-photo {
  display: block;
  max-width: 100%;
  max-height: 440px;
  object-fit: contain;
  border-radius: 10px;
  margin: 15px 0;
}

main[aria-busy="true"] {
  cursor: progress;
  pointer-events: none;
}

.section-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  position: sticky;
  top: 0;
  background: #f4f6f7;
  padding: 8px;
  z-index: 2;
}
.section-navigation button {
  font-size: 14px;
  padding: 10px;
  min-height: 44px;
}
@media (max-width: 600px) {
  /* La navigation complète ne doit pas recouvrir le formulaire sur téléphone. */
  .section-navigation {
    position: static;
  }
}
.textile-engine progress {
  width: 100%;
  height: 20px;
  accent-color: #176d68;
}
.specialized-editor {
  border-top: 2px solid #dcebe8;
  padding-top: 18px;
  margin-top: 24px;
}
.field-block {
  border-bottom: 1px solid #dcebe8;
  padding: 12px 0;
}
.measure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 12px;
}
.measurement-row {
  padding: 12px;
  border: 1px solid #dcebe8;
  border-radius: 8px;
}
fieldset label {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
}
fieldset input[type="checkbox"] {
  width: auto;
}
input,
select,
textarea {
  max-width: 100%;
  min-height: 44px;
}
output {
  display: block;
  font-weight: bold;
  padding: 10px;
}
.sync-status {
  font-weight: bold;
}
.report-page fieldset label,
.report-ack {
  display: flex;
  gap: 12px;
  align-items: center;
}
.report-page input[type="checkbox"] {
  width: 20px;
  flex-shrink: 0;
}
.report-page .fingerprint {
  overflow-wrap: anywhere;
  font-family: monospace;
}
.report-version {
  border-top: 1px solid #dcebe8;
  padding: 18px 0;
}
.report-page button {
  margin: 8px 8px 8px 0;
}
.report-page select {
  width: 100%;
  margin-bottom: 18px;
}
.report-page [role="status"]:empty {
  display: none;
}

/* Les avertissements et références peuvent contenir des identifiants sans espace. */
.techpack-engine {
  overflow-wrap: anywhere;
}
.report-order {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px 30px;
}
.report-order button {
  font-size: 12px;
  padding: 7px 10px;
  min-height: 36px;
}
