.swot-page {
  display: grid;
  gap: 22px;
  min-width: 0;
  color: var(--ink-900);
  font-size: 15px;
}

.swot-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  padding: 2px 0 3px;
}

.swot-heading .eyebrow,
.swot-section-title small,
.swot-matrix-zone header small {
  margin: 0 0 6px;
  color: #718090;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.swot-heading h1 {
  margin: 0;
  font-size: clamp(28px, 2.35vw, 30px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.swot-heading > div:first-child > p:last-child {
  max-width: 650px;
  margin: 8px 0 0;
  color: var(--ink-500);
  font-size: 15px;
  line-height: 1.5;
}

.swot-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.swot-heading-actions button {
  white-space: nowrap;
}

.swot-year {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px 0 12px;
  border: 1px solid #cbd7e1;
  border-radius: 8px;
  color: #526579;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.swot-year select {
  border: 0;
  outline: 0;
  color: var(--ink-900);
  background: transparent;
  font: inherit;
}

.swot-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #dce4ea;
  border-radius: 11px;
  background: #fff;
}
.swot-filters label { display: grid; gap: 6px; min-width: 0; }
.swot-filters label > span { color: #6b7982; font-size: 12px; font-weight: 700; }
.swot-filters select { width: 100%; }

.swot-review-chip {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border: 1px solid #d6e0e8;
  border-radius: 9px;
  background: #f8fafc;
}

.swot-review-chip > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #2f759f;
  background: #e5f1f7;
}

.swot-review-chip svg {
  width: 14px;
  height: 14px;
}

.swot-review-chip small,
.swot-review-chip strong {
  display: block;
  line-height: 1.2;
}

.swot-review-chip small {
  color: var(--ink-500);
  font-size: 12px;
}

.swot-review-chip strong {
  margin-top: 2px;
  font-size: 13px;
}

.swot-general,
.swot-processes {
  min-width: 0;
  padding: 20px;
  border: 1px solid #d6dee6;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 3px 11px rgba(23, 48, 71, .045);
}

.swot-section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.swot-section-title h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.02em;
}

.swot-section-title > span {
  color: #6a7b8d;
  font-size: 13px;
  font-weight: 650;
}

.swot-matrix {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
}

.swot-matrix-zone {
  min-width: 0;
  height: 100%;
  padding: 11px;
  border: 1px solid var(--zone-border);
  border-radius: 11px;
  background: var(--zone-bg);
}

.swot-matrix-zone.force,
.swot-process-zone.force {
  --zone-accent: #287a50;
  --zone-border: #cbe3d5;
  --zone-bg: #f1f8f4;
}

.swot-matrix-zone.faiblesse,
.swot-process-zone.faiblesse {
  --zone-accent: #bd6c25;
  --zone-border: #ecd7c4;
  --zone-bg: #fbf6f0;
}

.swot-matrix-zone.opportunité,
.swot-process-zone.opportunité {
  --zone-accent: #2b73a5;
  --zone-border: #c9dfed;
  --zone-bg: #f1f7fb;
}

.swot-matrix-zone.menace,
.swot-process-zone.menace {
  --zone-accent: #b43c45;
  --zone-border: #eccdd0;
  --zone-bg: #fcf3f4;
}

.swot-matrix-zone > header {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.swot-matrix-zone > header > span {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--zone-accent);
}

.swot-matrix-zone > header svg {
  width: 15px;
  height: 15px;
}

.swot-matrix-zone > header small {
  display: block;
  margin: 0;
  color: color-mix(in srgb, var(--zone-accent) 78%, #263545);
  font-size: 12px;
}

.swot-matrix-zone h2 {
  margin: 1px 0 0;
  font-size: 17px;
}

.swot-matrix-zone > header b {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--zone-accent);
  background: #fff;
  font-size: 13px;
}

.swot-zone-items,
.swot-process-zone > div {
  display: grid;
  gap: 8px;
}

.swot-matrix .swot-zone-items {
  gap: 0;
  border-top: 1px solid var(--zone-border);
}

