:root {
  color-scheme: light;
  --ink: #172b2a;
  --muted: #526460;
  --line: #d7dfd9;
  --paper: #f5f6f1;
  --green: #245b4a;
  --mint: #e0ecde;
  --purple: #43226c;
  --orange: #ff9c34;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 4vw;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.brand {
  font-weight: 850;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.05em;
}
.brand span {
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}
main {
  max-width: 1540px;
  margin: auto;
  padding: 24px 4vw;
}
h1 {
  font-size: clamp(28px, 3.6vw, 46px);
  margin: 8px 0;
  letter-spacing: -0.04em;
}
h2 {
  font-size: 25px;
  letter-spacing: -0.02em;
  margin: 10px 0;
}
h3 {
  font-size: 18px;
  margin: 0 0 12px;
}
p {
  line-height: 1.6;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.intro p {
  margin: 5px 0;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 750;
  color: var(--green);
}
.progress {
  display: grid;
  text-align: right;
  min-width: 130px;
}
.progress strong {
  font-size: 40px;
}
.progress span {
  font-size: 12px;
  color: var(--muted);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
select,
input {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  padding: 10px 14px;
  color: inherit;
  min-height: 44px;
}
button:hover {
  border-color: var(--green);
  background: #edf3eb;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #a96de5;
  outline-offset: 3px;
}
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}
.tabs button[aria-pressed="true"] {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
#status {
  padding: 10px 14px;
  background: #e7eee3;
  border-radius: 8px;
  font-size: 13px;
}
#status.error {
  background: #fff0e4;
  color: #793607;
}
.workspace {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 30px;
}
aside {
  position: sticky;
  top: 16px;
  align-self: start;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin: 9px 0 7px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #b9c8bf;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  color: var(--ink);
  min-height: 44px;
}
#items {
  overflow: auto;
  display: grid;
  gap: 5px;
  padding: 3px;
  min-height: 0;
}
#items button {
  text-align: left;
  font-size: 13px;
  background: transparent;
  border: 1px solid transparent;
  padding: 10px;
  line-height: 1.4;
}
#items button.active {
  background: #fff;
  border-color: var(--green);
  box-shadow: inset 3px 0 var(--green);
}
#items small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 650;
  border: 1px solid var(--line);
  padding: 5px 8px;
  border-radius: 20px;
  margin: 0 5px 5px 0;
  background: #fff;
}
.badge.good {
  background: var(--mint);
  border-color: #bdd3ba;
}
.badge.pending {
  background: #fff0d4;
  border-color: #d39a3b;
  color: #704500;
}
.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
}
.detail-head > div {
  min-width: 0;
}
.detail-head h2 {
  overflow-wrap: anywhere;
}
.toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 20px 0;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  overflow: hidden;
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
}
.panel-title small {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
}
.stage {
  min-height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 26px 14px;
  background-color: #233140;
  background-image:
    linear-gradient(
      28deg,
      transparent 47%,
      #465568 48%,
      #465568 49%,
      transparent 50%
    ),
    linear-gradient(
      105deg,
      transparent 47%,
      #38495b 48%,
      #38495b 49%,
      transparent 50%
    );
  background-size:
    100px 110px,
    140px 90px;
}
.stage.light {
  background-color: #e8eee5;
  background-image: linear-gradient(
    28deg,
    transparent 47%,
    #c3cec2 48%,
    #c3cec2 49%,
    transparent 50%
  );
}
.stage button {
  background: transparent;
  border: 0;
  padding: 0;
  line-height: 0;
  min-height: 0;
  max-width: 100%;
}
.stage img {
  max-width: 100%;
  width: 140px;
  height: auto;
  object-fit: contain;
  transition: transform 0.16s;
}
.stage img.wide {
  width: 100%;
  max-width: 350px;
}
.stage.adjusted img:not(.wide) {
  transform: scale(1.15);
  filter: contrast(1.12);
}
.stage p {
  color: #fff;
  font-size: 13px;
  max-width: 270px;
}
.panel p.caption {
  padding: 0 16px;
  font-size: 12px;
  color: var(--muted);
}
.panel .options {
  padding: 0 16px 14px;
  font-size: 12px;
}
.options label {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.options input {
  width: auto;
  min-height: 20px;
}
.options select {
  font-size: 12px;
}
.section-box {
  padding: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 16px 0;
}
dl {
  display: grid;
  grid-template-columns: minmax(90px, 150px) minmax(0, 1fr);
  gap: 10px 16px;
  font-size: 13px;
  line-height: 1.5;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
}
details {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
summary {
  cursor: pointer;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
pre {
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f0f3ef;
  padding: 14px;
  border-radius: 8px;
  max-height: 330px;
  overflow: auto;
}
code {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
textarea {
  min-height: 110px;
  resize: vertical;
}
.primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.primary:hover {
  background: #174436;
  color: white;
}
.review {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.review p {
  white-space: pre-wrap;
  margin: 7px 0;
  font-size: 14px;
}
.review small {
  color: var(--muted);
  font-size: 11px;
}
.review strong {
  font-size: 13px;
}
.notice {
  padding: 12px 15px;
  border-left: 3px solid var(--orange);
  background: #fff9ee;
  font-size: 13px;
}
.empty {
  padding: 30px;
  color: var(--muted);
}
iframe {
  width: 100%;
  height: 650px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  max-width: min(94vw, 950px);
  max-height: 90vh;
}
dialog::backdrop {
  background: #14251f99;
}
.close {
  float: right;
  margin: 0 0 15px 20px;
}
#large-image {
  display: block;
  max-width: 100%;
  max-height: 73vh;
  object-fit: contain;
  margin: auto;
}
#rules-body li {
  margin: 14px 0;
  line-height: 1.6;
}
.counter {
  font-size: 11px;
  text-align: right;
}
.export-note {
  font-size: 11px;
  color: var(--muted);
}
@media (max-width: 900px) {
  main {
    padding: 20px;
  }
  .workspace {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
  }
  .compare {
    grid-template-columns: 1fr;
  }
  .stage {
    min-height: 190px;
  }
  .detail-head {
    display: block;
  }
}
@media (max-width: 620px) {
  header {
    padding: 12px 20px;
  }
  .workspace {
    display: block;
  }
  aside {
    position: static;
    max-height: 330px;
    margin-bottom: 24px;
  }
  #items {
    max-height: 125px;
  }
  .progress {
    display: none;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .intro {
    display: block;
  }
  .tabs {
    gap: 5px;
  }
  .tabs button {
    font-size: 12px;
    padding: 8px;
  }
  h2 {
    font-size: 23px;
  }
  dl {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  dd {
    margin-bottom: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

#items {
  grid-auto-rows: max-content;
  align-content: start;
  flex: 1;
}
#items button {
  flex-shrink: 0;
  white-space: normal;
}

.decision-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 24px 0;
}
.decision-summary article {
  border-top: 2px solid var(--green);
  padding: 14px 0;
}
.decision-summary strong {
  font-size: 14px;
}
.decision-summary p {
  margin: 7px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.report-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
@media (max-width: 900px) {
  .decision-summary {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .decision-summary {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Current-state workshop: compact decision trail, no design experiment. */
.workshop-tracking { border-block: 1px solid var(--line, #d6ddd5); padding: 12px 0; margin: 20px 0; font-size: .86rem; }
.workshop-tracking p { margin: 6px 0; }
.workshop-tracking small { margin-left: 8px; color: #53655d; }
.workshop-tracking .toolbar { margin: 12px 0; flex-wrap: wrap; }
.workshop-tracking button { font-size: .82rem; }
.tracking-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tracking-chip { border: 1px solid #d6ddd5; padding: 5px 8px; border-radius: 6px; }
.tracking-chip.complete { background: #daeade; }
.breadcrumb { font-size: .78rem; color: #53655d; }
.current-inventory .stage { min-height: 170px; }
.current-inventory .panel { padding: 18px; }
/* OPS-CATALOGUE-FIGMA-INTERFACES-1311-001 : lien vers la planche Figma (nouvel onglet) */
.figma-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: inherit;
  text-decoration: none;
}
.figma-link:hover {
  border-color: var(--green);
  background: #edf3eb;
}
.figma-avis {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 10px;
}
.figma-avis li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.figma-avis small {
  display: block;
  color: var(--muted);
  word-break: break-all;
}
