@font-face {
  font-family: Local;
  src: local('Segoe UI');
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  font-family: Local, 'Segoe UI', Arial, sans-serif;
  color: #173941;
  background: #f6fafb;
  font-size: 14px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
a {
  color: inherit;
  text-decoration: none;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 238px;
  background: #fff;
  border-right: 1px solid #e4eff1;
  padding: 31px 21px;
  display: flex;
  flex-direction: column;
  z-index: 3;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 23px;
  letter-spacing: -0.8px;
  font-weight: 700;
}
.brand-icon {
  position: relative;
  width: 39px;
  height: 41px;
  border-radius: 11px;
  background: #00809e;
  color: white;
  text-align: center;
  line-height: 40px;
  font-size: 27px;
  font-weight: 600;
}
.brand-icon span {
  position: absolute;
  font-size: 15px;
  right: 3px;
  top: -4px;
  color: #83d4df;
}
.brand-sub {
  display: block;
  font-size: 9px;
  letter-spacing: 2.05px;
  color: #7b8b9c;
  font-weight: 600;
  margin-top: 2px;
}
.new-button {
  background: #00809e;
  border: 0;
  border-radius: 9px;
  color: #fff;
  width: 100%;
  padding: 12px 9px;
  font-weight: 600;
  margin: 35px 0 34px;
  box-shadow: 0 3px 8px #00809e14;
}
.new-button span {
  font-size: 21px;
  vertical-align: -1px;
  margin-right: 6px;
}
.side-label {
  font-size: 10px;
  letter-spacing: 1.6px;
  font-weight: 700;
  color: #8a98a9;
  padding: 0 10px;
  margin-bottom: 13px;
}
.nav-item {
  border: 0;
  background: none;
  width: 100%;
  text-align: left;
  padding: 12px;
  border-radius: 8px;
  color: #627388;
  font-weight: 600;
}
.nav-item span {
  font-size: 20px;
  margin-right: 9px;
  vertical-align: -2px;
}
.nav-item.active {
  color: #005e74;
  background: #eef9fc;
}
.recent-heading {
  display: flex;
  justify-content: space-between;
  margin-top: 35px;
}
.recent-heading span {
  letter-spacing: 0;
  background: #f0f6f7;
  padding: 2px 6px;
  border-radius: 5px;
}
.operation-nav {
  overflow: auto;
  flex: 1;
}
.operation-link {
  display: block;
  background: none;
  border: 0;
  text-align: left;
  width: 100%;
  padding: 11px 10px;
  border-radius: 8px;
  margin-bottom: 5px;
  line-height: 1.5;
  color: #42566c;
}
.operation-link:hover,
.operation-link.selected {
  background: #f0f8fa;
}
.operation-link strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 600;
}
.operation-link small {
  font-size: 11px;
  color: #8998a7;
}
.sidebar-bottom {
  padding: 17px 0 0;
  border-top: 1px solid #e9edf3;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  color: #52677f;
}
.sidebar-bottom small {
  display: block;
  color: #97a4b3;
  font-size: 10px;
  margin-top: 4px;
}
.local-dot,
.local-badge i {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #3ea48e;
  border-radius: 50%;
  flex-shrink: 0;
}
.icon-button {
  border: 1px solid #dfebee;
  border-radius: 7px;
  width: 27px;
  height: 27px;
  background: #fff;
  color: #718298;
  margin-left: auto;
}
.app {
  margin-left: 238px;
  min-height: 100%;
}
.topbar {
  height: 76px;
  background: #fff;
  border-bottom: 1px solid #e6f0f2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  color: #7b8b9d;
  font-size: 12px;
}
.topbar span:not(.local-badge) {
  margin: 0 10px;
}
.topbar-right {
  display: flex;
  gap: 18px;
  align-items: center;
}
.local-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e4eaf0;
  border-radius: 6px;
  padding: 7px 10px;
  color: #607488;
  font-size: 11px;
}
main {
  max-width: 1600px;
  margin: auto;
  padding: 34px 38px 50px;
}
.loading-start {
  padding: 80px;
  text-align: center;
  color: #6c8095;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin: 25px 0 28px;
}
h1 {
  font-size: 30px;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.9px;
  margin: 0 0 9px;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.35px;
  font-weight: 650;
  margin: 0 0 7px;
}
h3 {
  font-size: 14px;
  margin: 0;
  font-weight: 650;
}
p {
  line-height: 1.65;
  margin: 5px 0;
  color: #718196;
}
.eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: #7a92ac;
  font-weight: 650;
  margin-bottom: 12px;
}
.steps {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 0 24px;
  color: #9aa8b8;
  font-size: 12px;
}
.step {
  display: flex;
  gap: 9px;
  align-items: center;
}
.step b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  border: 1px solid #d9e8ec;
  font-size: 11px;
  font-weight: 500;
  background: #fff;
}
.step.current {
  color: #005e74;
  font-weight: 600;
}
.step.current b {
  background: #00809e;
  border-color: #00809e;
  color: white;
}
.steps .line {
  height: 1px;
  width: 55px;
  background: #dcebee;
}
.primary,
.secondary,
.quiet,
.danger {
  padding: 10px 15px;
  border-radius: 7px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.4;
}
.primary {
  background: #00809e;
  color: white;
  box-shadow: 0 2px 4px #00809e14;
}
.primary:hover {
  background: #006d87;
}
.secondary {
  border-color: #dcebee;
  background: #fff;
  color: #496079;
}
.secondary:hover {
  background: #f5fbfc;
}
.quiet {
  background: transparent;
  color: #637b95;
}
.danger {
  background: #fff3f2;
  color: #b34d44;
  border-color: #f3d5d0;
}
.success-button {
  background: #23816b;
}
.success-button:hover {
  background: #176a57;
}
.panel {
  background: #fff;
  border: 1px solid #e2edf0;
  border-radius: 12px;
  box-shadow: 0 2px 4px #23505b03;
}
.import-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 25px;
  align-items: start;
}
.import-panel {
  padding: 26px 28px;
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 22px;
}
.section-heading .section-icon {
  background: #f0fafc;
  color: #3d90a3;
  border: 1px solid #e6f4f7;
  width: 35px;
  height: 35px;
  text-align: center;
  line-height: 34px;
  border-radius: 9px;
  font-size: 17px;
}
.section-heading p {
  font-size: 11px;
  margin: 1px 0 0;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.field.full {
  grid-column: 1/-1;
}
.field > label,
label.label {
  font-size: 11px;
  font-weight: 600;
  color: #51667e;
}
.field input,
.field select,
.field textarea,
.select-small {
  width: 100%;
  border: 1px solid #dbeaed;
  border-radius: 7px;
  background: #fff;
  color: #2d545d;
  padding: 10px 11px;
  transition: border 0.15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #5baec2;
  box-shadow: 0 0 0 3px #00809e0b;
  outline: none;
}
.field textarea {
  resize: vertical;
  line-height: 1.6;
  min-height: 88px;
}
.field small {
  font-size: 10px;
  color: #97a5b3;
  line-height: 1.5;
}
.divider {
  height: 1px;
  background: #edf0f5;
  margin: 25px 0;
}
.source-tabs {
  display: flex;
  border: 1px solid #e3eef1;
  border-radius: 8px;
  padding: 4px;
  background: #f7fbfc;
  margin: 19px 0;
}
.source-tab {
  flex: 1;
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 9px;
  font-size: 11px;
  color: #7a8da2;
  font-weight: 600;
}
.source-tab.active {
  background: white;
  color: #288095;
  box-shadow: 0 1px 4px #16586712;
}
.file-card {
  display: flex;
  gap: 13px;
  align-items: center;
  background: #f7fdff;
  border: 1px solid #e0f2f6;
  border-radius: 9px;
  padding: 18px;
}
.file-icon {
  height: 42px;
  width: 36px;
  border: 1px solid #cae7ee;
  border-radius: 5px;
  color: #2b879c;
  background: white;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
}
.file-card strong {
  display: block;
  font-size: 12px;
  word-break: break-word;
}
.file-card small {
  display: block;
  color: #8899ad;
  margin-top: 5px;
  font-size: 11px;
}
.file-card .checkmark {
  color: #2c9a7d;
  margin-left: auto;
  font-size: 17px;
}
.asset-summary {
  display: flex;
  gap: 22px;
  font-size: 11px;
  color: #7d8ea2;
  margin-top: 13px;
  padding: 0 3px;
}
.asset-summary b {
  color: #4e6682;
  font-weight: 600;
}
.upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.upload-box {
  position: relative;
  cursor: pointer;
  background: #fbfdfe;
  border: 1px dashed #c9e0e6;
  padding: 21px 10px;
  text-align: center;
  min-height: 104px;
  border-radius: 9px;
}
.upload-box:hover {
  background: #f0fbfe;
  border-color: #88c2d0;
}
.upload-box input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}
.upload-box b {
  display: block;
  color: #368091;
  font-size: 12px;
  margin-bottom: 7px;
}
.upload-box span {
  font-size: 10px;
  color: #8b9bb0;
  word-break: break-word;
}
.options-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
  margin-top: 22px;
}
.panel-footer {
  border-top: 1px solid #edf0f5;
  padding-top: 23px;
  margin-top: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.panel-footer p {
  font-size: 10px;
  max-width: 290px;
}
.aside-card {
  padding: 23px;
  margin-bottom: 18px;
}
.aside-card h3 {
  margin-bottom: 16px;
}
.workflow-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 19px 0;
}
.workflow-item b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid #dcebef;
  border-radius: 7px;
  color: #7089a6;
  background: #f8fbfc;
  font-size: 10px;
  flex-shrink: 0;
}
.workflow-item strong {
  font-size: 11px;
  font-weight: 600;
}
.workflow-item p {
  font-size: 11px;
  line-height: 1.65;
  margin-top: 4px;
}
.aside-note {
  border: 1px solid #dbe9e6;
  background: #f0f8f6;
  color: #5e827a;
  font-size: 11px;
  line-height: 1.8;
  border-radius: 10px;
  padding: 18px 20px;
}
.aside-note strong {
  display: block;
  color: #397565;
  margin-bottom: 4px;
}
.aside-actions {
  margin-top: 20px;
  font-size: 11px;
}
.aside-actions button {
  width: 100%;
  margin: 4px 0;
}
.muted {
  color: #8c9aad;
  font-size: 11px;
}
.capability {
  margin-top: 18px;
  color: #74889f;
  font-size: 10px;
  line-height: 1.8;
}
.banner {
  background: #fff9ef;
  border: 1px solid #f0dfbc;
  color: #947538;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.7;
  margin: 15px 0;
}
.banner.info {
  background: #eefbfe;
  border-color: #d7f3fa;
  color: #56769e;
}
.banner.error {
  background: #fff2f0;
  border-color: #f1d0cb;
  color: #ac5045;
}
.progress-panel {
  max-width: 650px;
  margin: 75px auto;
  padding: 45px;
  text-align: center;
}
.loader {
  width: 43px;
  height: 43px;
  border: 3px solid #e3f2f6;
  border-top-color: #28889e;
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.progress-track {
  height: 7px;
  background: #edf6f8;
  border-radius: 6px;
  overflow: hidden;
  margin: 27px 0 14px;
}
.progress-track div {
  height: 100%;
  background: #3ca0b7;
  transition: width 0.5s;
}
.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #93a2b2;
}
.progress-cost {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #3ca0b7;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 23px;
}
.stat {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 13px;
}
.stat-icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 9px;
  background: #eef9fc;
  color: #4e94a4;
}
.stat-icon.green {
  background: #edf7f3;
  color: #428b72;
}
.stat-icon.orange {
  background: #fff7ea;
  color: #b8924a;
}
.stat strong {
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.8px;
  display: block;
}
.stat small {
  font-size: 10px;
  color: #8b9aab;
  display: block;
  margin-top: 3px;
}
.workspace {
  display: grid;
  grid-template-columns: 255px minmax(250px, 0.95fr) minmax(330px, 1fr);
  gap: 17px;
  align-items: start;
}
.offer-panel {
  overflow: hidden;
}
.offer-tools {
  padding: 16px 13px;
  border-bottom: 1px solid #e9f3f5;
}
.search {
  width: 100%;
  border: 1px solid #e0edf0;
  border-radius: 7px;
  padding: 9px 10px;
  background: #f9fcfd;
  color: #49627d;
  font-size: 11px;
}
.filters {
  display: flex;
  gap: 5px;
  margin-top: 11px;
}
.filter {
  padding: 5px 7px;
  font-size: 10px;
  border-radius: 5px;
  background: none;
  border: 0;
  color: #8998a9;
}
.filter.active {
  background: #eaf8fb;
  color: #2f899e;
  font-weight: 600;
}
.offer-list {
  max-height: calc(100vh - 385px);
  min-height: 330px;
  overflow: auto;
}
.offer-card {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #f0f6f7;
  border-left: 3px solid transparent;
  text-align: left;
  background: #fff;
  padding: 15px 12px;
  color: #41566f;
}
.offer-card:hover {
  background: #f8feff;
}
.offer-card.selected {
  background: #f1fbfd;
  border-left-color: #2c96af;
}
.offer-card-title {
  font-size: 11px;
  font-weight: 650;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}