.swot-matrix .swot-item-card {
  gap: 4px;
  padding: 8px 3px;
  border: 0;
  border-bottom: 1px solid var(--zone-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.swot-matrix .swot-item-card:last-child {
  border-bottom: 0;
}

.swot-matrix .swot-item-card:hover {
  border-color: var(--zone-border);
  background: rgba(255, 255, 255, .46);
  box-shadow: none;
  transform: none;
}

.swot-matrix .swot-item-top {
  display: none;
}

.swot-matrix .swot-item-card > strong {
  font-size: 14px;
  line-height: 1.35;
}

.swot-matrix .swot-item-meta {
  min-height: 0;
}

.swot-matrix .swot-item-meta em,
.swot-matrix .swot-item-meta i {
  padding: 2px 5px;
  font-size: 11px;
}

.swot-item-card {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 12px 13px;
  border: 1px solid rgba(123, 143, 160, .2);
  border-radius: 10px;
  color: var(--ink-900);
  background: rgba(255, 255, 255, .88);
  text-align: left;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.swot-item-card:hover {
  border-color: color-mix(in srgb, var(--zone-accent, #2b73a5) 55%, #cfd9e2);
  box-shadow: 0 4px 11px rgba(35, 62, 84, .08);
  transform: translateY(-1px);
}

.swot-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.swot-item-top small {
  overflow: hidden;
  color: #718090;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.swot-item-card > strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.42;
}

.swot-item-card > p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #5f7080;
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.swot-item-meta {
  min-height: 17px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.swot-item-meta em,
.swot-item-meta i {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 999px;
  color: #606d52;
  background: #f0f3e9;
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
}

.swot-item-meta i {
  color: #5c6f81;
  background: #edf2f5;
}

.swot-item-meta svg {
  width: 10px;
  height: 10px;
}

.swot-item-card.compact {
  min-height: 72px;
  padding: 10px;
}

.swot-empty {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border: 1px dashed #cdd8e1;
  border-radius: 9px;
  color: #758493;
  background: rgba(255, 255, 255, .45);
  font-size: 13px;
  text-align: center;
}

.swot-empty svg {
  width: 15px;
  height: 15px;
}

.swot-processes {
  background: #f8fafc;
}

.swot-process-list {
  display: grid;
  gap: 9px;
}

.swot-process-accordion {
  overflow: hidden;
  border: 1px solid #d5dee6;
  border-left: 4px solid var(--process-color);
  border-radius: 11px;
  background: #fff;
}

.swot-process-accordion > summary {
  min-height: 68px;
  display: grid;
  grid-template-columns: 48px minmax(190px, 1.4fr) minmax(110px, .55fr) minmax(130px, .55fr) 24px;
  align-items: center;
  gap: 12px;
  padding: 9px 14px 9px 12px;
  cursor: pointer;
  list-style: none;
}

.swot-process-accordion > summary::-webkit-details-marker {
  display: none;
}

.swot-process-accordion[open] > summary {
  border-bottom: 1px solid #e0e6ec;
  background: #fbfcfd;
}

.swot-process-code {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--process-color);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .05em;
}

.swot-process-name,
.swot-process-review {
  min-width: 0;
}

.swot-process-name strong,
.swot-process-name small,
.swot-process-review strong,
.swot-process-review small {
  display: block;
}

.swot-process-name strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.swot-process-name small,
.swot-process-review small {
  margin-top: 4px;
  overflow: hidden;
  color: #748392;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.swot-process-review strong {
  margin-top: 4px;
  font-size: 13px;
}

.swot-process-counts {
  color: #586b7c;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.swot-process-chevron {
  display: grid;
  place-items: center;
  color: #7b8996;
  transition: transform .18s ease;
}

.swot-process-chevron svg {
  width: 17px;
  height: 17px;
}

.swot-process-accordion[open] .swot-process-chevron {
  transform: rotate(90deg);
}

.swot-process-content {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 13px;
}

.swot-process-content > .swot-empty {
  grid-column: 1 / -1;
  min-height: 92px;
}

.swot-process-zone {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--zone-border);
  border-radius: 10px;
  background: var(--zone-bg);
}

.swot-process-zone > header {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}

.swot-process-zone > header > span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: var(--zone-accent);
  font-size: 12px;
  font-weight: 850;
}

.swot-process-zone h3 {
  margin: 0;
  font-size: 15px;
}

.swot-process-zone > header b {
  color: var(--zone-accent);
  font-size: 12px;
}

.swot-form-modal,
.swot-manage-modal {
  width: min(940px, calc(100vw - 28px));
  max-height: 90vh;
}

.swot-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.swot-form-grid .full {
  grid-column: 1 / -1;
}

.swot-process-picker {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid #d7e0e8;
  border-radius: 9px;
}

.swot-process-picker.hidden {
  display: none;
}

.swot-process-picker legend {
  padding: 0 5px;
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 700;
}

.swot-process-picker > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.swot-process-picker label {
  min-width: 0;
  cursor: pointer;
}

.swot-process-picker input {
  position: absolute;
  opacity: 0;
}

.swot-process-picker span {
  min-height: 39px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border: 1px solid #d8e0e7;
  border-radius: 8px;
  color: #526579;
  background: #fff;
  font-size: 12px;
}

.swot-process-picker b {
  color: var(--process-color);
}

.swot-process-picker input:checked + span {
  border-color: var(--process-color);
  box-shadow: inset 3px 0 var(--process-color);
  background: #f8fafc;
}

.swot-process-picker input:disabled + span {
  cursor: not-allowed;
  opacity: .72;
}

.swot-toggle-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.swot-toggle-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.swot-toggle-row input {
  width: 16px;
  height: 16px;
  accent-color: #2676a8;
}

.swot-treatment-fields {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 13px;
  border: 1px solid #d6e5cf;
  border-radius: 10px;
  background: #f4f8f1;
}

.swot-treatment-fields.visible {
  display: grid;
}

.swot-treatment-fields p {
  grid-column: 1 / -1;
  margin: 0;
  color: #64745c;
  font-size: 12px;
  line-height: 1.5;
}

.swot-detail-modal {
  width: min(810px, calc(100vw - 28px));
}

.swot-detail-description {
  margin: 0 0 17px;
  color: #4f6273;
  font-size: 15px;
  line-height: 1.65;
}

.swot-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.swot-detail-grid > div {
  min-width: 0;
  padding: 11px;
  border-radius: 8px;
  background: #f5f8fa;
}

.swot-detail-grid small,
.swot-detail-grid strong {
  display: block;
}

.swot-detail-grid small {
  color: #748392;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.swot-detail-grid strong {
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.swot-detail-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e2e7ec;
}

.swot-detail-section h3,
.swot-review-form h3,
.swot-manage-list h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.swot-detail-section p {
  margin: 0;
  color: #526579;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-line;
}

.swot-attachments {
  display: grid;
  gap: 6px;
}

.swot-attachments a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid #dbe3e9;
  border-radius: 8px;
  color: #286f9e;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.swot-attachments svg {
  width: 15px;
  height: 15px;
}

.swot-history {
  margin-top: 17px;
  border: 1px solid #dce4ea;
  border-radius: 9px;
}

.swot-history summary {
  padding: 11px 12px;
  cursor: pointer;
  color: #3f5669;
  font-size: 13px;
  font-weight: 750;
}

.swot-history > div {
  display: grid;
  gap: 1px;
  border-top: 1px solid #e2e8ed;
  background: #e2e8ed;
}

.swot-history article {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  background: #fff;
}

.swot-history strong {
  font-size: 12px;
  text-transform: capitalize;
}

.swot-history span {
  color: #758493;
  font-size: 12px;
}

.swot-review-form {
  padding: 15px;
  border: 1px solid #d8e2e9;
  border-radius: 10px;
  background: #f8fafc;
}

.swot-review-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 11px;
}

.swot-review-fields .full {
  grid-column: 1 / -1;
}

.swot-manage-list {
  margin-top: 18px;
}

.swot-manage-list > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.swot-manage-list > div:first-child span {
  color: #718090;
  font-size: 12px;
}

.swot-manage-list > button {
  width: 100%;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 0;
  border-top: 1px solid #e2e7ec;
  color: var(--ink-900);
  background: transparent;
  text-align: left;
}

.swot-manage-list > button:hover {
  background: #f7f9fb;
}

.swot-manage-code {
  color: #5f7283;
  font-size: 12px;
  font-weight: 750;
}

.swot-manage-list strong,
.swot-manage-list small {
  display: block;
}

.swot-manage-list strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.swot-manage-list small {
  margin-top: 4px;
  color: #758493;
  font-size: 12px;
}

.swot-manage-list svg {
  width: 14px;
  height: 14px;
  color: #7a8997;
}

@media (max-width: 1280px) {
  .swot-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .swot-heading-actions {
    justify-content: flex-start;
  }

  .swot-process-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .swot-matrix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .swot-process-accordion > summary {
    grid-template-columns: 45px minmax(0, 1fr) auto 22px;
  }

  .swot-process-review {
    display: none;
  }
}

@media (max-width: 700px) {
  .swot-page {
    gap: 14px;
    font-size: 15px;
  }

  .swot-heading > div:first-child > p:last-child {
    font-size: 13px;
  }

  .swot-heading-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .swot-heading-actions > * {
    width: 100%;
  }

  .swot-heading-actions button,
  .swot-year {
    justify-content: center;
  }

  .swot-review-chip {
    display: none;
  }

  .swot-general,
  .swot-processes {
    padding: 13px;
    border-radius: 12px;
  }

  .swot-matrix {
    grid-template-columns: 1fr;
  }

  .swot-section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .swot-process-accordion > summary {
    min-height: 75px;
    grid-template-columns: 43px minmax(0, 1fr) 19px;
    gap: 9px;
    padding: 9px;
  }

  .swot-process-counts {
    grid-column: 2;
    grid-row: 2;
    text-align: left;
  }

  .swot-process-chevron {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .swot-process-content {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .swot-filters {
    grid-template-columns: 1fr;
  }

  .swot-form-modal,
  .swot-manage-modal,
  .swot-detail-modal {
    width: calc(100vw - 12px);
    max-height: 94vh;
  }

  .swot-form-grid,
  .swot-review-fields,
  .swot-treatment-fields,
  .swot-detail-grid {
    grid-template-columns: 1fr;
  }

  .swot-form-grid .full,
  .swot-review-fields .full,
  .swot-treatment-fields p {
    grid-column: auto;
  }

  .swot-process-picker > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .swot-toggle-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .swot-history article {
    align-items: flex-start;
    flex-direction: column;
  }

  .swot-manage-list > button {
    grid-template-columns: minmax(0, 1fr) 18px;
  }

  .swot-manage-code {
    grid-column: 1;
  }

  .swot-manage-list > button > span:nth-child(2) {
    grid-column: 1;
  }

  .swot-manage-list > button svg {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

/* Densité harmonisée du SWOT */
.swot-page{gap:15px;font-size:14px}
.swot-heading{gap:16px;padding:0}
.swot-heading h1{font-size:clamp(26px,2.2vw,30px)}
.swot-heading>div:first-child>p:last-child{margin-top:5px;font-size:14px;line-height:1.4}
.swot-heading-actions{gap:6px}
.swot-heading-actions button,.swot-year{min-height:36px}
.swot-year{padding-inline:9px;font-size:12px}
.swot-filters{gap:8px;margin-bottom:9px;padding:8px 10px;border-radius:9px}
.swot-filters label{gap:4px}
.swot-filters label>span{font-size:11px}
.swot-filters select{min-height:36px}
.swot-review-chip{min-height:36px;padding:4px 8px}
.swot-general,.swot-processes{padding:14px;border-radius:12px}
.swot-section-title{margin-bottom:10px}
.swot-section-title h2{font-size:19px}
.swot-matrix{gap:8px}
.swot-matrix-zone{padding:8px;border-radius:9px}
.swot-matrix-zone>header{grid-template-columns:26px minmax(0,1fr) auto;gap:6px;margin-bottom:5px}
.swot-matrix-zone>header>span{width:25px;height:25px;border-radius:7px}
.swot-matrix-zone h2{font-size:16px}
.swot-matrix-zone>header b{min-width:24px;height:24px;font-size:12px}
.swot-matrix .swot-item-card{gap:3px;padding:6px 2px}
.swot-matrix .swot-item-card>strong{font-size:13px;line-height:1.3}
.swot-matrix .swot-item-meta em,.swot-matrix .swot-item-meta i{font-size:10px}
.swot-process-list{gap:8px}
.swot-process-accordion>summary{padding:10px 12px}
.swot-process-content{gap:8px;padding:10px}
.swot-process-zone{padding:9px}
.swot-item-card{gap:5px;padding:9px 10px}
.swot-item-card>strong{font-size:14px;line-height:1.35}
.swot-item-card>p{font-size:12px}