.offer-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #91a0b1;
}
.offer-card small {
  display: block;
  font-size: 9px;
  margin-top: 5px;
  color: #a4afbd;
}
.dot-review {
  color: #45977e;
}
.dot-pending {
  color: #c39845;
}
.list-footer {
  padding: 11px;
  border-top: 1px solid #e9f3f5;
}
.list-footer button {
  width: 100%;
  font-size: 11px;
}
.preview-panel {
  padding: 0;
  overflow: hidden;
  position: sticky;
  top: 15px;
}
.preview-top {
  padding: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #e5f0f3;
}
.preview-top h3 {
  font-size: 11px;
}
.preview-top .controls {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8a9bb0;
  font-size: 10px;
}
.small-btn {
  padding: 4px 7px;
  background: #fff;
  border: 1px solid #e0edf0;
  border-radius: 4px;
  color: #6c819b;
  font-size: 12px;
  cursor: pointer;
}
.document-select {
  width: 100%;
  padding: 10px;
  border: 0;
  border-bottom: 1px solid #edf4f6;
  font-size: 10px;
  color: #798da5;
  background: #fafdfe;
}
.preview-frame {
  background: #e9f2f4;
  padding: 12px;
  overflow: auto;
  max-height: calc(100vh - 415px);
  min-height: 280px;
  position: relative;
}
.preview-frame img {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: 0 1px 8px #2a4c5421;
  margin: auto;
}
.preview-frame img.loading {
  opacity: 0.45;
}
.preview-footer {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  gap: 8px;
}
.preview-footer button {
  font-size: 10px;
}
.no-preview {
  padding: 70px 20px;
  text-align: center;
  color: #8a9db2;
  font-size: 11px;
  line-height: 1.8;
}
.editor-panel {
  overflow: hidden;
}
.editor-heading {
  padding: 19px 21px;
  border-bottom: 1px solid #e7f2f4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.editor-heading h2 {
  font-size: 14px;
  margin: 0;
}
.pill {
  font-size: 9px;
  padding: 5px 8px;
  background: #fff6e6;
  color: #ae8739;
  border-radius: 5px;
  white-space: nowrap;
}
.pill.green {
  background: #eef7f2;
  color: #39896c;
}
.editor-body {
  padding: 21px;
  max-height: calc(100vh - 395px);
  min-height: 330px;
  overflow: auto;
}
.editor-body .field-grid {
  gap: 14px;
}
.editor-body .field input,
.editor-body .field select,
.editor-body .field textarea {
  font-size: 11px;
  padding: 9px;
}
.editor-body label {
  font-size: 10px;
}
.editor-section {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #8c9eb1;
  margin: 24px 0 14px;
}
.editor-section:first-child {
  margin-top: 0;
}
.field-column {
  font-size: 9px;
  color: #a5b1be;
  font-weight: 400;
  float: right;
  margin-left: 5px;
}
.editor-footer {
  display: flex;
  justify-content: space-between;
  padding: 13px 17px;
  border-top: 1px solid #e6f2f5;
  gap: 10px;
}
.editor-footer .primary {
  font-size: 11px;
}
.issue-box {
  background: #fff9ef;
  border: 1px solid #efdfc1;
  border-radius: 7px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 10px;
  color: #9b7a38;
  line-height: 1.7;
}
.issue-box ul {
  padding-left: 15px;
  margin: 6px 0 0;
}
.version-checks {
  display: flex;
  gap: 18px;
  font-size: 11px;
  color: #788ba2;
  margin-bottom: 17px;
}
.version-checks label {
  display: flex;
  gap: 6px;
  align-items: center;
}
.version-checks input {
  accent-color: #2c8ea5;
}
.advanced {
  border-top: 1px solid #edf1f5;
  margin-top: 22px;
  padding-top: 13px;
}
.advanced summary {
  font-size: 11px;
  color: #6c839e;
  cursor: pointer;
}
.advanced .field-grid {
  margin-top: 15px;
}
.empty-list {
  padding: 35px 15px;
  text-align: center;
  color: #91a2b4;
  font-size: 11px;
  line-height: 1.8;
}
.empty-state {
  padding: 60px 25px;
  text-align: center;
}
.coverage {
  margin-top: 22px;
  padding: 18px 21px;
}
.coverage summary {
  font-size: 11px;
  color: #7489a2;
  cursor: pointer;
}
.page-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
}
.page-chip {
  padding: 6px 9px;
  border: 1px solid #e3eef1;
  border-radius: 5px;
  background: #fafdfe;
  font-size: 10px;
  color: #7288a2;
}
.page-chip.active {
  border-color: #8bd4e5;
  background: #effafd;
}
.page-chip.done {
  background: #edf8f2;
  color: #39846b;
}
.heading-actions {
  display: flex;
  gap: 8px;
}
.export-panel {
  max-width: 850px;
  margin: 35px auto;
  padding: 33px;
}
.export-checks {
  margin: 25px 0;
  border-top: 1px solid #e6f1f4;
  border-bottom: 1px solid #e6f1f4;
}
.export-row {
  padding: 17px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  border-bottom: 1px solid #eff5f7;
}
.export-row:last-child {
  border-bottom: 0;
}
.check-good {
  color: #398b70;
}
.check-bad {
  color: #b38d44;
}
.checkbox-line {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: #758aa1;
  font-size: 11px;
  line-height: 1.6;
  margin: 23px 0;
}
.checkbox-line input {
  accent-color: #2d8ca2;
  margin-top: 3px;
}
.export-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 25px;
}
.download-success {
  padding: 20px;
  background: #f0f8f4;
  border: 1px solid #d7eadd;
  border-radius: 8px;
  margin-top: 22px;
  color: #327a60;
  font-size: 12px;
  line-height: 1.8;
}
.note {
  font-size: 10px;
  color: #8a9cb0;
  line-height: 1.8;
}
.error-text {
  color: #b34d44;
  font-size: 12px;
  margin-top: 14px;
  line-height: 1.7;
}
dialog {
  max-width: 800px;
  width: calc(100% - 40px);
  border: 1px solid #dcecf0;
  border-radius: 13px;
  padding: 30px;
  color: #29525c;
  box-shadow: 0 25px 80px #14455040;
}
dialog::backdrop {
  background: #12363e75;
}
dialog p,
dialog li {
  font-size: 12px;
  line-height: 1.8;
  color: #71839a;
}
dialog pre {
  white-space: pre-wrap;
  max-height: 65vh;
  overflow: auto;
  background: #f7fbfc;
  padding: 18px;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.8;
}
/* Croix de fermeture en haut à droite de toutes les fenêtres. */
dialog#modal {
  position: fixed;
}
dialog #close-modal {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: #66727e;
}
dialog #close-modal:hover,
dialog #close-modal:focus-visible {
  background: #eef2f5;
  border-color: #d3dce2;
  color: #202a33;
  outline: none;
}
dialog #modal-content > h2:first-child {
  padding-right: 40px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: calc(50% + 119px);
  transform: translateX(-50%);
  padding: 12px 20px;
  background: #20515d;
  color: white;
  border-radius: 8px;
  font-size: 12px;
  box-shadow: 0 5px 20px #14455020;
  display: none;
  z-index: 10;
}
#toast.visible {
  display: block;
}
#toast button {
  margin-left: 15px;
  border: 0;
  background: none;
  color: #9ed8f0;
  font: inherit;
  text-decoration: underline;
}
.hidden {
  display: none !important;
}
.file-native {
  font-size: 11px;
  width: 100%;
  margin-top: 7px;
}
.status-line {
  font-size: 11px;
  color: #8c9eb2;
}
.preview-error {
  font-size: 11px;
  color: #b3814e;
  padding: 35px;
}
.text-button {
  padding: 0;
  background: none;
  border: 0;
  color: #2c899f;
  text-decoration: underline;
  font-size: 11px;
}
.inline-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.wide-prompt {
  display: flex;
  gap: 14px;
  align-items: center;
}
.footer-note {
  margin-top: 23px;
  display: flex;
  justify-content: space-between;
  color: #a0adbc;
  font-size: 10px;
}
.field.invalid input,
.field.invalid select {
  border-color: #ddb57c;
  background: #fffcf6;
}
@media (min-width: 1700px) {
  .workspace {
    grid-template-columns: 285px minmax(360px, 1fr) minmax(410px, 1fr);
  }
}
@media (max-width: 1250px) {
  .sidebar {
    width: 195px;
    padding: 26px 15px;
  }
  .app {
    margin-left: 195px;
  }
  .brand {
    font-size: 20px;
  }
  .brand-sub {
    font-size: 8px;
  }
  .topbar {
    padding: 0 24px;
  }
  main {
    padding: 28px 24px;
  }
  .import-grid {
    grid-template-columns: 1fr 255px;
    gap: 18px;
  }
  .workspace {
    grid-template-columns: 210px minmax(260px, 1fr);
    gap: 14px;
  }
  .preview-panel {
    position: static;
    grid-column: 2;
    grid-row: 1;
  }
  .editor-panel {
    grid-column: 2;
    grid-row: 2;
  }
  .offer-panel {
    grid-row: 1/3;
  }
  .offer-list {
    max-height: 1000px;
  }
  .preview-frame {
    max-height: 420px;
  }
  .editor-body {
    max-height: none;
  }
  .stat {
    padding: 14px;
  }
  .heading-actions .secondary {
    font-size: 10px;
  }
  #toast {
    left: calc(50% + 97px);
  }
}
@media (max-width: 900px) {
  .sidebar {
    width: 68px;
    padding: 24px 10px;
  }
  .brand > span:last-child,
  .brand-sub,
  .new-button,
  .side-label,
  .nav-item,
  .operation-nav,
  .sidebar-bottom {
    display: none;
  }
  .brand-icon {
    width: 42px;
  }
  .app {
    margin-left: 68px;
  }
  .topbar {
    height: 60px;
    padding: 0 18px;
  }
  .local-badge {
    display: none;
  }
  main {
    padding: 22px 18px;
  }
  .import-grid {
    grid-template-columns: 1fr;
  }
  .import-aside {
    display: none;
  }
  .stats {
    gap: 8px;
  }
  .stat {
    padding: 12px;
    gap: 8px;
  }
  .stat-icon {
    display: none;
  }
  .workspace {
    grid-template-columns: 185px minmax(0, 1fr);
  }
  h1 {
    font-size: 25px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .heading-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  #toast {
    left: calc(50% + 34px);
  }
}
@media (max-width: 600px) {
  .sidebar {
    display: none;
  }
  .app {
    margin-left: 0;
  }
  .topbar {
    padding: 0 15px;
    font-size: 10px;
  }
  .topbar-right {
    gap: 0;
  }
  .steps {
    gap: 9px;
    font-size: 10px;
  }
  .steps .line {
    width: 18px;
  }
  .page-heading {
    display: block;
  }
  .heading-actions {
    justify-content: flex-start;
    margin-top: 16px;
  }
  .field-grid,
  .options-row {
    grid-template-columns: 1fr;
  }
  .upload-grid {
    grid-template-columns: 1fr;
  }
  .import-panel {
    padding: 20px;
  }
  .panel-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .panel-footer p {
    max-width: none;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stat strong {
    font-size: 20px;
  }
  .workspace {
    display: block;
  }
  .offer-panel {
    margin-bottom: 15px;
  }
  .offer-list {
    min-height: 0;
    max-height: 240px;
  }
  .preview-panel {
    margin-bottom: 15px;
  }
  .preview-frame {
    max-height: 400px;
  }
  .editor-body {
    max-height: none;
  }
  .field.full {
    grid-column: auto;
  }
  #toast {
    left: 50%;
    max-width: 90%;
    width: max-content;
  }
  .export-panel {
    padding: 23px;
  }
  .export-actions {
    flex-wrap: wrap;
  }
  .footer-note {
    display: block;
    line-height: 1.8;
  }
  .brand {
    font-size: 20px;
  }
}

.compare-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin: 18px 0;
}
.compare-controls,
.compare-fields,
.compare-actions {
  padding: 22px;
}
.compare-document {
  padding: 12px;
  min-width: 0;
}
.compare-image-scroll {
  max-height: 650px;
  overflow: auto;
  background: #eee;
}
.compare-image {
  position: relative;
  line-height: 0;
}
.compare-image img {
  width: 100%;
  display: block;
}
.compare-image svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
.compare-image rect.proposed {
  fill: #ff9e0060;
  stroke: #d77500;
  stroke-width: 3;
}
.compare-image rect.confirmed {
  fill: #ffff005c;
  stroke: #8a7700;
  stroke-width: 3;
}
.compare-fields input {
  width: 100%;
}
.compare-controls select {
  width: 100%;
  min-width: 0;
}
.compare-actions {
  margin: 20px 0;
}
.compare-two .inline-actions {
  flex-wrap: wrap;
}
@media (max-width: 1000px) {
  .compare-two {
    grid-template-columns: 1fr;
  }
}

/* Accueil : parcours séparés et historique lisible. */
.home-workflows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 30px 0 22px;
}
.workflow-card {
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.workflow-card h2 {
  font-size: 23px;
  margin: 0;
  color: #20515d;
}
.workflow-card p {
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
  color: #5e7188;
  flex: 1;
}
.workflow-card small {
  font-size: 12px;
  line-height: 1.65;
  color: #6b7f96;
}
.workflow-card .primary,
.workflow-card .secondary {
  font-size: 13px;
}
.workflow-kicker {
  font-size: 11px;
  letter-spacing: 1.2px;
  font-weight: 700;
  color: #478e9f;
}
.resume-card {
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  border-left: 4px solid #458b74;
}
.resume-card h3 {
  font-size: 16px;
  margin: 9px 0 5px;
}
.resume-card p {
  margin: 0;
  font-size: 12px;
  color: #61758d;
}
.home-history {
  padding: 26px 28px;
  margin-bottom: 22px;
}
.history-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 16px;
}
.history-heading h2 {
  font-size: 19px;
  margin: 0;
}
.history-heading p {
  font-size: 12px;
  color: #6b7f96;
  margin: 6px 0 0;
}
.history-heading input {
  max-width: 290px;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #d9e9ed;
  border-radius: 7px;
  font: inherit;
  font-size: 13px;
}
.home-row {
  display: flex;
  gap: 18px;
  align-items: center;
  text-align: left;
  width: 100%;
  padding: 17px 2px;
  background: transparent;
  border: 0;
  border-top: 1px solid #e9f2f4;
  color: #29525c;
  cursor: pointer;
  font: inherit;
}
.home-row:hover {
  background: #f4fafc;
}
.home-row:focus-visible {
  outline: 2px solid #419fb5;
  outline-offset: 2px;
}
.home-row > span:first-child {
  flex: 1;
  min-width: 0;
}
.home-row strong {
  font-size: 14px;
  display: block;
  overflow-wrap: anywhere;
}
.home-row small {
  font-size: 12px;
  color: #71839a;
  display: block;
  margin-top: 7px;
}
.source-tag {
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 20px;
  background: #edf6f8;
  color: #5e7188;
  white-space: nowrap;
}
.source-tag.source-visual {
  background: #e9f5ee;
  color: #2e7458;
}
.home-empty {
  font-size: 13px;
  color: #71839a;
  padding: 20px 0;
}
@media (max-width: 950px) {
  .home-workflows {
    grid-template-columns: 1fr;
  }
  .workflow-card {
    padding: 24px;
  }
  .source-tag {
    display: none;
  }
}
@media (max-width: 600px) {
  .history-heading,
  .resume-card {
    align-items: flex-start;
    flex-direction: column;
  }
  .history-heading input {
    max-width: none;
  }
  .home-history {
    padding: 20px;
  }
  .home-row strong {
    font-size: 13px;
  }
}

.breadcrumb-home {
  border: 0;
  background: transparent;
  padding: 0;
  color: #478e9f;
  font: inherit;
  cursor: pointer;
}
.breadcrumb-home:hover {
  text-decoration: underline;
}
.breadcrumb-home:focus-visible {
  outline: 2px solid #419fb5;
  outline-offset: 4px;
}

/* Comparaison des catalogues */
.cmp-steps {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin: 0 0 26px;
  color: #7b8b9d;
  font-size: 12px;
}
.cmp-steps span {
  display: flex;
  gap: 9px;
  align-items: center;
}
.cmp-steps b {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e9f3f5;
}
.cmp-steps .active {
  color: #00809e;
  font-weight: 650;
}
.cmp-steps .active b {
  background: #00809e;
  color: white;
}
.cmp-import {
  max-width: 1100px;
}
.cmp-upload-grid {
  margin: 24px 0;
}
.cmp-upload {
  padding: 25px;
  border: 1px solid #dcebef;
  border-radius: 12px;
  background: #f8feff;
  min-width: 0;
}
.cmp-upload-target {
  background: #fffef3;
  border-color: #e9e4b9;
}
.cmp-kicker {
  font-size: 10px;
  letter-spacing: 1.3px;
  font-weight: 700;
  color: #5e7491;
}
.cmp-upload h2 {
  font-size: 20px;
  margin: 14px 0 7px;
}
.cmp-upload p {
  font-size: 12px;
  min-height: 40px;
}
.cmp-file {
  display: block;
  position: relative;
  border: 1px dashed #9bc8d2;
  background: #ffffffb5;
  border-radius: 8px;
  text-align: center;
  padding: 22px 12px;
  margin-top: 20px;
  color: #00809e;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.cmp-file input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}
.cmp-file:focus-within {
  outline: 2px solid #00809e;
  outline-offset: 3px;
}
.cmp-file-summary {
  font-size: 12px;
  color: #718196;
  margin-top: 14px;
  max-height: 180px;
  overflow: auto;
}
.cmp-file-summary div {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  border-top: 1px solid #e3e8ef;
  padding: 10px 0;
}
.cmp-file-summary strong {
  overflow-wrap: anywhere;
  font-weight: 500;
  color: #405873;
}
.cmp-file-summary small {
  white-space: nowrap;
}
.cmp-rule {
  display: flex;
  gap: 18px;
  align-items: center;
  border: 1px solid #e6e9d0;
  border-radius: 9px;
  padding: 18px;
  background: #fffff8;
}
.cmp-highlight {
  background: #f5f58b;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 12px;
  white-space: nowrap;
  color: #615b20;
}
.cmp-rule strong {
  font-size: 13px;
}
.cmp-rule p {
  font-size: 12px;
  margin: 5px 0 0;
}
.cmp-options {
  margin-top: 24px;
  border-top: 1px solid #e5f0f2;
  padding-top: 20px;
}
.cmp-options summary {
  cursor: pointer;
  color: #40737f;
  font-size: 13px;
  font-weight: 600;
}
.cmp-options summary span {
  font-size: 11px;
  color: #8898aa;
  margin-left: 10px;
  font-weight: 400;
}
.cmp-options .field-grid {
  margin-top: 20px;
}
.cmp-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.cmp-metric {
  padding: 20px;
}
.cmp-metric strong {
  display: block;
  font-size: 28px;
  letter-spacing: -1px;
  margin-bottom: 7px;
}
.cmp-metric span {
  font-size: 12px;
  color: #657a92;
}
.cmp-metric.yellow {
  background: #fffedc;
  border-color: #e6e2a5;
}
.cmp-tools {
  display: flex;
  gap: 20px;
  align-items: end;
  border-bottom: 1px solid #e5f0f2;
  padding-bottom: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.cmp-tools > .field {
  flex: 1;
  min-width: 200px;
}
.cmp-filters {
  display: flex;
  gap: 3px;
  padding: 4px;
  background: #f0f7f9;
  border-radius: 8px;
}
.cmp-filters button {
  border: 0;
  border-radius: 5px;
  background: transparent;
  padding: 10px 12px;
  color: #687f99;
  font-size: 12px;
  cursor: pointer;
}
.cmp-filters button[aria-pressed='true'] {
  background: white;
  color: #00809e;
  box-shadow: 0 1px 4px #16586715;
  font-weight: 650;
}
.cmp-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #6a8098;
}
.cmp-batch {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  margin-top: 20px;
}
.cmp-batch label {
  font-size: 12px;
  font-weight: 650;
}
.cmp-batch select {
  flex: 1;
  min-width: 0;
  padding: 10px;
  border: 1px solid #dbeaed;
  border-radius: 6px;
  color: #29525c;
  background: white;
}
.cmp-batch span {
  font-size: 11px;
  color: #718196;
}
.compare-document .preview-top h3 {
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.compare-image-scroll {
  background: #e9f2f4;
  padding: 12px;
  border-radius: 7px;
}
.compare-image {
  box-shadow: 0 2px 12px #20515d18;
}
.compare-actions {
  border-top: 3px solid #00809e;
}
.compare-actions > p {
  font-size: 12px;
  max-width: 800px;
  margin: 8px 0 18px;
}
.compare-controls .checkbox-line {
  padding: 14px;
  background: #f8fbfc;
  border-radius: 7px;
  margin-bottom: 0;
}
.compare-document .preview-top {
  margin-bottom: 10px;
}
.compare-fields h3 {
  margin-bottom: 18px;
}
#compare-progress-bar {
  width: 100%;
  height: 9px;
  margin-top: 20px;
  accent-color: #00809e;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
@media (max-width: 750px) {
  .cmp-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cmp-batch {
    flex-wrap: wrap;
  }
  .cmp-batch select {
    flex-basis: 100%;
  }
  .cmp-rule {
    align-items: flex-start;
    flex-direction: column;
  }
  .cmp-steps {
    gap: 14px;
    font-size: 11px;
  }
  .cmp-upload {
    padding: 20px;
  }
  .cmp-tools {
    gap: 14px;
  }
  .cmp-metric {
    padding: 16px;
  }
}

.cmp-catalogue-visual {
  padding: 16px 18px;
  border: 1px solid #dfecef;
  border-radius: 8px;
  background: #f8feff;
  margin-top: 12px;
}
.cmp-catalogue-visual > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #405873;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}
.cmp-catalogue-visual input {
  max-width: 100%;
  font-size: 12px;
}
.cmp-catalogue-visual .note {
  margin-top: 10px;
}

/* Navigation principale : survol, sélection et clavier. */
.sidebar .nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  margin-bottom: 6px;
  position: relative;
  transition:
    background-color 0.15s,
    color 0.15s,
    box-shadow 0.15s;
  line-height: 1.45;
}
.sidebar .nav-item .nav-icon {
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  font-size: 21px;
  margin: 0;
  line-height: 1;
}
.sidebar .nav-item .nav-label {
  font-size: 12px;
  margin: 0;
  vertical-align: baseline;
}
.sidebar .nav-item:hover {
  background: #f0f8fa;
  color: #005e74;
}
.sidebar .nav-item:active {
  background: #dff5fa;
  box-shadow: inset 0 0 0 1px #c1e3eb;
}
.sidebar .nav-item.active {
  background: #eaf9fd;
  color: #00809e;
  box-shadow: inset 3px 0 0 #00809e;
}
.sidebar .nav-item.active:hover {
  background: #dff6fb;
}
.sidebar .nav-item:focus-visible {
  outline: 2px solid #44a3b9;
  outline-offset: 2px;
}
@media (max-width: 900px) {
  .sidebar .nav-item {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar .nav-item {
    transition: none;
  }
}

/* Carte du fichier produit, près du nom modifiable. */
.product-visual-card {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid #dcebef;
  border-radius: 14px;
  background: linear-gradient(120deg, #f5fbfc, #fff 70%);
}
.product-visual-preview {
  width: 124px;
  height: 124px;
  flex: 0 0 124px;
  overflow: hidden;
  border: 1px solid #e5f0f2;
  border-radius: 11px;
  background: #fff;
}
.product-visual-zoom {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 10px;
  background: #fff;
}
.product-visual-zoom img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.product-visual-zoom-hint {
  position: absolute;
  inset: auto 0 0;
  padding: 5px;
  background: #edf8fadf;
  color: #287d91;
  font-size: 10px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 150ms;
}
.product-visual-zoom:hover .product-visual-zoom-hint,
.product-visual-zoom:focus-visible .product-visual-zoom-hint {
  opacity: 1;
}
.product-visual-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #93a2b5;
  font-size: 11px;
}
.product-visual-details {
  min-width: 0;
  flex: 1;
}
.product-visual-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: #7d8da1;
  font-size: 9px;
  letter-spacing: 1.3px;
  font-weight: 700;
}
.product-visual-details input {
  width: 100%;
  background: #fff;
}
.product-visual-status {
  margin: 9px 0 5px;
  color: #467783;
  font-size: 12px;
}
.product-visual-details small {
  display: block;
  line-height: 1.5;
  color: #8794a5;
}
.product-visual-lightbox {
  display: grid;
  place-items: center;
  padding: 20px;
  background: #f8fbfc;
  border-radius: 12px;
}
.product-visual-lightbox img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
}
.product-visual-lightbox-name {
  text-align: center;
  color: #728299;
  overflow-wrap: anywhere;
}
@media (max-width: 520px) {
  .product-visual-card {
    padding: 12px;
    gap: 12px;
  }
  .product-visual-preview {
    width: 88px;
    height: 100px;
    flex-basis: 88px;
  }
}

/* ------------------------------------------------------------------
   Thème Toucan : couleurs du client Toucan (core-ui/_theme.scss),
   en-tête en dégradé, barre latérale blanche, crédits et À propos.
   ------------------------------------------------------------------ */
:root {
  --tc-accent: #00809e;
  --tc-accent-hover: #006d87;
  --tc-accent-ink: #005e74;
  --tc-soft: #e3f2f5;
  --tc-chip: #d9eef2;
  --tc-page: #f3f6f8;
  --tc-fg: #202a33;
  --tc-muted: #56626d;
  --tc-line: #d3dce2;
  --tc-header: linear-gradient(90deg, #0796c2 0%, #00809e 100%);
  --tc-header-h: 60px;
}
html,
body {
  color: var(--tc-fg);
  background: var(--tc-page);
}
.app-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--tc-header-h);
  z-index: 4;
  display: flex;
  align-items: center;
  padding: 0 22px;
  background: var(--tc-header);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}
.app-header .brand {
  font-size: 16px;
  letter-spacing: 0;
  color: #fff;
  gap: 12px;
}
.app-header .brand-icon {
  width: 36px;
  height: 36px;
  line-height: 34px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.app-header .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.app-header .brand-sub {
  font-size: 11px;
  letter-spacing: 0.2px;
  color: #eaf7fa;
  font-weight: 500;
  margin-top: 1px;
}
.sidebar {
  top: var(--tc-header-h);
  border-right-color: var(--tc-line);
  padding-top: 22px;
}
.app {
  padding-top: var(--tc-header-h);
}
.new-button {
  margin: 0 0 26px;
  border-radius: 999px;
  background: var(--tc-accent);
  box-shadow: none;
}
.new-button:hover {
  background: var(--tc-accent-hover);
}
.primary {
  background: var(--tc-accent);
  box-shadow: none;
}
.primary:hover {
  background: var(--tc-accent-hover);
}
.sidebar .nav-item {
  color: #3b4752;
}
.sidebar .nav-item:hover {
  background: var(--tc-soft);
  color: var(--tc-accent-ink);
}
.sidebar .nav-item.active {
  background: var(--tc-soft);
  color: var(--tc-accent-ink);
  box-shadow: inset 3px 0 0 var(--tc-accent);
}
.sidebar .nav-item:focus-visible {
  outline-color: var(--tc-accent);
}
.side-label {
  color: #66727e;
}
.progress-track div {
  background: var(--tc-header);
}
.progress-cost {
  color: var(--tc-accent-ink);
}
.credits {
  margin-top: 12px;
  padding: 10px 4px 0;
  border: 0;
  background: none;
  text-align: left;
  font-size: 11px;
  line-height: 1.5;
  color: var(--tc-muted);
}
.credits strong {
  color: var(--tc-fg);
  font-weight: 600;
}
.credits:hover strong {
  color: var(--tc-accent-ink);
}

/* À propos */
.about-hero {
  margin: 8px 0 0;
  padding: 44px 44px 80px;
  border-radius: 16px;
  background: var(--tc-header);
  color: #fff;
}
.about-hero h1 {
  margin: 14px 0;
  font-size: 44px;
  line-height: 1.08;
  max-width: 760px;
  letter-spacing: -0.02em;
}
.about-hero p {
  margin: 0;
  max-width: 660px;
  font-size: 16px;
  line-height: 1.6;
  color: #f2fafc;
}
.about-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}
.about-people {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin: -48px 24px 22px;
}
.about-person {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(32, 42, 51, 0.08);
}
.about-person h2 {
  margin: 0;
  font-size: 24px;
}
.about-person p {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--tc-muted);
}
.about-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-bottom: 8px;
  display: grid;
  place-items: center;
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  background: var(--tc-header);
}
.about-role {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--tc-chip);
  color: var(--tc-accent-ink);
}
.about-principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.about-principle {
  padding: 16px 18px;
  border-top: 3px solid var(--tc-accent);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.about-principle span {
  font-size: 13px;
  line-height: 1.55;
  color: var(--tc-muted);
}
.about-version {
  margin-top: 22px;
  font-size: 12px;
  color: var(--tc-muted);
}
@media (max-width: 900px) {
  .credits {
    display: none;
  }
}
@media (max-width: 600px) {
  .app-header .brand-sub {
    display: none;
  }
  .about-hero {
    padding: 28px 22px 70px;
  }
  .about-hero h1 {
    font-size: 30px;
  }
  .about-people {
    margin: -48px 10px 18px;
  }
}

/* Zones de dépôt pour les champs de fichier. */
.file-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  padding: 14px 16px;
  min-height: 64px;
  border: 1.5px dashed #a9b8c3;
  border-radius: 12px;
  background: #f7f9fb;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background-color 0.15s;
}
.file-picker input[type='file'] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.file-picker:hover,
.file-picker.dragging {
  border-color: var(--tc-accent);
  background: var(--tc-soft);
}
.file-picker:focus-within {
  outline: 2px solid var(--tc-accent);
  outline-offset: 2px;
}
.file-picker.has-files {
  border-style: solid;
  border-color: var(--tc-accent);
  background: #fff;
}
.file-picker-icon {
  flex: 0 0 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--tc-chip);
  color: var(--tc-accent-ink);
  font-size: 19px;
}
.file-picker-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.file-picker-text strong {
  font-size: 13px;
  color: var(--tc-accent-ink);
}
.file-picker-text small {
  font-size: 11px;
  color: var(--tc-muted);
  margin: 0;
}
.file-picker-state {
  margin-left: auto;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  color: var(--tc-muted);
}
.file-picker.has-files .file-picker-state {
  color: #146e4d;
}
@media (prefers-reduced-motion: reduce) {
  .file-picker {
    transition: none;
  }
}

/* Tableau de bord */
.dash-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin: 6px 0 22px;
}
.dash-head h1 {
  margin: 0 0 6px;
  font-size: 30px;
  letter-spacing: -0.01em;
}
.dash-head p {
  margin: 0;
  font-size: 14px;
  color: var(--tc-muted);
}
.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.dash-actions button {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 13px;
}
.dash-steps {
  padding: 20px 24px;
  margin-bottom: 20px;
}
.dash-steps-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.dash-steps-head h2 {
  margin: 0;
  font-size: 16px;
}
.dash-steps-head span {
  font-size: 12px;
  color: var(--tc-muted);
}
.dash-steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.dash-steps li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f7f9fb;
}
.dash-steps li.first {
  background: var(--tc-soft);
}
.dash-steps li span {
  font-size: 12px;
  font-weight: 700;
  color: var(--tc-accent-ink);
}
.dash-steps li strong {
  font-size: 14px;
}
.dash-steps li small {
  font-size: 12px;
  line-height: 1.45;
  color: var(--tc-muted);
}
.dash-ops {
  margin: 22px 0;
}
.dash-ops-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.dash-ops-head h2 {
  margin: 0;
  font-size: 19px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.count-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--tc-chip);
  color: var(--tc-accent-ink);
}
.dash-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.dash-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-pill {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--tc-line);
  background: #fff;
  color: #3b4752;
  font-size: 12px;
  font-weight: 500;
}
.filter-pill:hover {
  border-color: var(--tc-accent);
}
.filter-pill.active {
  border-color: var(--tc-accent);
  background: var(--tc-accent);
  color: #fff;
  font-weight: 600;
}
.dash-tools input[type='search'] {
  min-height: 36px;
  width: 240px;
  max-width: 100%;
  padding: 0 14px;
  border: 1px solid var(--tc-line);
  border-radius: 999px;
  background: #fff;
}
.dash-tools input[type='search']:focus {
  outline: 2px solid var(--tc-accent);
  outline-offset: 1px;
}
.op-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.op-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--tc-line);
  border-radius: 14px;
  color: var(--tc-fg);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.op-card:hover {
  border-color: var(--tc-accent);
  box-shadow: 0 6px 18px rgba(0, 128, 158, 0.12);
}
.op-card:focus-visible {
  outline: 2px solid var(--tc-accent);
  outline-offset: 2px;
}
.op-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.op-card-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.op-card-title small {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #5a6672;
}
.op-card-title strong {
  font-size: 17px;
  overflow-wrap: anywhere;
}
.op-card-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.op-card-step {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--tc-muted);
}
.op-card-bar {
  display: block;
  height: 8px;
  border-radius: 99px;
  background: #e9eef2;
  overflow: hidden;
}
.op-card-fill {
  display: block;
  height: 100%;
  background: var(--tc-accent);
}
.op-card-fill.ready {
  background: #1b9467;
}
.op-card-fill.running {
  background: var(--tc-header);
}
.op-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.chip-soft {
  background: var(--tc-chip);
  color: var(--tc-accent-ink);
}
.chip-info {
  background: var(--tc-chip);
  color: var(--tc-accent-ink);
}
.chip-success {
  background: #e3f4ec;
  color: #146e4d;
}
.chip-warning {
  background: #fdf0dc;
  color: #8a5300;
}
.chip-danger {
  background: #fbe9e9;
  color: #a33636;
}
.chip-muted {
  background: #eef2f5;
  color: #56626d;
}
@media (prefers-reduced-motion: reduce) {
  .op-card {
    transition: none;
  }
}

/* Lecture en cours */
.run-head {
  margin: 4px 0 18px;
}
.run-head .eyebrow {
  color: var(--tc-accent-ink);
}
.run-head h1 {
  margin: 6px 0;
}
.run-head .note {
  margin: 0;
  color: var(--tc-muted);
}
.run-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.run-progress,
.run-cost,
.run-pages {
  padding: 22px 24px;
}
.run-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}
.run-progress-head h2 {
  margin: 0;
  font-size: 17px;
}
#progress-percent {
  font-size: 28px;
  font-weight: 700;
  color: var(--tc-accent);
}
.run-progress .progress-track {
  height: 12px;
  border-radius: 99px;
}
.run-message {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--tc-muted);
}
.run-message .loader {
  width: 16px;
  height: 16px;
  border-width: 2px;
  margin: 0;
  flex-shrink: 0;
}
.run-cost {
  border-top: 4px solid var(--tc-accent);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.run-cost-live {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--tc-muted);
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1b9467;
}
#cost-total {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--tc-accent-ink);
}
.run-cost .progress-cost {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--tc-muted);
}
.run-cost dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--tc-line);
}
.run-cost dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
.run-cost dt {
  color: var(--tc-muted);
}
.run-cost dd {
  margin: 0;
  font-weight: 600;
}
.run-cost dd.free {
  color: #146e4d;
}
.run-pages-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.run-pages-head h2 {
  margin: 0;
  font-size: 17px;
}
.run-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 11px;
  color: var(--tc-muted);
}
.run-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.run-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.run-legend i.done {
  background: #1b9467;
}
.run-legend i.current {
  background: var(--tc-accent);
}
.run-legend i.wait {
  border: 1px solid #a9b8c3;
}
.page-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 12px;
}
.page-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}
.page-sheet {
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  border: 2px solid #d3dce2;
  background: #f7f9fb;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 6px;
}
.page-sheet b {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  background: #fff;
  color: #5a6672;
}
.page-tile.done .page-sheet {
  border-color: #1b9467;
  background: #e3f4ec;
}
.page-tile.done .page-sheet b {
  color: #146e4d;
}
.page-tile.current .page-sheet {
  border-color: var(--tc-accent);
  background: var(--tc-soft);
}
.page-tile.current .page-sheet b {
  color: var(--tc-accent-ink);
}
.page-tile small {
  font-size: 11px;
  color: var(--tc-muted);
}
@media (max-width: 900px) {
  .run-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Candidats visuels (CLIP, pixels, nom) dans la fiche */
.visual-candidates {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--tc-line);
  border-radius: 12px;
  background: #fff;
}
.visual-candidates-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.visual-candidates-head strong {
  font-size: 13px;
}
.visual-candidates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}
.visual-candidate {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 7px;
  border: 2px solid var(--tc-line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  min-width: 0;
}
.visual-candidate:hover {
  border-color: #7cc3d3;
}
.visual-candidate.selected {
  border-color: var(--tc-accent);
  background: var(--tc-soft);
}
.visual-candidate:focus-visible {
  outline: 2px solid var(--tc-accent);
  outline-offset: 2px;
}
.visual-candidate-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  background: #f7f9fb;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.visual-candidate-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.visual-candidate-name {
  font-size: 11px;
  color: #3b4752;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.visual-candidate-score {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #3b4752;
  white-space: nowrap;
}
.score-bar {
  flex: 1;
  height: 5px;
  border-radius: 9px;
  background: #e9eef2;
  overflow: hidden;
}
.score-bar span {
  display: block;
  height: 100%;
  background: #1b9467;
}
.visual-candidates-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--tc-muted);
}

/* Étapes de l'opération dans la barre latérale */
.op-steps {
  display: none;
}
body.in-operation .op-steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
body.in-operation .sidebar > .side-label,
body.in-operation .sidebar > .nav-item,
body.in-operation .sidebar > .operation-nav {
  display: none;
}
.op-steps-back {
  align-self: flex-start;
  border: 0;
  background: none;
  padding: 6px 4px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--tc-accent);
}
.op-steps-back:hover {
  color: var(--tc-accent-hover);
}
.op-steps-label {
  margin-bottom: 6px;
}
.op-steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.op-step-row,
.op-step button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  text-align: left;
  font-size: 13px;
  color: #56626d;
}
.op-step button:hover {
  background: var(--tc-soft);
  color: var(--tc-accent-ink);
}
.op-step.done .op-step-row,
.op-step.done button {
  color: #146e4d;
  font-weight: 500;
}
.op-step.current .op-step-row,
.op-step.current button {
  background: var(--tc-soft);
  color: var(--tc-accent-ink);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--tc-accent);
}
.op-step-dot {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid #a9b8c3;
  box-sizing: border-box;
}
.op-step.current .op-step-dot {
  border-color: var(--tc-accent);
  background: radial-gradient(circle, var(--tc-accent) 0 3px, transparent 3.5px);
}
@media (max-width: 900px) {
  body.in-operation .op-steps {
    display: none;
  }
}

/* Barre de l'écran de contrôle */
.op-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 16px;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--tc-line);
  border-radius: 14px;
}
.op-bar-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.op-bar-title small {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #5a6672;
}
.op-bar-title h1 {
  margin: 0;
  font-size: 22px;
  overflow-wrap: anywhere;
}
.op-bar-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--tc-muted);
}
.op-bar-track {
  display: block;
  width: 180px;
  height: 8px;
  border-radius: 99px;
  background: #e9eef2;
  overflow: hidden;
}
.op-bar-track span {
  display: block;
  height: 100%;
  background: #1b9467;
}
.op-bar .heading-actions button {
  min-height: 40px;
  border-radius: 999px;
  padding: 0 18px;
}

/* En-tête : recherche au centre, coût du mois à droite (maquette) */
.app-header {
  gap: 20px;
}
.header-search {
  flex: 0 1 420px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
}
.header-search:focus-within {
  background: rgba(255, 255, 255, 0.24);
  outline: 2px solid #fff;
  outline-offset: 1px;
}
.header-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 13px;
}
.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.85);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  white-space: nowrap;
}
.header-local i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7fe0b5;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
/* Fil d'Ariane discret, au-dessus du contenu */
.topbar {
  height: auto;
  min-height: 44px;
  background: transparent;
  border-bottom: 0;
  padding-top: 14px;
}
/* Carte « Visuels produits » en bas de la barre latérale */
.side-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid var(--tc-line);
  border-radius: 12px;
  background: #f7f9fb;
}
.side-card span {
  font-size: 11px;
  color: var(--tc-muted);
}
.side-card strong {
  font-size: 12px;
  color: #146e4d;
}
@media (max-width: 1100px) {
  .header-local {
    display: none;
  }
}
@media (max-width: 900px) {
  .side-card {
    display: none;
  }
  .header-search {
    flex-basis: 220px;
  }
}
@media (max-width: 600px) {
  .header-search,
  .header-right {
    display: none;
  }
}

body.in-operation .side-card {
  margin-top: auto;
}

/* Résumé repliable au-dessus des 3 colonnes de contrôle */
.review-details {
  margin: 0 0 16px;
  background: #fff;
  border: 1px solid var(--tc-line);
  border-radius: 12px;
}
.review-details > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  min-height: 44px;
  padding: 0 18px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--tc-accent-ink);
}
.review-details > summary #review-summary-line {
  font-weight: 500;
  color: var(--tc-muted);
}
.review-details[open] {
  padding-bottom: 14px;
}
.review-details[open] > :not(summary) {
  margin-left: 16px;
  margin-right: 16px;
}

/* Entrée « Récentes » avec compteur, crédits + bouton À propos en bas */
.sidebar .nav-item .nav-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--tc-chip);
  color: var(--tc-accent-ink);
}
.sidebar-legacy[hidden] {
  display: none !important;
}
.side-card {
  margin-top: auto;
}
.credits-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.credits-row .credits {
  margin-top: 0;
  flex: 1;
}
.about-button {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-left: 0;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 14px;
  color: var(--tc-accent-ink);
  border-color: var(--tc-line);
}
.about-button:hover,
.about-button.active {
  background: var(--tc-accent);
  border-color: var(--tc-accent);
  color: #fff;
}
.about-button:focus-visible {
  outline: 2px solid var(--tc-accent);
  outline-offset: 2px;
}
@media (max-width: 900px) {
  .credits-row {
    display: none;
  }
}

/* Nouvelle opération : 4 blocs + récapitulatif fixe */
.imp-head {
  margin: 4px 0 18px;
}
.imp-head span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #5a6672;
}
.imp-head h1 {
  margin: 4px 0;
  font-size: 28px;
}
.imp-head p {
  margin: 0;
  font-size: 14px;
  color: var(--tc-muted);
}
.imp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}
.imp-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.imp-block {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.imp-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.imp-block-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.imp-block-title h2 {
  margin: 0;
  font-size: 16px;
}
.imp-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--tc-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.imp-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
.imp-row .field,
.imp-two .field {
  margin: 0;
}
.imp-row .field > label,
.imp-two .field > label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: #3b4752;
}
.imp-row .field input,
.imp-row .field select {
  min-height: 42px;
  border-color: var(--tc-line);
  border-radius: 8px;
  font-size: 14px;
}
.imp-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.imp-two label small {
  font-weight: 400;
  color: var(--tc-muted);
}
/* Segmenté Importer / Bibliothèque */
.seg {
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background: #eef2f5;
}
.seg .source-tab {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--tc-muted);
  font-size: 12px;
  font-weight: 500;
  box-shadow: none;
}
.seg .source-tab.active {
  background: #fff;
  color: var(--tc-accent-ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
/* Zones de dépôt des catalogues */
.imp-block .upload-box {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  min-height: 0;
  border-radius: 12px;
}
.imp-block .upload-box b {
  margin: 0;
  font-size: 13px;
  color: var(--tc-accent-ink);
}
.imp-block .upload-box .file-selection {
  font-size: 12px;
  color: var(--tc-muted);
}
.upload-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.upload-main {
  padding: 22px;
  border: 2px dashed #7cc3d3;
  background: #f2fafc;
}
.upload-main:hover {
  border-color: var(--tc-accent);
  background: var(--tc-soft);
}
.upload-main b {
  font-size: 15px !important;
}
.upload-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--tc-accent);
  color: #fff;
}
.upload-minor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.upload-small {
  padding: 12px 14px;
  border: 1.5px dashed #a9b8c3;
  background: #f7f9fb;
}
.upload-plus {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--tc-chip);
  color: var(--tc-accent-ink) !important;
  font-size: 15px !important;
  font-weight: 700;
}
.upload-box:focus-within {
  outline: 2px solid var(--tc-accent);
  outline-offset: 2px;
}
/* Carte du modèle Excel */
.template-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid var(--tc-line);
  border-radius: 12px;
  background: #fff;
}
.template-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #e3f4ec;
  color: #146e4d;
  font-size: 11px;
  font-weight: 700;
}
.template-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.template-text strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.template-text small {
  font-size: 11px;
  color: var(--tc-muted);
}
.template-change {
  margin-left: auto;
  flex-shrink: 0;
  padding: 7px 14px;
  border: 1px solid var(--tc-line);
  border-radius: 999px;
  font-size: 12px !important;
  font-weight: 600;
  color: var(--tc-accent-ink) !important;
  cursor: pointer;
}
.template-change:hover {
  border-color: var(--tc-accent);
}
/* Cartes du mode de lecture */
.mode-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.mode-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border: 2px solid var(--tc-line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
}
.mode-card:hover {
  border-color: #7cc3d3;
}
.mode-card.selected {
  border-color: var(--tc-accent);
  background: #f2fafc;
}
.mode-card:focus-visible {
  outline: 2px solid var(--tc-accent);
  outline-offset: 2px;
}
.mode-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.mode-card-top strong {
  font-size: 14px;
  color: var(--tc-fg);
}
.mode-card-text {
  font-size: 12px;
  line-height: 1.5;
  color: var(--tc-muted);
}
.imp-advanced summary {
  cursor: pointer;
  min-height: 32px;
  font-size: 13px;
  font-weight: 600;
  color: var(--tc-accent-ink);
}
.imp-advanced[open] summary {
  margin-bottom: 10px;
}
.imp-advanced .banner {
  margin-top: 12px;
}
/* Récapitulatif fixe */
.imp-aside {
  position: sticky;
  top: calc(var(--tc-header-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.imp-recap {
  padding: 20px;
  border-top: 4px solid var(--tc-accent);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.imp-recap h2 {
  margin: 0;
  font-size: 16px;
}
.imp-recap ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.imp-recap li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.imp-recap .tick {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid #a9b8c3;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}
.imp-recap li.ok .tick {
  border-color: #1b9467;
  background: #1b9467;
}
.imp-recap .note {
  margin-left: auto;
  font-size: 11px;
  color: var(--tc-muted);
}
.imp-recap .note.required {
  color: #a33636;
  font-weight: 600;
}
.imp-cost {
  padding: 12px;
  border-radius: 10px;
  background: #f2fafc;
  font-size: 12px;
  line-height: 1.5;
  color: #3b4752;
}
.imp-launch {
  min-height: 48px;
  border-radius: 999px;
  font-size: 15px;
}
.imp-recap > small {
  text-align: center;
  font-size: 11px;
  color: var(--tc-muted);
}
.imp-side {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.imp-side strong {
  font-size: 13px;
}
.imp-side button {
  min-height: 40px;
  border-radius: 999px;
}
.imp-rules {
  margin: 0;
  padding: 0 4px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--tc-muted);
}
@media (max-width: 1100px) {
  .imp-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .imp-aside {
    position: static;
  }
}
@media (max-width: 700px) {
  .imp-row,
  .imp-two,
  .mode-cards,
  .upload-minor {
    grid-template-columns: minmax(0, 1fr);
  }
}
.imp-two .field > label.file-picker {
  display: flex;
  margin: 8px 0 0;
  font-size: inherit;
  color: inherit;
}
.seg .source-tab {
  white-space: nowrap;
}
.imp-recap .error-text:empty {
  display: none;
}

/* Puces d'état dans la liste des offres */
.offer-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.offer-chip {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.offer-chip.chip-done {
  background: #e3f4ec;
  color: #146e4d;
}
.offer-chip.chip-check,
.offer-chip.chip-pending {
  background: #fdf0dc;
  color: #8a5300;
}
.offer-chip.chip-visual {
  background: #fbe9e9;
  color: #a33636;
}
.offer-chip.chip-range {
  background: var(--tc-chip);
  color: var(--tc-accent-ink);
}
.offer-card.selected {
  border-color: var(--tc-accent);
  background: var(--tc-soft);
}

/* Contrôle des offres en pleine largeur (maquette 3) */
body.review-mode .sidebar {
  display: none;
}
body.review-mode .app {
  margin-left: 0;
}
body.review-mode main {
  max-width: none;
  padding: 18px 24px 28px;
}
body.review-mode .topbar {
  display: none;
}
.op-bar-back {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--tc-line);
  background: #fff;
  color: var(--tc-accent-ink);
  font-size: 18px;
}
.op-bar-back:hover {
  border-color: var(--tc-accent);
  background: var(--tc-soft);
}
.op-bar-title {
  margin-right: auto;
}
body.review-mode .op-bar {
  position: sticky;
  top: calc(var(--tc-header-h) + 8px);
  z-index: 3;
  margin-top: 0;
  box-shadow: 0 4px 14px rgba(32, 42, 51, 0.06);
}
body.review-mode .workspace {
  grid-template-columns: 290px minmax(0, 1.25fr) minmax(380px, 1fr);
  gap: 18px;
}
body.review-mode .offer-list {
  max-height: calc(100vh - 330px);
}
body.review-mode .preview-frame {
  max-height: calc(100vh - 300px);
  min-height: 520px;
}
.review-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
body.review-mode .editor-body {
  max-height: calc(58vh - 120px);
  min-height: 260px;
}
.visual-panel:empty {
  display: none;
}
.visual-panel {
  padding: 18px 20px;
}
.visual-panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.visual-panel-head h2 {
  margin: 0;
  font-size: 17px;
}
.visual-panel .product-visual-field {
  margin: 0;
}
.visual-panel .product-visual-field > label {
  display: none;
}
.visual-panel .visual-candidates {
  border: 0;
  padding: 0;
  margin-top: 14px;
}
.visual-panel .visual-candidates-head .chip {
  display: none;
}
@media (max-width: 1250px) {
  body.review-mode .workspace {
    grid-template-columns: 250px minmax(0, 1fr);
  }
  body.review-mode .review-right {
    grid-column: 1 / -1;
  }
}

/* Export Toucan : verdict, contrôles, fichier, réussite */
.exp-verdict {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin-bottom: 18px;
  padding: 22px 26px;
  border-radius: 16px;
  border: 1px solid #f2ddb4;
  background: #fff8ec;
  --ring: #c77700;
  --ink: #8a5300;
}
.exp-verdict.ready {
  border-color: #bfe3d2;
  background: #eef8f3;
  --ring: #1b9467;
  --ink: #146e4d;
}
.exp-ring {
  width: 92px;
  height: 92px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--ring) var(--pct), #e9eef2 0);
}
.exp-ring > span {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.exp-ring strong {
  font-size: 18px;
}
.exp-ring small {
  font-size: 10px;
  color: var(--tc-muted);
}
.exp-verdict-text {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.exp-badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
}
.exp-verdict h2 {
  margin: 0;
  font-size: 21px;
  color: var(--ink);
}
.exp-verdict p {
  margin: 0;
  font-size: 14px;
  color: #3b4752;
}
.exp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}
.exp-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.exp-block {
  padding: 20px 22px 8px;
}
.exp-block h2 {
  margin: 0 0 8px;
  font-size: 16px;
}
.exp-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid #e9eef2;
}
.exp-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}
.exp-icon.ok {
  background: #e3f4ec;
  color: #146e4d;
}
.exp-icon.warn {
  background: #fdf0dc;
  color: #8a5300;
}
.exp-row-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.exp-row-text strong {
  font-size: 14px;
}
.exp-row-text small {
  font-size: 12px;
  color: var(--tc-muted);
}
.exp-value {
  font-size: 14px;
  font-weight: 700;
}
.exp-value.ok {
  color: #146e4d;
}
.exp-value.warn {
  color: #8a5300;
}
.exp-action {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--tc-line);
  border-radius: 999px;
  background: #fff;
  color: var(--tc-accent-ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.exp-action:hover {
  border-color: var(--tc-accent);
  background: var(--tc-soft);
}
.exp-auto {
  padding: 16px 22px;
}
.exp-auto summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #146e4d;
}
.exp-auto ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}
.exp-auto li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.exp-aside {
  position: sticky;
  top: calc(var(--tc-header-h) + 16px);
}
.exp-file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #f7f9fb;
}
.exp-file dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}
.exp-file dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.exp-file dt {
  color: var(--tc-muted);
}
.exp-file dd {
  margin: 0;
  font-weight: 600;
}
.exp-provisional {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 10px;
  background: #fdf6ea;
  font-size: 12px;
  line-height: 1.5;
  color: #5c3d00;
}
.exp-provisional input {
  margin-top: 2px;
}
.exp-links {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.exp-links .quiet {
  font-size: 12px;
  padding: 6px 0;
}
.exp-success {
  padding: 44px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.exp-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--tc-header);
  color: #fff;
  font-size: 32px;
  font-weight: 700;
}
.exp-success h2 {
  margin: 0;
  font-size: 26px;
}
.exp-success p {
  margin: 0;
  max-width: 560px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--tc-muted);
}
.exp-success-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}
.exp-success-actions .primary,
.exp-success-actions .secondary {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 13px;
}
@media (max-width: 1100px) {
  .exp-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .exp-aside {
    position: static;
  }
}

/* Contrôle sans défilement de page : liste et fiche défilent, le PDF s'ajuste. */
body.review-mode main {
  height: calc(100vh - var(--tc-header-h));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 20px 16px;
  box-sizing: border-box;
}
body.review-mode .op-bar {
  position: static;
  flex: none;
  margin: 0;
  padding: 12px 18px;
}
.op-bar-summary {
  align-self: flex-start;
  margin-top: 2px;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--tc-muted);
  font-size: 12px;
  text-align: left;
}
.op-bar-summary:hover,
.op-bar-summary[aria-expanded='true'] {
  color: var(--tc-accent-ink);
}
.op-bar-summary:focus-visible {
  outline: 2px solid var(--tc-accent);
  outline-offset: 2px;
}
.review-details {
  flex: none;
  max-height: 42vh;
  overflow: auto;
  padding: 14px 16px;
  margin: 0;
  background: #fff;
  border: 1px solid var(--tc-line);
  border-radius: 12px;
}
.review-details[hidden] {
  display: none;
}
.review-details .stats {
  margin-bottom: 12px;
}
body.review-mode .workspace {
  flex: 1;
  min-height: 0;
  align-items: stretch;
}
body.review-mode .offer-panel,
body.review-mode .preview-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
body.review-mode .offer-list {
  flex: 1;
  min-height: 0;
  max-height: none;
}
body.review-mode .preview-frame {
  flex: 1;
  min-height: 0;
  max-height: none;
}
.preview-frame.fit {
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.preview-frame.fit img {
  width: auto !important;
  max-width: 100%;
  max-height: 100%;
  height: auto;
}
body.review-mode .review-right {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  padding-right: 4px;
}
body.review-mode .editor-panel {
  overflow: visible;
  flex: none;
}
body.review-mode .editor-body {
  max-height: none;
  min-height: 0;
  overflow: visible;
}
body.review-mode .visual-panel {
  flex: none;
}
@media (max-width: 1100px) {
  body.review-mode main {
    height: auto;
    overflow: visible;
  }
  body.review-mode .review-right,
  body.review-mode .offer-panel,
  body.review-mode .preview-panel {
    height: auto;
  }
  body.review-mode .offer-list {
    max-height: 60vh;
  }
}
/* Boutons Valider / Supprimer toujours visibles en bas de la colonne fiche. */
body.review-mode .editor-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #fff;
  border-top: 1px solid var(--tc-line);
  box-shadow: 0 -6px 12px rgba(32, 42, 51, 0.05);
}

/* Carte d'opération : zone d'ouverture + bouton corbeille */
.op-card {
  position: relative;
  padding: 0;
}
.op-card-open {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  height: 100%;
  padding: 20px 20px 20px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  text-align: left;
}
.op-card-open:focus-visible {
  outline: 2px solid var(--tc-accent);
  outline-offset: -2px;
}
.op-card:focus-within {
  border-color: var(--tc-accent);
}
.op-card-delete {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: #8a96a1;
}
.op-card-delete:hover,
.op-card-delete:focus-visible {
  border-color: #f3d5d0;
  background: #fbe9e9;
  color: #a33636;
  outline: none;
}
.op-card .op-card-chips {
  padding-right: 40px;
}
.delete-cache-option {
  margin: 14px 0 6px;
  padding: 12px;
  border-radius: 10px;
  background: #fdf6ea;
  line-height: 1.5;
}
.delete-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
.delete-actions .danger {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
}

/* Bouton Débloquer : appel IA interrompu */
.unlock-box {
  margin: 8px 0 12px;
  padding: 10px 12px;
  border: 1px solid #f0c36d;
  background: #fff8e8;
  border-radius: 10px;
  font-size: 13px;
  color: #6b4b00;
}
.unlock-box p {
  margin: 0 0 8px;
}
.unlock-box button {
  width: 100%;
}


/* Atelier Flèche intégré : l’outil occupe tout l’espace principal. */
.graphiste-frame {
  display: block;
  width: 100%;
  height: 900px; /* ajustée ensuite à la hauteur réelle de l’atelier */
  border: 0;
  background: transparent;
}
.sidebar .nav-item.nav-hidden {
  display: none !important;
}

/* Accueil · proposition D (grille « bento ») */
.home-d {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: none; /* toute la largeur de l’écran */
}
.home-hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 900px;
}
.home-hero h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #14262d;
}
.home-hero h1 span {
  display: block;
  color: var(--tc-accent);
}
.home-command {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #d6e0e4;
  border-radius: 16px;
  padding: 14px 18px;
  color: var(--tc-muted);
  box-shadow: 0 6px 24px rgba(20, 38, 45, 0.06);
}
.home-command:focus-within {
  border-color: var(--tc-accent);
  box-shadow: 0 0 0 3px var(--tc-chip);
}
.home-command input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--tc-fg);
  padding: 0;
}
.home-command kbd {
  font: inherit;
  font-size: 12px;
  border: 1px solid #d6e0e4;
  border-radius: 6px;
  padding: 2px 8px;
}
.home-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(170px, auto);
  gap: 18px;
}
.bento-card {
  background: #fff;
  border: 1px solid #e1e8eb;
  border-radius: 22px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.bento-label {
  font-size: 13px;
  color: var(--tc-muted);
}
.bento-big {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #14262d;
}
.bento-card small {
  font-size: 13px;
  color: var(--tc-muted);
}
.bento-resume {
  grid-column: span 2;
  grid-row: span 2;
  /* même dégradé que l’ancien bandeau bleu, un peu plus foncé pour la lisibilité */
  background: linear-gradient(120deg, #0688b3 0%, #00708a 100%);
  border-color: transparent;
  color: #fff;
  padding: 28px;
  gap: 14px;
}
.bento-kicker {
  font-size: 12px;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: #d8f3fa;
}
.bento-resume h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.bento-sub {
  margin: 0;
  font-size: 15px;
  color: #e6f6fa;
}
.bento-progress > div {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 8px;
}
.bento-bar {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}
.bento-bar span {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: 999px;
  background: #fff;
}
.bento-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.bento-stat {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 12px 14px;
}
.bento-stat span {
  display: block;
  font-size: 12px;
  color: #e6f6fa;
}
.bento-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 21px;
}
.bento-stat strong.warn {
  color: #ffd9c2;
}
.bento-cta {
  margin-top: auto;
  align-self: flex-start;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  background: #fff;
  color: #005e74;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.bento-cta:hover {
  background: #e3f2f5;
}
.bento-ring {
  flex-direction: row;
  align-items: center;
  gap: 16px;
}
.bento-ring > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ring-track {
  stroke: #e6eef1;
}
.ring-fill {
  stroke: var(--tc-accent);
}
.bento-tool,
.bento-compare,
.bento-steps {
  grid-column: span 2;
}
.bento-tool {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.bento-tool-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bento-tool-head > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bento-tool-head strong {
  font-size: 17px;
}
.bento-icon {
  flex: 0 0 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tc-soft);
  color: var(--tc-accent);
}
.bento-icon.orange {
  background: #fdeee6;
  color: #b4441a;
}
.bento-link {
  border: 1px solid #e1e8eb;
  background: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 600;
  color: var(--tc-accent-ink);
  cursor: pointer;
  white-space: nowrap;
}
.bento-link.orange {
  color: #b4441a;
  border-color: #f4cdb8;
}
.bento-link.orange:hover {
  background: #fdeee6;
}
.bento-steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.bento-steps li {
  background: var(--tc-page);
  border-radius: 12px;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bento-steps li span {
  font-size: 11px;
  color: var(--tc-accent-ink);
}
@media (max-width: 1100px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .home-hero h1 {
    font-size: 30px;
  }
  .bento {
    grid-template-columns: minmax(0, 1fr);
  }
  .bento-resume,
  .bento-tool,
  .bento-compare,
  .bento-steps {
    grid-column: auto;
    grid-row: auto;
  }
  .bento-tool {
    flex-direction: column;
    align-items: flex-start;
  }
  .bento-steps ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Thème D : en-tête clair et barre de gauche fine à icônes.
   Pendant une opération, la barre reste large pour afficher les étapes. */
.app-header {
  background: #fff;
  color: var(--tc-fg);
  border-bottom: 1px solid #e1e8eb;
  box-shadow: none;
}
.app-header .brand {
  color: var(--tc-fg);
}
.app-header .brand-icon {
  background: var(--tc-accent);
  border-color: var(--tc-accent);
  color: #fff;
}
.app-header .brand-sub {
  color: var(--tc-muted);
}
.header-search {
  background: var(--tc-page);
  border: 1px solid #d6e0e4;
  color: var(--tc-muted);
}
.header-search:focus-within {
  background: #fff;
  outline: 2px solid var(--tc-accent);
}
.header-search input {
  color: var(--tc-fg);
}
.header-search input::placeholder {
  color: var(--tc-muted);
}
.header-pill {
  background: var(--tc-soft);
  color: var(--tc-accent-ink);
}
.header-local i {
  background: #1b9467;
}
.sidebar .nav-item .nav-icon svg {
  display: block;
}

/* Rubriques d’un outil (Atelier flèche) dans la barre de gauche */
.tool-steps {
  display: none;
}
body:not(.in-tool) .tool-steps,
body.in-tool #op-steps {
  display: none !important;
}
body.in-tool .tool-steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tool-step button {
  font-family: inherit;
  cursor: pointer;
}
.tool-step button small {
  margin-left: auto;
  font-size: 10px;
  color: var(--tc-muted);
}

/* Accueil = page principale, sans barre de gauche. Chaque outil affiche son menu. */
body.no-sidebar .sidebar {
  display: none;
}
body.no-sidebar .app {
  margin-left: 0;
}
.sidebar > .side-label,
.sidebar > .nav-item {
  display: none !important;
}
.tool-menu {
  display: none;
}
body:not(.in-operation):not(.in-tool):not(.no-sidebar) .tool-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
body.in-operation .tool-menu,
body.in-tool .tool-menu {
  display: none !important;
}
/* « Nouvelle opération » en haut de barre : seulement dans la partie catalogue. */
body.in-tool .new-button,
body.ctx-compare .new-button {
  display: none;
}
.home-credits .link-button {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.home-credits .link-button:hover {
  color: var(--tc-accent-ink);
}

/* Hors opération, « Nouvelle opération » est la première ligne du menu Catalogue. */
body:not(.in-operation) .sidebar .new-button {
  display: none;
}
/* Le focus est placé sur la zone principale à chaque écran (lecteurs d’écran) : pas de cadre visible. */
#main:focus {
  outline: none;
}

/* Menu de gauche des outils · maquette N4 : carte flottante arrondie. */
.sidebar {
  top: calc(var(--tc-header-h) + 20px);
  left: 20px;
  bottom: auto;
  width: 250px;
  max-height: calc(100vh - var(--tc-header-h) - 40px);
  overflow-y: auto;
  padding: 18px;
  border: 1px solid #e1e8eb;
  border-radius: 22px;
  box-shadow: 0 8px 28px rgba(20, 38, 45, 0.07);
}
body:not(.no-sidebar):not(.review-mode) .app {
  margin-left: 290px;
}
.sidebar .new-button,
.sidebar .side-card,
.sidebar .sidebar-bottom,
.sidebar .credits-row {
  display: none !important;
}
.sidebar .op-steps {
  gap: 14px;
}
.tool-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tool-head .op-steps-back {
  width: 34px;
  height: 34px;
  padding: 0;
  margin: 0;
  border-radius: 999px;
  border: 1px solid #d3dce2;
  background: #fff;
  color: var(--tc-fg);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.tool-head .op-steps-back:hover {
  border-color: var(--tc-accent);
  color: var(--tc-accent-ink);
}
.tool-pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--tc-accent-ink);
  background: var(--tc-soft);
  padding: 4px 12px;
  border-radius: 999px;
}
.op-current {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(120deg, #0688b3 0%, #00708a 100%);
}
.op-current span {
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: #d8f3fa;
}
.op-current strong {
  font-size: 18px;
  overflow-wrap: anywhere;
}
.op-current small {
  font-size: 12px;
  color: #e6f6fa;
}
.op-current i {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}
.op-current b {
  display: block;
  height: 100%;
  min-width: 4px;
  background: #fff;
  border-radius: 999px;
}
.op-step-mark {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 999px;
  border: 1px solid #c9d6db;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}
.op-step.done .op-step-mark {
  border-color: transparent;
  background: #e3f5ec;
  color: #146e4d;
}
.op-step.current .op-step-mark {
  border-color: var(--tc-accent);
  background: var(--tc-accent);
  color: #fff;
}
.sidebar .op-step.current .op-step-row,
.sidebar .op-step.current button {
  box-shadow: none;
  border-radius: 10px;
}
.tool-foot {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid #edf2f4;
  padding-top: 10px;
}
.tool-foot button {
  border: 0;
  background: none;
  text-align: left;
  font: inherit;
  font-size: 14px;
  color: var(--tc-fg);
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
}
.tool-foot button:hover {
  background: var(--tc-soft);
  color: var(--tc-accent-ink);
}
@media (max-width: 900px) {
  .sidebar {
    display: none !important;
  }
  body .app {
    margin-left: 0 !important;
  }
}

/* Barre de gauche · maquette N7 : pleine hauteur, claire, outils dépliables, repliable. */
.sidebar {
  top: var(--tc-header-h);
  left: 0;
  bottom: 0;
  width: 248px;
  max-height: none;
  padding: 14px 12px;
  background: #fbfcfd;
  border: 0;
  border-right: 1px solid #e6ecef;
  border-radius: 0;
  box-shadow: none;
  gap: 2px;
  font-size: 14px;
}
body:not(.no-sidebar):not(.review-mode) .app {
  margin-left: 248px;
}
body.side-collapsed:not(.no-sidebar):not(.review-mode) .app {
  margin-left: 64px;
}
.side-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 10px 10px;
}
.side-top-label {
  font-size: 11px;
  font-weight: 600;
  color: #8a99a3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.side-collapse {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #e1e8eb;
  background: #fff;
  color: #4a5a62;
  cursor: pointer;
  font: inherit;
}
.side-collapse:hover {
  border-color: var(--tc-accent);
  color: var(--tc-accent-ink);
}
.side-link,
.side-tool {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  font: inherit;
  color: #4a5a62;
  text-align: left;
  cursor: pointer;
}
.side-link:hover,
.side-tool:hover {
  background: #f0f4f6;
  color: var(--tc-fg);
}
.side-tool.active {
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 38, 45, 0.1);
  color: var(--tc-fg);
  font-weight: 600;
}
.side-label-text {
  flex: 1;
  min-width: 0;
}
.side-chev {
  color: #8a99a3;
  transition: transform 0.15s;
}
.side-tool.active .side-chev {
  transform: rotate(90deg);
}
.side-section {
  font-size: 11px;
  color: #8a99a3;
  font-weight: 600;
  padding: 14px 10px 4px;
}
.side-tile {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tc-accent);
  color: #fff;
}
.side-tile.soft {
  background: var(--tc-soft);
  color: var(--tc-accent);
}
.side-tile.orange {
  background: #fdeee6;
  color: #b4441a;
}
.side-sub {
  margin: 2px 0 6px 20px;
  padding-left: 10px;
  border-left: 1px solid #e1e8eb;
}
.side-sub .tool-head {
  display: none;
}
.sidebar .side-sub .op-steps {
  gap: 2px;
}
.side-sub .op-steps ol {
  gap: 1px;
}
.sidebar .side-sub .op-step-row,
.sidebar .side-sub .op-step button {
  min-height: 34px;
  padding: 0 10px;
  gap: 9px;
  font-size: 13px;
  border-radius: 8px;
}
.sidebar .side-sub .op-step.current .op-step-row,
.sidebar .side-sub .op-step.current button {
  background: var(--tc-soft);
  color: var(--tc-accent-ink);
  box-shadow: none;
}
.side-sub .op-step-mark {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
  font-size: 11px;
}
.side-sub .op-step-dot {
  width: 12px;
  height: 12px;
}
.side-sub .op-current {
  background: none;
  color: var(--tc-fg);
  padding: 6px 10px 8px;
  gap: 3px;
  border-radius: 0;
}
.side-sub .op-current span {
  color: #8a99a3;
  font-size: 10px;
}
.side-sub .op-current strong {
  font-size: 14px;
}
.side-sub .op-current small {
  color: var(--tc-muted);
}
.side-sub .op-current i {
  height: 4px;
  background: #e6eef1;
}
.side-sub .op-current b {
  background: var(--tc-accent);
}
.side-sub .tool-foot {
  border-top: 0;
  padding-top: 4px;
}
.side-sub .tool-foot button {
  font-size: 13px;
  padding: 7px 10px;
  color: #4a5a62;
}
.side-profile {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 6px 0;
  border-top: 1px solid #e6ecef;
}
.side-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 999px;
  background: #14262d;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}
.side-profile-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  font-size: 12px;
}
.side-profile-text small {
  color: var(--tc-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-profile .icon-button {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
}
/* Barre repliée : seulement les icônes. */
body.side-collapsed .sidebar {
  width: 64px;
  padding: 14px 10px;
}
body.side-collapsed .side-top {
  justify-content: center;
  padding: 2px 0 10px;
}
body.side-collapsed .side-top-label,
body.side-collapsed .side-label-text,
body.side-collapsed .side-chev,
body.side-collapsed .side-section,
body.side-collapsed .side-sub,
body.side-collapsed .side-profile-text,
body.side-collapsed .side-profile .icon-button {
  display: none !important;
}
body.side-collapsed .side-collapse {
  transform: rotate(180deg);
}
body.side-collapsed .side-link,
body.side-collapsed .side-tool {
  justify-content: center;
  padding: 7px 0;
}
body.side-collapsed .side-profile {
  justify-content: center;
}

.side-link.active {
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 38, 45, 0.1);
  color: var(--tc-fg);
  font-weight: 600;
}
.side-sub[hidden] {
  display: none;
}

/* Cartes outils de l’accueil : en-tête + bouton Ouvrir, puis contenu. */
.bento-tool {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 16px;
}
.bento-tool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.bento-swatches {
  display: flex;
  gap: 10px;
}
.bento-swatches span {
  flex: 1;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #e1e8eb;
}
@media (max-width: 700px) {
  .bento-tool-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Logo CataFlow (toucan) dans l’en-tête */
.app-header .brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain; /* logo entier : catalogue et Excel visibles */
  display: block;
  flex: 0 0 52px;
}
.app-header .brand-text {
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Nom CataFlow aux couleurs du logo : « Cata » bleu nuit, « Flow » orange. */
.app-header .brand-name {
  font-size: 19px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.brand-cata {
  color: #091a31;
}
.brand-flow {
  color: #ec5700;
}

/* ---------- Découpe visuels ---------- */
.side-tile.violet {
  background: #efeafd;
  color: #5b3fc4;
}
.dc-recent h2 {
  margin: 0 0 8px;
  font-size: 16px;
}
.dc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 18px;
  align-items: start;
}
.dc-bottom {
  margin-top: 18px;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.7fr);
}
.dc-grid > .panel {
  margin: 0;
  min-width: 0;
}
.dc-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.dc-panel-head h2 {
  margin: 2px 0 0;
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dc-panel-head > div {
  min-width: 0;
}
.dc-pager {
  display: flex;
  gap: 6px;
  align-items: center;
}
.dc-pager button {
  padding: 6px 10px;
  min-height: 0;
}
.dc-pager input {
  width: 64px;
  text-align: center;
}
.dc-page-view {
  background: #f3f6f8;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  padding: 8px;
}
.dc-page-view img {
  max-width: 100%;
  max-height: 70vh;
  box-shadow: 0 2px 8px rgba(20, 38, 45, 0.15);
}
.dc-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 2px 4px;
}
.dc-thumbs button {
  flex: 0 0 64px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #fff;
  padding: 2px;
  cursor: pointer;
  position: relative;
  font: inherit;
}
.dc-thumbs img {
  width: 100%;
  display: block;
  border-radius: 5px;
  background: #eef2f4;
  min-height: 80px;
  object-fit: contain;
}
.dc-thumbs span {
  font-size: 11px;
  color: var(--tc-muted);
}
.dc-thumbs button.active {
  border-color: var(--tc-accent);
}
.dc-thumbs button.has-photo::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #5b3fc4;
  box-shadow: 0 0 0 2px #fff;
}
.dc-add {
  cursor: pointer;
  white-space: nowrap;
}
.dc-photo.dc-drop {
  outline: 2px dashed #5b3fc4;
  outline-offset: -6px;
}
.dc-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.dc-tabs:not(:empty) {
  margin-bottom: 10px;
}
.dc-tabs button {
  border: 1px solid #e1e8eb;
  background: #fff;
  border-radius: 999px;
  padding: 5px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.dc-tabs button.active {
  border-color: var(--tc-accent);
  background: var(--tc-soft);
  color: var(--tc-accent-ink);
}
.dc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 340px;
  border: 2px dashed #cfdade;
  border-radius: 12px;
  background: #fafcfd;
  cursor: pointer;
  text-align: center;
  padding: 24px;
  color: var(--tc-muted);
}
.dc-empty strong {
  color: var(--tc-fg);
  font-size: 16px;
}
.dc-empty:hover {
  border-color: #5b3fc4;
}
.dc-empty-note {
  font-size: 12px;
}
.dc-stage {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
  background: #eef2f4;
}
.dc-stage > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.dc-box {
  position: absolute;
  border: 2px solid #fff;
  outline: 2px solid #5b3fc4;
  background: rgba(91, 63, 196, 0.08);
  cursor: move;
  border-radius: 3px;
}
.dc-box.checked {
  outline-color: #1f8a5b;
}
.dc-box.active {
  outline: 3px solid #ec5700;
  background: rgba(236, 87, 0, 0.1);
  z-index: 2;
}
.dc-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #5b3fc4;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}
.dc-box .dc-num {
  position: absolute;
  top: 4px;
  left: 4px;
}
.dc-box.checked .dc-num {
  background: #1f8a5b;
}
.dc-box.active .dc-num {
  background: #ec5700;
}
.dc-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff;
  border: 2px solid #5b3fc4;
  border-radius: 3px;
}
.dc-box.active .dc-handle {
  border-color: #ec5700;
}
.dc-handle.nw {
  left: -7px;
  top: -7px;
  cursor: nwse-resize;
}
.dc-handle.ne {
  right: -7px;
  top: -7px;
  cursor: nesw-resize;
}
.dc-handle.sw {
  left: -7px;
  bottom: -7px;
  cursor: nesw-resize;
}
.dc-handle.se {
  right: -7px;
  bottom: -7px;
  cursor: nwse-resize;
}
.dc-hint {
  font-size: 12px;
  color: var(--tc-muted);
  margin: 8px 0 0;
}
.dc-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.dc-tools-note {
  flex: 1;
  font-size: 13px;
  color: var(--tc-muted);
  min-width: 160px;
}
.dc-margin {
  font-size: 13px;
  color: var(--tc-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dc-margin select {
  width: auto;
}
#dc-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid #e6ecef;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.dc-row.active {
  border-color: #ec5700;
  box-shadow: 0 0 0 2px rgba(236, 87, 0, 0.15);
}
.dc-thumb {
  height: 64px;
  flex: 0 0 auto;
  border-radius: 6px;
  background-repeat: no-repeat;
  background-color: #eef2f4;
}
.dc-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.dc-row-main input {
  width: 100%;
}
.dc-row-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.dc-check {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.dc-row .icon-button {
  text-decoration: none;
  flex: 0 0 auto;
}
.dc-cost {
  position: sticky;
  top: calc(var(--tc-header-h) + 16px);
}
@media (max-width: 1100px) {
  .dc-grid,
  .dc-bottom {
    grid-template-columns: minmax(0, 1fr);
  }
  .dc-cost {
    position: static;
  }
}
@media (max-width: 640px) {
  .dc-row {
    flex-wrap: wrap;
  }
  .dc-panel-head {
    flex-direction: column;
    align-items: stretch;
  }
}
.dc-add input[type='file'],
.dc-empty input[type='file'] {
  display: none !important;
}
/* Découpe : produits et coût sous la photo, défilement uniquement dans la liste. */
.dc-grid {
  align-items: stretch;
}
.dc-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.dc-right > .panel {
  margin: 0;
}
.dc-under {
  flex: 1 1 auto;
  min-height: 360px;
  contain: size; /* la longueur de la liste n'agrandit plus la page */
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 14px;
}
.dc-under > .panel {
  margin: 0;
  min-width: 0;
  min-height: 0;
}
.dc-list {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dc-list .dc-panel-head {
  margin-bottom: 8px;
}
.dc-list #dc-rows {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 4px 2px 2px;
  scrollbar-gutter: stable;
}
.dc-list .dc-row {
  padding: 6px 8px;
  gap: 10px;
}
.dc-list .dc-thumb {
  height: 52px;
}
.dc-cost {
  position: static;
  align-self: start;
  padding: 16px;
}
.dc-cost strong {
  font-size: 24px;
}
.dc-cost dl div {
  gap: 8px;
}
.dc-cost dt {
  font-size: 12px;
}
@media (max-width: 1450px) {
  .dc-under {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 460px;
  }
  .dc-cost {
    order: -1;
  }
  .dc-cost dl {
    display: none;
  }
  .dc-cost .progress-cost {
    margin: 0;
    font-size: 12px;
  }
  .dc-cost {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 10px 16px;
  }
  .dc-cost strong {
    font-size: 18px;
  }
}
@media (max-width: 1100px) {
  .dc-under {
    min-height: 480px;
  }
}
.dc-cost dd {
  white-space: nowrap;
}
.dc-stage {
  margin: 0 auto;
}
/* Bandeau « Accueil / … · Enregistré » retiré de toutes les pages : la barre de gauche suffit. */
.app > .topbar {
  display: none !important;
}

/* Cartes des découpes (même format que les opérations) */
.dc-recent {
  margin-top: 28px;
}
.dc-recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.dc-recent-head h2 {
  margin: 0;
  font-size: 18px;
}
.dc-card-head {
  display: flex;
  gap: 12px;
  min-width: 0;
  align-items: flex-start;
}
.dc-card-thumb {
  width: 60px;
  height: 80px;
  flex: 0 0 60px;
  object-fit: cover;
  object-position: top;
  border-radius: 6px;
  border: 1px solid var(--tc-line);
  background: #eef2f4;
}
.dc-card-pdf {
  display: block;
  font-size: 12px;
  color: var(--tc-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}

/* ---------- Boutons unifiés dans toute l'app : pilule, même hauteur, même typo ---------- */
.primary,
.secondary,
.quiet,
.danger,
.bento-link {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.secondary {
  border-color: #dbe5e9;
  color: #2f4650;
}
.secondary:hover {
  border-color: var(--tc-accent);
  color: var(--tc-accent-ink);
  background: #f5fbfc;
}
.danger {
  border-radius: 999px;
}
/* Boutons-icônes : ronds, même taille partout. */
.icon-button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}
.icon-button:hover {
  border-color: var(--tc-accent);
  color: var(--tc-accent-ink);
}
.side-profile .icon-button {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}
/* Découpe : flèches de page en boutons-icônes ronds. */
.dc-pager button {
  width: 36px;
  min-height: 36px;
  height: 36px;
  padding: 0;
}
.dc-pager input {
  height: 36px;
  border-radius: 999px;
}
.dc-margin select {
  border-radius: 999px;
  padding: 6px 12px;
}
/* Petits boutons (pages, zoom) : ronds comme les boutons-icônes. */
.small-btn {
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
}

/* ---------- Découpe · maquette W8 : sources en haut, tableau type Excel en bas ---------- */
.dc-head {
  margin-bottom: 14px;
}
.dc-w8 {
  --dc-photo-h: 330px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: calc(100vh - var(--tc-header-h) - 150px);
  min-height: 660px;
}
.dc-top {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 14px;
}
.dc-top > .panel,
.dc-bottom2 > .panel {
  margin: 0;
  min-width: 0;
}
.dc-top .dc-panel-head {
  align-items: center;
  margin-bottom: 10px;
}
.dc-page .dc-page-view {
  height: calc(var(--dc-photo-h) + 26px);
  padding: 6px;
}
.dc-page .dc-page-view img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}
.dc-page .dc-pager input {
  width: 52px;
}
.dc-photo .dc-panel-head {
  flex-wrap: wrap;
}
.dc-photo-title {
  flex: 1 1 160px;
  min-width: 0;
}
.dc-photo .dc-tabs {
  margin: 0 !important;
}
.dc-photo .dc-tools {
  margin: 0;
  flex-wrap: nowrap;
}
.dc-photo .dc-tools-note {
  min-width: 0;
  white-space: nowrap;
}
.dc-photo .dc-empty {
  min-height: calc(var(--dc-photo-h) + 26px);
  box-sizing: border-box;
}
.dc-photo .dc-hint {
  text-align: center;
}
.dc-bottom2 {
  flex: 1 1 0;
  min-height: 240px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 14px;
}
.dc-table-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 6px;
}
.dc-table-panel .dc-panel-head {
  margin-bottom: 6px;
}
.dc-table-wrap {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
}
.dc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.dc-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--tc-muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--tc-line);
  white-space: nowrap;
}
.dc-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #eef2f4;
  vertical-align: middle;
}
.dc-table tr[data-row] {
  cursor: pointer;
}
.dc-table tr[data-row]:hover {
  background: #f8fbfc;
}
.dc-table tr.active {
  background: #fff6f0;
}
.dc-table tr.active .dc-num {
  background: #ec5700;
}
.dc-num.ok {
  background: #1f8a5b;
}
.dc-table input[data-label] {
  width: 100%;
  min-width: 180px;
}
.dc-price {
  white-space: nowrap;
}
.dc-file {
  font-family: Consolas, 'Courier New', monospace;
  font-size: 12px;
  color: var(--tc-muted);
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dc-zoom {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: 8px;
}
.dc-zoom:hover .dc-thumb,
.dc-zoom:focus-visible .dc-thumb {
  box-shadow: 0 0 0 2px var(--tc-accent);
}
.dc-table .dc-thumb {
  display: block;
  height: 42px;
}
.dc-verify {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--tc-line);
  background: #fff;
  color: transparent;
  cursor: pointer;
  position: relative;
}
.dc-verify input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.dc-verify:has(input:checked) {
  background: #1f8a5b;
  border-color: #1f8a5b;
  color: #fff;
}
.dc-verify:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(0, 128, 158, 0.25);
}
.dc-cost2 {
  align-self: start;
  padding: 16px;
}
.dc-cost2 strong {
  font-size: 24px;
}
.dc-cost2 dd {
  white-space: nowrap;
}
@media (max-width: 1250px) {
  .dc-w8 {
    --dc-photo-h: 280px;
  }
  .dc-bottom2 {
    grid-template-columns: minmax(0, 1fr) 230px;
  }
  .dc-cost2 dt {
    font-size: 12px;
  }
}
@media (max-width: 1000px) {
  .dc-w8 {
    height: auto;
    min-height: 0;
  }
  .dc-top,
  .dc-bottom2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .dc-table-wrap {
    max-height: 60vh;
  }
}
@media (max-width: 1450px) {
  .dc-bottom2 {
    grid-template-columns: minmax(0, 1fr) 230px;
  }
  .dc-table td,
  .dc-table th {
    padding: 6px 7px;
  }
  .dc-table input[data-label] {
    min-width: 120px;
  }
  .dc-file {
    max-width: 160px;
  }
  .dc-table td .chip {
    white-space: nowrap;
  }
  .dc-cost2 dt {
    font-size: 12px;
  }
}
/* Découpe W8 : marges intérieures des panneaux (titres décollés du bord), comme la maquette. */
.dc-top > .panel,
.dc-bottom2 > .panel {
  padding: 16px 18px;
}
.dc-table-panel {
  padding-bottom: 8px;
}
.dc-table th:first-child,
.dc-table td:first-child {
  padding-left: 4px;
}
/* Nom du produit : texte en gras, jamais encadré ; il reste modifiable au clic. */
.dc-table input[data-label] {
  border: 0;
  outline: none;
  box-shadow: none;
  background: transparent;
  padding: 6px 8px;
  margin-left: -8px;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  color: var(--tc-fg);
  text-overflow: ellipsis;
}
.dc-table input[data-label]:hover {
  background: #f3f7f9;
}
.dc-table input[data-label]:focus {
  background: #eef6f8;
}
.dc-table input[data-label]::placeholder {
  font-weight: 400;
  color: #9aa8b0;
}

/* Couleur du fluo choisie (Comparer PDF / Fluo) */
:root {
  --fluo: #ffff00;
}
.compare-image rect.confirmed {
  fill: color-mix(in srgb, var(--fluo) 40%, transparent);
  stroke: color-mix(in srgb, var(--fluo) 55%, #3a3a00);
}
.cmp-highlight {
  background: color-mix(in srgb, var(--fluo) 55%, #fff);
  color: #2b2b14;
}
.cmp-metric.yellow {
  background: color-mix(in srgb, var(--fluo) 18%, #fff);
}
.fluo-picker {
  border: 0;
  padding: 0;
  margin: 18px 0 6px;
}
.fluo-picker legend {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  padding: 0;
}
.fluo-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.fluo-swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border: 1px solid #dbe5e9;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}
.fluo-swatch input[type='radio'] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.fluo-swatch span {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.fluo-swatch:has(input[type='radio']:checked) {
  border-color: var(--tc-accent);
  box-shadow: 0 0 0 2px rgba(0, 128, 158, 0.2);
  font-weight: 600;
}
.fluo-swatch:has(input[type='radio']:focus-visible) {
  outline: 2px solid var(--tc-accent);
  outline-offset: 2px;
}
.fluo-custom input[type='color'] {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  cursor: pointer;
}

/* Comparer PDF / Fluo : aperçu des PDF à droite du formulaire */
.cmp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1100px) minmax(340px, 1fr);
  gap: 18px;
  align-items: stretch;
}
.cmp-layout > .panel {
  margin: 0;
  min-width: 0;
}
.cmp-preview {
  position: sticky;
  top: calc(var(--tc-header-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  max-height: calc(100vh - var(--tc-header-h) - 40px);
  min-height: 520px;
  align-self: start;
  height: 100%;
  box-sizing: border-box;
}
.cmp-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.cmp-preview-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.cmp-preview-tabs button {
  border: 1px solid #dbe5e9;
  background: #fff;
  border-radius: 999px;
  padding: 5px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #2f4650;
  cursor: pointer;
}
.cmp-preview-tabs button.active {
  border-color: var(--tc-accent);
  background: var(--tc-soft);
  color: var(--tc-accent-ink);
}
.cmp-preview-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cmp-preview-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cmp-preview-name strong {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmp-preview-name small {
  color: var(--tc-muted);
  font-size: 12px;
}
.cmp-preview-frame {
  flex: 1;
  width: 100%;
  min-height: 420px;
  border: 1px solid var(--tc-line);
  border-radius: 10px;
  background: #f3f6f8;
}
.cmp-preview-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
  border: 2px dashed #d5e0e5;
  border-radius: 12px;
  color: var(--tc-muted);
  font-size: 13px;
}
.cmp-preview-empty strong {
  color: var(--tc-fg);
  font-size: 15px;
}
@media (max-width: 1200px) {
  .cmp-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .cmp-preview {
    position: static;
    max-height: none;
    height: 70vh;
  }
}

/* ---------- Comparer · C4 : page d'import centrée ---------- */
.cmp-c4 {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cmp-c4-title {
  text-align: center;
  margin-top: 8px;
}
.cmp-c4-title h1 {
  margin: 0 0 6px;
  font-size: 30px;
}
.cmp-c4-title p {
  margin: 0;
  color: var(--tc-muted);
}
.cmp-c4-card {
  margin: 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cmp-c4-card .field {
  margin: 0;
}
.cmp-zone {
  border: 2px dashed #c9d8de;
  border-radius: 14px;
  padding: 14px 16px;
  background: #f7fcfd;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cmp-zone-target {
  border-color: #e6d96b;
  background: #fffdf0;
}
.cmp-zone.drag {
  border-color: var(--tc-accent);
  box-shadow: 0 0 0 3px rgba(0, 128, 158, 0.15);
}
.cmp-zone.has-files {
  border-style: solid;
  border-color: var(--tc-line);
}
.cmp-zone-kicker {
  font-size: 11px;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--tc-muted);
}
.cmp-zone-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px;
  cursor: pointer;
  text-align: center;
}
.cmp-zone-pick b {
  font-size: 15px;
}
.cmp-zone-pick small {
  color: var(--tc-muted);
  font-size: 12px;
}
.cmp-zone.has-files .cmp-zone-pick {
  display: none;
}
.cmp-zone-files {
  display: grid;
  gap: 8px;
}
.cmp-zone-files:empty {
  display: none;
}
.cmp-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--tc-line);
  border-radius: 12px;
  padding: 8px 10px;
}
.cmp-pdf-icon {
  width: 32px;
  height: 40px;
  flex: 0 0 32px;
  border-radius: 5px;
  border: 1px solid #d5e0e5;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  color: #c0392b;
  background: #fff;
}
.cmp-file-name {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.cmp-file-name strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmp-file-name small {
  color: var(--tc-muted);
  font-size: 12px;
}
.cmp-change {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.cmp-c4-arrow {
  text-align: center;
  color: var(--tc-muted);
  font-size: 18px;
  line-height: 1;
}
.cmp-c4-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.cmp-c4-label {
  font-weight: 600;
  font-size: 13px;
}
.cmp-c4-spacer {
  flex: 1;
}
.cmp-c4-rule {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--tc-muted);
}
.cmp-c4-rule .cmp-highlight {
  padding: 4px 10px;
}
.cmp-c4-card .cmp-options {
  margin: 0;
}
.cmp-c4-recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.cmp-c4-recent-head h2 {
  margin: 0;
  font-size: 18px;
}
.cmp-c4-recent {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.cmp-c4-card-recent {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--tc-line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.cmp-c4-card-recent:hover {
  border-color: var(--tc-accent);
}
.cmp-c4-card-recent img {
  width: 54px;
  height: 72px;
  flex: 0 0 54px;
  object-fit: cover;
  object-position: top;
  border-radius: 6px;
  border: 1px solid var(--tc-line);
  background: #eef2f4;
}
.cmp-c4-recent-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cmp-c4-recent-text strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmp-c4-recent-text small {
  color: var(--tc-muted);
  font-size: 12px;
}
.cmp-c4-bar {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: #eef2f4;
  overflow: hidden;
}
.cmp-c4-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
}
.cmp-view-frame {
  width: min(80vw, 900px);
  height: 75vh;
  border: 1px solid var(--tc-line);
  border-radius: 10px;
}
@media (max-width: 800px) {
  .cmp-c4-recent {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Comparer · R4 : contrôle page par page ---------- */
.cmp-r4-head {
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.cmp-r4-head h1 {
  margin: 0;
}
.cmp-r4-head p {
  margin: 2px 0 0;
}
.cmp-kpis {
  display: flex;
  gap: 10px;
  margin-left: auto;
}
.cmp-kpi {
  background: #fff;
  border: 1px solid var(--tc-line);
  border-radius: 14px;
  padding: 7px 14px;
  display: grid;
  min-width: 82px;
}
.cmp-kpi small {
  font-size: 11px;
  color: var(--tc-muted);
}
.cmp-kpi strong {
  font-size: 19px;
}
.cmp-kpi.fluo {
  background: color-mix(in srgb, var(--fluo) 22%, #fff);
  border-color: color-mix(in srgb, var(--fluo) 55%, #d8d0a0);
}
.cmp-kpi.ok strong {
  color: #1f8a5b;
}
.cmp-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 14px;
  margin: 0 0 14px;
}
.cmp-strip button {
  flex: 0 0 72px;
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 3px;
  border: 2px solid transparent;
  border-radius: 9px;
  background: none;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.cmp-strip img {
  width: 100%;
  height: 86px;
  object-fit: cover;
  object-position: top;
  border-radius: 5px;
  background: #eef2f4;
  box-shadow: 0 1px 3px rgba(20, 38, 45, 0.15);
}
.cmp-strip button.active {
  border-color: var(--tc-accent);
}
.cmp-strip .ok span {
  color: #1f8a5b;
}
.cmp-strip .todo span {
  color: #ec5700;
}
.cmp-strip .empty span {
  color: var(--tc-muted);
  font-weight: 400;
}
.cmp-r4 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: start;
}
.cmp-r4 > .panel {
  margin: 0;
  min-width: 0;
}
.cmp-r4 .compare-document .preview-top h3 {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cmp-r4 .compare-document .preview-top h3 small {
  font-weight: 400;
  color: var(--tc-muted);
  font-size: 12px;
}
.cmp-side {
  position: sticky;
  top: calc(var(--tc-header-h) + 12px);
  max-height: calc(100vh - var(--tc-header-h) - 24px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  box-sizing: border-box;
}
.cmp-side #cmp-search {
  border-radius: 999px;
  padding: 8px 14px;
}
.cmp-side-list {
  display: grid;
  gap: 4px;
  overflow-y: auto;
  min-height: 80px;
  flex: 0 1 auto;
}
.cmp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.cmp-row:hover {
  background: #f5f9fa;
}
.cmp-row.active {
  border-color: #ec5700;
  background: #fff6f0;
}
.cmp-row-page {
  font-size: 11px;
  color: var(--tc-muted);
  width: 28px;
  flex: 0 0 28px;
}
.cmp-row-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.cmp-row-text strong {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmp-row-text small {
  font-size: 12px;
  color: var(--tc-muted);
}
.chip-fluo {
  background: color-mix(in srgb, var(--fluo) 45%, #fff);
  color: #4a4300;
}
.cmp-detail {
  border-top: 1px solid var(--tc-line);
  padding-top: 10px;
  display: grid;
  gap: 8px;
  font-size: 13px;
}
.cmp-detail > label {
  font-size: 12px;
  font-weight: 600;
}
.cmp-detail select {
  width: 100%;
}
.cmp-mark {
  margin: 0;
}
.cmp-edit summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--tc-accent-ink);
}
.cmp-edit h4 {
  margin: 10px 0 4px;
  font-size: 12px;
  color: var(--tc-muted);
}
.cmp-edit .field-grid {
  grid-template-columns: minmax(0, 1fr);
}
.cmp-side-actions {
  display: grid;
  gap: 8px;
  margin-top: auto;
}
@media (max-width: 1350px) {
  .cmp-r4 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .cmp-side {
    grid-column: 1 / -1;
    position: static;
    max-height: none;
  }
  .cmp-side-list {
    max-height: 320px;
  }
}
@media (max-width: 900px) {
  .cmp-r4 {
    grid-template-columns: minmax(0, 1fr);
  }
  .cmp-kpis {
    margin-left: 0;
  }
}
.cmp-side-list {
  overflow-x: hidden;
  grid-template-columns: minmax(0, 1fr);
}
.cmp-side-list > * {
  min-width: 0;
}

/* Excel sans fluo : récapitulatif produit par produit */
.rem-head {
  align-items: flex-end;
}
.rem-back {
  margin-bottom: 10px;
}
.rem-head h1 {
  margin: 0;
}
.rem-existing {
  margin-bottom: 12px;
}
.rem-kpis {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.rem-spacer {
  flex: 1;
}
.cmp-kpi.ok strong {
  color: #1f8a5b;
}
.cmp-kpi.warn strong {
  color: #b45309;
}
.rem-panel {
  padding: 8px 18px;
  margin: 0;
}
.rem-table-wrap {
  max-height: calc(100vh - var(--tc-header-h) - 330px);
  min-height: 240px;
  overflow: auto;
}
.rem-table tr.off td {
  opacity: 0.5;
}
.rem-table tr.off td:first-child {
  opacity: 1;
}
.rem-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.rem-footer p {
  flex: 1;
  margin: 0;
  font-size: 12px;
  color: var(--tc-muted);
}
.rem-visuals {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0 0;
  padding: 14px 18px;
  flex-wrap: wrap;
}
.rem-visuals > div {
  flex: 1 1 360px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rem-visuals small {
  color: var(--tc-muted);
  font-size: 12px;
}
.rem-visuals-pick {
  cursor: pointer;
}
.rem-visuals-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--tc-accent-ink);
}

/* Comparer : proposition « à vérifier » (titre proche) */
.cmp-proposal {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff4e6;
  border: 1px solid #f5c38b;
  font-size: 13px;
}
.cmp-proposal b {
  color: #9a4a00;
}
.cmp-proposal div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cmp-kpi.warn strong {
  color: #b45309;
}

/* Comparer · panneau de droite : défile à l'intérieur, boutons toujours visibles en bas */
.cmp-side {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 0;
}
.cmp-side-list {
  flex: 0 0 auto;
  max-height: 300px;
}
.cmp-side-actions {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding: 10px 0 16px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 14px);
  z-index: 1;
}
.cmp-edit[open] {
  padding-bottom: 6px;
}
.cmp-edit .field {
  margin-bottom: 8px;
}
/* Menu « Correspondance » : même style que les autres champs (arrondi, chevron, sans cadre carré) */
.cmp-detail select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 40px;
  padding: 8px 38px 8px 14px;
  border: 1px solid #dbe5e9;
  border-radius: 999px;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234a5a62' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 14px center;
  font: inherit;
  font-size: 13px;
  color: var(--tc-fg);
  text-overflow: ellipsis;
  cursor: pointer;
}
.cmp-detail select:hover {
  border-color: var(--tc-accent);
}
.cmp-detail select:focus {
  outline: none;
  border-color: var(--tc-accent);
  box-shadow: 0 0 0 3px rgba(0, 128, 158, 0.15);
}
.cmp-detail > label {
  color: var(--tc-muted);
  font-weight: 600;
}

/* Comparer : page entière sans défilement ; zoom − / + (défilement seulement quand on zoome) */
.cmp-r4 .compare-image-scroll {
  max-height: none;
  overflow: hidden;
}
.cmp-r4 .compare-image-scroll.zoomed {
  max-height: 78vh;
  overflow: auto;
}
.cmp-r4 .compare-image {
  margin: 0 auto;
}
.cmp-r4 .compare-document .preview-top {
  gap: 10px;
}
.cmp-zoom {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.cmp-zoom-value {
  min-width: 52px;
  height: 30px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12px;
  color: var(--tc-muted);
  cursor: pointer;
  border-radius: 999px;
}
.cmp-zoom-value:hover {
  background: #f0f4f6;
}

/* Accueil : carte Découpe visuels (à la place des 5 étapes) */
.bento-icon.violet {
  background: #efeafd;
  color: #5b3fc4;
}
.bento-link.violet {
  color: #5b3fc4;
  border-color: #d9cff7;
}
.bento-link.violet:hover {
  background: #f5f1fe;
}
.bento-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.bento-counts span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--tc-page, #f3f6f8);
  font-size: 12px;
  color: var(--tc-muted);
}
.bento-counts b {
  font-size: 20px;
  color: var(--tc-fg);
}
.bento-note {
  margin: 0;
  font-size: 13px;
  color: var(--tc-muted);
}
.bento-compare {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
/* Nouvelle opération : étapes au même style que les autres outils */
.imp-head {
  margin-bottom: 14px;
}
.imp-steps {
  margin-bottom: 20px;
}
