:root {
  --bg-tree: #f6f6f6;
  --border-soft: #e5e5e5;
  --selected-bg: #e3e3fd;
  --selected-border: #6a6af4;
  --hover-bg: #f4f4fc;
}

.panel-card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 1.5rem;
  height: 100%;
}

.panel-detail {
  position: sticky;
  top: 1rem;
}

/* Tree */
.tree {
  font-size: 0.875rem;
  line-height: 1.5;
}

.tree ul {
  list-style: none;
  margin: 0;
  padding-left: 1.25rem;
  border-left: 1px dashed var(--border-soft);
}

.tree > ul {
  padding-left: 0;
  border-left: 0;
}

.tree li {
  margin: 0.125rem 0;
}

.node-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.node-row:hover {
  background: var(--hover-bg);
}

.node-row.selected {
  background: var(--selected-bg);
  border-color: var(--selected-border);
}

.node-row.dim {
  opacity: 0.35;
}

.node-toggle {
  background: none;
  border: 0;
  padding: 0;
  width: 1rem;
  height: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-mention-grey, #666);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.node-toggle.placeholder {
  visibility: hidden;
}

.node-label {
  flex: 1;
  font-weight: 500;
}

.node-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.type-pill {
  font-size: 0.6875rem;
  padding: 0.0625rem 0.5rem;
  border-radius: 999px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid transparent;
}

.priority-pill {
  font-size: 0.625rem;
  padding: 0 0.375rem;
  border-radius: 2px;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: #f6f6f6;
  color: #666;
  border: 1px solid #ddd;
  text-transform: uppercase;
}

.priority-pill.mvp { background: #b8fec9; color: #18753c; border-color: #18753c; }
.priority-pill.v1  { background: #fee7fc; color: #6e445a; border-color: #6e445a; }
.priority-pill.v2  { background: #fff6e3; color: #716043; border-color: #b8a684; }
.priority-pill.v3  { background: #f4f4fc; color: #3a3a8c; border-color: #6a6af4; }

.complexity-pill {
  font-size: 0.625rem;
  padding: 0 0.375rem;
  border-radius: 2px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  text-transform: uppercase;
}

.complexity-pill.low    { background: #dffee2; color: #297254; border-color: #82c8a3; }
.complexity-pill.medium { background: #fff1d6; color: #8a6a3a; border-color: #d4b078; }
.complexity-pill.high   { background: #ffe4dd; color: #a93f1d; border-color: #d68a72; }

.auth-pill {
  font-size: 0.625rem;
  padding: 0 0.375rem;
  border-radius: 2px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: #efeae3;
  color: #5e5045;
  border: 1px solid #a8998a;
  text-transform: uppercase;
}

/* Type colors */
.type-hub        { background: #f4f4fc; color: #3a3a8c; border-color: #6a6af4; }
.type-editorial  { background: #fff; color: #444; border-color: #ddd; }
.type-service    { background: #e8edff; color: #2a3994; border-color: #8b9ed9; }
.type-simulator  { background: #fee7fc; color: #6e445a; border-color: #d28aa3; }
.type-map        { background: #b8fec9; color: #18753c; border-color: #5cba7a; }
.type-external   { background: #fff6e3; color: #716043; border-color: #d4be91; }
.type-marketplace{ background: #ffe8e5; color: #b34000; border-color: #e8a08a; }
.type-kit        { background: #fef7da; color: #716043; border-color: #d4c891; }
.type-form       { background: #e0f3ff; color: #0063cb; border-color: #88b8e0; }
.type-private    { background: #efeae3; color: #5e5045; border-color: #a8998a; }

/* Legend */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

/* Panel form */
.panel-empty {
  color: var(--text-mention-grey, #666);
  font-style: italic;
  padding: 1rem 0;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

.panel-actions--top {
  margin-top: 0;
  margin-bottom: 1rem;
  padding-top: 0;
  padding-bottom: 1rem;
  border-top: 0;
  border-bottom: 1px solid var(--border-soft);
}

.panel-id {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--text-mention-grey, #666);
  margin-bottom: 1rem;
}

.panel-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  align-items: center;
  margin: 0 0 0.75rem;
}

.export-textarea {
  width: 100%;
  min-height: 220px;
  font-family: monospace;
  font-size: 0.75rem;
  padding: 0.5rem;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
}

dialog.app-dialog {
  padding: 1.5rem;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  max-width: min(1200px, 95vw);
  width: 95vw;
  max-height: 90vh;
  overflow: auto;
}

dialog.app-dialog::backdrop {
  background: rgba(22, 22, 22, 0.5);
}

.app-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.app-dialog__title {
  margin: 0;
}

.app-dialog__close {
  appearance: none;
  background: transparent;
  border: 0;
  font-size: 1.75rem;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  color: var(--text-mention-grey, #666);
  border-radius: 4px;
}

.app-dialog__close:hover,
.app-dialog__close:focus-visible {
  background: var(--background-alt-grey, #eee);
  color: var(--text-default-grey, #161616);
  outline: none;
}

.graph-container {
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 1rem;
  margin-top: 1rem;
  overflow: auto;
  background: #fff;
  max-height: 70vh;
}

.graph-container svg {
  max-width: none;
  height: auto;
}

/* Cartography list */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 70vh;
  overflow-y: auto;
}

.item-card {
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 0.75rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  background: #fff;
}

.item-card:hover { background: var(--hover-bg); }

.item-card.selected {
  background: var(--selected-bg);
  border-color: var(--selected-border);
}

.item-card__head {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.375rem;
}

.item-card__id {
  font-family: monospace;
  font-size: 0.6875rem;
  color: var(--text-mention-grey, #666);
  flex-shrink: 0;
}

.item-card__name {
  font-size: 0.9375rem;
  line-height: 1.3;
}

.item-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}

.item-card__porteur {
  font-size: 0.75rem;
  color: var(--text-mention-grey, #666);
  margin: 0;
}

.item-badge {
  font-size: 0.6875rem;
  padding: 0.0625rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #f6f6f6;
  color: #444;
  white-space: nowrap;
}

.badge-cat   { background: #f4f4fc; color: #3a3a8c; border-color: #6a6af4; }
.badge-aud   { background: #e0f3ff; color: #0063cb; border-color: #88b8e0; }
.badge-type  { background: #fff6e3; color: #716043; border-color: #d4be91; }
.badge-prob  { background: #fef7da; color: #716043; border-color: #d4c891; }
.badge-imp   { background: #ffe4dd; color: #8a3919; border-color: #d68a72; }

.crit-low      { background: #dffee2; color: #297254; border-color: #82c8a3; font-weight: 700; }
.crit-medium   { background: #fff1d6; color: #8a6a3a; border-color: #d4b078; font-weight: 700; }
.crit-high     { background: #ffe4dd; color: #a93f1d; border-color: #d68a72; font-weight: 700; }
.crit-critical { background: #ce0500; color: #fff;    border-color: #ce0500; font-weight: 700; }

/* ---- Objectifs (pyramide stratégique) ---- */

.objectifs-intro {
  border-left: 3px solid #6a6af4;
  padding: 0.25rem 0 0.25rem 0.875rem;
  background: transparent;
}

.objectifs-intro__promise {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.objectifs-intro__subtitle {
  font-size: 0.875rem;
  color: var(--text-mention-grey, #666);
  margin: 0;
  font-style: italic;
}

.objectifs-tree {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.objectif-axe {
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  background: #fff;
}

.objectif-axe__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.objectif-toggle {
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 0.875rem;
  padding: 0;
  width: 1.25rem;
  color: var(--text-mention-grey, #666);
}

.objectif-axe__title {
  font-size: 1rem;
  margin: 0;
  font-weight: 600;
}

.objectif-axe__desc {
  font-size: 0.8125rem;
  color: var(--text-mention-grey, #666);
  margin: 0.25rem 0 0.5rem 1.75rem;
  font-style: italic;
}

.objectif-objective {
  margin: 0.5rem 0 0.5rem 1.5rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--border-soft);
}

.objectif-objective__head {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.objectif-objective__title {
  font-size: 0.9375rem;
  margin: 0;
  font-weight: 600;
}

.objectif-objective__head + .objectif-means {
  margin-top: 0.375rem;
}

.objectif-means {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* A "mean" is rendered as a single horizontal row (id · text · linked nodes). */
.objectif-mean {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.625rem;
  padding: 0.375rem 0.625rem;
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: 4px;
}

.objectif-mean__text {
  flex: 1 1 18rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  min-width: 0;
}

.objectif-mean__nodes {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  flex: 0 0 auto;
}

.objectif-id {
  font-family: monospace;
  font-size: 0.75rem;
  color: #6a6af4;
  font-weight: 600;
}

.objectif-id--mean {
  background: #f4f4fc;
  border: 1px solid #d6d6f4;
  padding: 0.0625rem 0.375rem;
  border-radius: 3px;
  flex: 0 0 auto;
}

/* Kind badges: Axe / Objectif / Moyen — replace the raw "A1.01.M1" ids. */
.kind-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  margin-right: 0.375rem;
  vertical-align: 0.0625rem;
}

.kind-badge--axe {
  background: #3a3a8c;
  color: #fff;
  border-color: #3a3a8c;
}

.kind-badge--objective {
  background: #e3e3fd;
  color: #3a3a8c;
  border-color: #6a6af4;
}

.kind-badge--mean {
  background: #fff;
  color: #6a6af4;
  border-color: #b8b8e0;
  flex: 0 0 auto;
  margin-right: 0;
}

/* Depth level pill inside a node-link-badge (replaces the raw node id). */
.node-link-badge .badge-level {
  font-family: monospace;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0 0.3125rem;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.1);
  letter-spacing: 0.02em;
}

/* ---- Mesures du plan (collection page) ---- */

.mesures-board {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
  align-items: start;
}

.mesures-col-header {
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  text-align: center;
  font-size: 0.875rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  background: #fff;
}

.mesures-col-header.deadline-juin       { background: #fff7f5; }
.mesures-col-header.deadline-septembre  { background: #fffbf2; }
.mesures-col-header.deadline-decembre   { background: #f5faff; }
.mesures-col-header.deadline-y2027      { background: #f8f8fd; }

.mesures-col-count {
  font-size: 0.75rem;
  color: var(--text-mention-grey, #666);
}

.mesures-cell {
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 80px;
  background: #fff;
}

.mesures-cell.deadline-juin       { background: #fffcfb; }
.mesures-cell.deadline-septembre  { background: #fffdf7; }
.mesures-cell.deadline-decembre   { background: #fafdff; }
.mesures-cell.deadline-y2027      { background: #fcfcfe; }

.mesures-cell__empty {
  color: var(--text-mention-grey, #666);
  text-align: center;
  margin: 0;
  padding: 0.5rem 0;
}

.mesure-card__axe {
  font-size: 0.6875rem;
  color: var(--text-mention-grey, #666);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 768px) {
  .mesures-board { grid-template-columns: 1fr !important; }
  .mesures-col-header { text-align: left; flex-direction: row; justify-content: space-between; }
}

.mesure-card {
  border: 1px solid var(--border-soft);
  border-left: 4px solid #6a6af4;
  border-radius: 4px;
  background: #fff;
  padding: 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
}

.mesure-card:hover,
.mesure-card:focus-visible {
  background: #f7f7ff;
  box-shadow: 0 2px 6px rgba(106, 106, 244, 0.2);
  outline: none;
}

.mesure-card--transverse { border-left-color: #6a6af4; }
.mesure-card--batiment   { border-left-color: #18753c; }
.mesure-card--mobilites  { border-left-color: #b34000; }
.mesure-card--industrie  { border-left-color: #0063cb; }

.mesure-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.mesure-card__id {
  font-family: monospace;
  font-size: 0.75rem;
  font-weight: 700;
  background: #f4f4fc;
  color: #3a3a8c;
  padding: 0.125rem 0.4rem;
  border: 1px solid #d6d6f4;
  border-radius: 3px;
}

.mesure-card__title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
  color: var(--text-default, #161616);
}

.mesure-card__summary {
  font-size: 0.8125rem;
  margin: 0;
  color: #444;
  line-height: 1.4;
}

.mesure-card__crumbs {
  font-size: 0.6875rem;
  color: var(--text-mention-grey, #666);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.mesure-card__audiences {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.mesure-card__nodes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  font-size: 0.6875rem;
  border-top: 1px dashed var(--border-soft);
  padding-top: 0.5rem;
}

.mesure-card__nodes-label {
  color: var(--text-mention-grey, #666);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.625rem;
  margin-right: 0.25rem;
}

.mesure-card__nodes-empty {
  color: var(--text-mention-grey, #666);
  font-style: italic;
  font-size: 0.75rem;
}

.mesure-card .node-link-badge {
  font-size: 0.625rem;
  padding: 0 0.4rem;
}

/* Detail overlay */
.mesure-detail[hidden] {
  display: none;
}

.mesure-detail {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mesure-detail__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 22, 22, 0.5);
}

.mesure-detail__panel {
  position: relative;
  background: #fff;
  border-radius: 6px;
  width: min(880px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.mesure-detail__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.mesure-detail__crumbs {
  font-size: 0.75rem;
  color: var(--text-mention-grey, #666);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mesure-detail__close {
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-mention-grey, #666);
  padding: 0.25rem 0.5rem;
}

.mesure-detail__close:hover { color: #b34000; }

.mesure-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.mesure-detail__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.625rem;
  line-height: 1.3;
}

.mesure-detail__description {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #333;
  margin: 0 0 1rem;
}

.mesure-detail__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem 1.25rem;
  margin: 0 0 1.25rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.mesure-detail__grid > div { margin: 0; }
.mesure-detail__grid dt {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-mention-grey, #666);
  margin-bottom: 0.125rem;
  font-weight: 600;
}
.mesure-detail__grid dd {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
}

.mesure-detail__nodes h3 { margin: 0 0 0.5rem; }

.mesure-detail__nodes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.mesure-detail__nodes-list .node-link-badge {
  text-decoration: none;
}

/* ---- Mesure linkage on a node panel ---- */

.mesure-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0.25rem 0 0.5rem;
}

.mesure-link-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  font-size: 0.6875rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: #f4f4fc;
  color: #3a3a8c;
  border: 1px solid #6a6af4;
  cursor: pointer;
  font-family: inherit;
}

.mesure-link-badge:hover { background: #e3e3fd; }

.mesure-link-badge--unknown {
  background: #ffe4dd;
  color: #a93f1d;
  border-color: #d68a72;
}

.mesure-link-badge .badge-id {
  font-family: monospace;
  font-weight: 700;
}

.mesure-link-badge .badge-label {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mesure-link-badge .badge-x {
  font-weight: 700;
  opacity: 0.6;
  margin-left: 0.125rem;
}

/* ---- Coverage / lacunes (en fin de page) ---- */

.objectifs-coverage {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--border-soft);
}

.objectifs-coverage__title {
  margin: 0 0 0.75rem;
}

.objectifs-coverage__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.objectifs-coverage__block {
  margin-bottom: 1.5rem;
}

.objectifs-coverage__block > h3 {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
}

.objectifs-coverage__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.objectifs-coverage__unknown {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  background: #fff5f3;
  border: 1px solid #d68a72;
}

.node-link-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: #e3e3fd;
  color: #3a3a8c;
  border: 1px solid #6a6af4;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.node-link-badge:hover {
  background: #c8c8fa;
}

.node-link-badge--unknown {
  background: #ffe4dd;
  color: #a93f1d;
  border-color: #d68a72;
}

/* Typed variant: re-uses the type-{key} palette so the badge picks up the
   primary type's colour, keeping visual cohesion with the arborescence. */
.node-link-badge--typed.type-hub        { background: #f4f4fc; color: #3a3a8c; border-color: #6a6af4; }
.node-link-badge--typed.type-editorial  { background: #fff;    color: #444;    border-color: #aaa; }
.node-link-badge--typed.type-service    { background: #e8edff; color: #2a3994; border-color: #8b9ed9; }
.node-link-badge--typed.type-simulator  { background: #fee7fc; color: #6e445a; border-color: #d28aa3; }
.node-link-badge--typed.type-map        { background: #d6f5df; color: #18753c; border-color: #5cba7a; }
.node-link-badge--typed.type-external   { background: #fff6e3; color: #716043; border-color: #d4be91; }
.node-link-badge--typed.type-marketplace{ background: #ffe8e5; color: #b34000; border-color: #e8a08a; }
.node-link-badge--typed.type-kit        { background: #fef7da; color: #716043; border-color: #d4c891; }
.node-link-badge--typed.type-form       { background: #e0f3ff; color: #0063cb; border-color: #88b8e0; }
.node-link-badge--typed.type-private    { background: #efeae3; color: #5e5045; border-color: #a8998a; }

.node-link-badge .badge-id {
  font-family: monospace;
  font-weight: 600;
}

.node-link-badge .badge-label {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-link-badge .badge-x {
  font-weight: 700;
  opacity: 0.6;
  margin-left: 0.125rem;
}

.add-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.add-link__btn {
  font-size: 0.75rem;
  padding: 0.125rem 0.625rem;
}

.add-link__input {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  width: 18rem;
  background: #fff;
}

.add-link__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  max-height: 16rem;
  overflow-y: auto;
  width: 22rem;
  z-index: 100;
}

.add-link__option {
  padding: 0.375rem 0.625rem;
  cursor: pointer;
  font-size: 0.8125rem;
  border-bottom: 1px solid #f0f0f0;
}

.add-link__option:last-child { border-bottom: 0; }
.add-link__option:hover { background: var(--hover-bg); }

.orphan-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8125rem;
}

.orphan-list li {
  padding: 0.25rem 0;
  border-bottom: 1px dashed #ececec;
}

.orphan-list li:last-child { border-bottom: 0; }

.badge-id--err {
  color: #a93f1d;
}

/* Objectives linked to a tree node, shown in the detail panel */
.objective-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0.5rem 0 0.75rem;
}

.objective-link-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: #fff6e3;
  color: #716043;
  border: 1px solid #d4be91;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background 0.15s;
}

.objective-link-badge:hover {
  background: #f5e6c4;
}

.objective-link-badge .badge-id {
  font-family: monospace;
  font-weight: 600;
  color: #6a4d12;
}

.objective-link-badge .badge-label {
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.objective-link-badge .badge-x {
  font-weight: 700;
  opacity: 0.6;
  margin-left: 0.125rem;
}

/* ---- Collaboration: identity, status, comments, history ---- */

.identity-zone {
  font-size: 0.8125rem;
  color: var(--text-mention-grey, #666);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 1rem;
}

.identity-zone .identity-name {
  font-weight: 600;
  color: var(--text-default, #161616);
}

.save-status {
  font-size: 0.75rem;
  margin-top: 0.5rem;
  min-height: 1rem;
  color: var(--text-mention-grey, #666);
}

.save-status--saving { color: #716043; }
.save-status--saved  { color: #18753c; }
.save-status--error,
.save-status--conflict { color: #b34000; font-weight: 600; }

.comment-pill {
  font-size: 0.6875rem;
  padding: 0 0.375rem;
  border-radius: 999px;
  border: 1px solid #d6d6f0;
  background: #f4f4fc;
  color: #3a3a8c;
  white-space: nowrap;
}

.comments-section {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.comment-item {
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  background: #fafafa;
}

.comment-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  margin-bottom: 0.25rem;
}

.comment-head strong { color: #3a3a8c; }

.comment-head .comment-date {
  font-size: 0.75rem;
  color: var(--text-mention-grey, #666);
  margin-left: auto;
}

.comment-body {
  font-size: 0.875rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.comment-form textarea {
  font-size: 0.875rem;
}

/* ---- History dialog ---- */

.history-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
  min-height: 400px;
}

@media (max-width: 720px) {
  .history-layout { grid-template-columns: 1fr; }
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 70vh;
  overflow-y: auto;
  border-right: 1px solid var(--border-soft);
  padding-right: 0.5rem;
}

.history-item {
  text-align: left;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.history-item:hover { background: var(--hover-bg); }

.history-item--head {
  background: #f4f4fc;
  border-color: #6a6af4;
}

.history-item--selected {
  background: var(--selected-bg);
  border-color: var(--selected-border);
  box-shadow: inset 0 0 0 1px var(--selected-border);
}

.history-item__head {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-mention-grey, #666);
  margin-bottom: 0.25rem;
}

.history-item__id { font-family: monospace; font-weight: 700; color: #3a3a8c; }

.history-item__msg {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-default, #161616);
}

.history-item__date {
  font-size: 0.6875rem;
  color: var(--text-mention-grey, #666);
  margin-top: 0.25rem;
}

.history-detail {
  max-height: 70vh;
  overflow-y: auto;
  padding-left: 0.5rem;
}

.history-meta { font-size: 0.875rem; }

/* ---- Diff ---- */

.diff-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.diff-item {
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  background: #fff;
}

.diff-added   { border-left: 3px solid #18753c; }
.diff-removed { border-left: 3px solid #b34000; }
.diff-changed { border-left: 3px solid #6a6af4; }

.diff-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
}

.diff-badge {
  font-size: 0.6875rem;
  padding: 0.0625rem 0.5rem;
  border-radius: 2px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.diff-badge-added   { background: #b8fec9; color: #18753c; }
.diff-badge-removed { background: #ffe4dd; color: #b34000; }
.diff-badge-changed { background: #f4f4fc; color: #3a3a8c; }

.diff-label { font-weight: 500; flex: 1; }

.diff-id {
  font-family: monospace;
  font-size: 0.6875rem;
  color: var(--text-mention-grey, #666);
}

.diff-details {
  font-size: 0.8125rem;
  margin-top: 0.25rem;
  padding-top: 0.25rem;
  border-top: 1px dashed var(--border-soft);
}

.diff-field {
  margin: 0.125rem 0;
  font-family: monospace;
  font-size: 0.75rem;
  word-wrap: break-word;
}

.diff-field-name {
  font-weight: 700;
  color: #3a3a8c;
}

.diff-field del {
  background: #ffe4dd;
  color: #b34000;
  text-decoration: line-through;
  padding: 0 0.125rem;
}

.diff-field ins {
  background: #b8fec9;
  color: #18753c;
  text-decoration: none;
  padding: 0 0.125rem;
}

.diff-list-modified {
  background: #f4f4fc;
  color: #3a3a8c;
  padding: 0 0.25rem;
  border-radius: 2px;
  font-weight: 600;
}

.diff-sublist {
  margin: 0.25rem 0 0;
  padding-left: 1rem;
  list-style: none;
}

.diff-sublist li {
  margin: 0.125rem 0;
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.diff-sublist .diff-badge {
  flex-shrink: 0;
}

.identify-dialog {
  max-width: 480px;
}

/* ---- Decision tree (dispositifs page) ---- */

.decision-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.decision-breadcrumb__step {
  background: none;
  border: 0;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  color: #3a3a8c;
  font-weight: 500;
  font-size: inherit;
}

.decision-breadcrumb__step:hover { background: var(--hover-bg); }

.decision-breadcrumb__step--active {
  color: var(--text-default, #161616);
  cursor: default;
}

.decision-breadcrumb__step--active:hover { background: none; }

.decision-breadcrumb__sep {
  color: var(--text-mention-grey, #666);
  font-size: 1rem;
}

.decision-breadcrumb__restart {
  margin-left: auto;
}

.decision-step { padding: 0.5rem 0; }

.decision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.decision-card {
  text-align: left;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 1rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
  font: inherit;
  color: inherit;
}

.decision-card:hover {
  background: var(--hover-bg);
  border-color: var(--selected-border);
}

.decision-card:active { transform: scale(0.99); }

.decision-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #3a3a8c;
}

.decision-card__sub {
  font-size: 0.8125rem;
  color: var(--text-mention-grey, #666);
}

/* Questions */

.decision-questions {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.decision-question__label {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.decision-question__options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.decision-option {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 0.5rem 0.875rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
  font-size: 0.875rem;
  transition: background 0.15s, border-color 0.15s;
}

.decision-option:hover {
  background: var(--hover-bg);
  border-color: var(--selected-border);
}

.decision-option--selected {
  background: var(--selected-bg);
  border-color: var(--selected-border);
  color: #3a3a8c;
  font-weight: 600;
}

/* Outcomes */

.outcome-card {
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  background: #fff;
  border-left-width: 4px;
}

.outcome-card--p0 { border-left-color: #6a6af4; background: #fafaff; }
.outcome-card--p1 { border-left-color: #18753c; }
.outcome-card--p2 { border-left-color: #b8a684; }

.outcome-card__head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.outcome-card__title {
  margin: 0;
  flex: 1;
}

.outcome-priority {
  font-size: 0.6875rem;
  padding: 0.125rem 0.5rem;
  border-radius: 2px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.outcome-priority.priority-pre  { background: #e3e3fd; color: #3a3a8c; border: 1px solid #6a6af4; }
.outcome-priority.priority-main { background: #b8fec9; color: #18753c; border: 1px solid #18753c; }
.outcome-priority.priority-sec  { background: #fff6e3; color: #716043; border: 1px solid #b8a684; }

.outcome-card__explanation {
  font-size: 0.875rem;
  color: var(--text-default, #161616);
  margin: 0 0 0.75rem;
}

.outcome-dispositifs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.outcome-dispositif {
  border-top: 1px dashed var(--border-soft);
  padding-top: 0.5rem;
}

.outcome-dispositif__head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.outcome-dispositif__ref {
  font-family: monospace;
  font-size: 0.6875rem;
  background: #f4f4fc;
  color: #3a3a8c;
  padding: 0 0.375rem;
  border-radius: 2px;
  white-space: nowrap;
}

.outcome-dispositif__name {
  font-size: 0.9375rem;
  color: var(--text-default, #161616);
}

.outcome-dispositif__role {
  font-size: 0.75rem;
  color: var(--text-mention-grey, #666);
  font-style: italic;
}

.outcome-dispositif__tldr {
  font-size: 0.8125rem;
  margin: 0.25rem 0;
  color: var(--text-default, #161616);
}

.outcome-dispositif__note {
  font-size: 0.75rem;
  color: var(--text-mention-grey, #666);
  font-style: italic;
  margin: 0.25rem 0;
}

/* ---- Flat list (arborescence) ---- */

.flat-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.flat-row {
  display: grid;
  grid-template-columns: 1.4rem 130px 1fr auto;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  padding-left: calc(0.5rem + var(--depth, 0) * 1.4rem);
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background 0.12s;
  align-items: center;
  position: relative;
  background: #fff;
}

/* Subtle depth tint so cousin clusters are visible without indent guides */
.flat-row[data-depth="1"] { background: #fbfbf8; }
.flat-row[data-depth="2"] { background: #f7f6ee; }
.flat-row[data-depth="3"] { background: #f3f1e4; }
.flat-row[data-depth="4"] { background: #efedda; }

/* Left rail to mark depth boundaries */
.flat-row[data-depth]:not([data-depth="0"])::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(0.5rem + (var(--depth) - 1) * 1.4rem + 0.6rem);
  width: 2px;
  background: #c8c5b3;
}

.flat-row:last-child { border-bottom: 0; }
.flat-row:hover { background: var(--hover-bg); }

.flat-row.selected {
  background: var(--selected-bg);
  box-shadow: inset 3px 0 0 var(--selected-border);
}

.flat-row.dim { opacity: 0.35; }

.flat-row.dragging {
  opacity: 0.4;
  cursor: grabbing;
}

.flat-row.drag-over-before {
  border-top: 2px solid var(--selected-border);
  margin-top: -1px;
}

.flat-row.drag-over-after {
  border-bottom: 2px solid var(--selected-border);
  margin-bottom: -1px;
}

.flat-row.drag-over-child {
  background: #e3e3fd;
  outline: 2px dashed var(--selected-border);
  outline-offset: -3px;
}

.flat-row__toggle {
  background: transparent;
  border: 0;
  padding: 0;
  width: 1.4rem;
  height: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #555;
  font-size: 0.875rem;
  border-radius: 3px;
}

.flat-row__toggle:hover:not(.flat-row__toggle--placeholder) {
  background: rgba(0, 0, 0, 0.06);
  color: #000;
}

.flat-row__toggle--placeholder {
  cursor: default;
  visibility: hidden;
}

.flat-row__audience { font-size: 0.75rem; }

.audience-tag {
  display: inline-block;
  font-size: 0.6875rem;
  padding: 0.0625rem 0.5rem;
  border-radius: 999px;
  background: #e0f3ff;
  color: #0063cb;
  border: 1px solid #88b8e0;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flat-row__text {
  min-width: 0;
  display: flex;
  align-items: center;
}

.flat-row__label {
  font-size: 0.875rem;
  line-height: 1.35;
  font-weight: 600;
}

.flat-row__tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  justify-content: flex-end;
}

.mesure-pill {
  font-size: 0.625rem;
  padding: 0 0.375rem;
  border-radius: 2px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: #f8eccd;
  color: #6a4d12;
  border: 1px solid #d4b078;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .flat-row {
    grid-template-columns: 1.4rem 1fr;
    gap: 0.375rem;
  }
  .flat-row__tags { grid-column: 1 / -1; justify-content: flex-start; padding-left: 1.4rem; }
  .flat-row__audience { grid-column: 1 / -1; padding-left: 1.4rem; }
}

.dispositif-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0.5rem 0 0.75rem;
}

/* ---- Roadmap ---- */

.roadmap-mode {
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  margin: 0;
  background: #fafafa;
}

.roadmap-mode__buttons {
  display: inline-flex;
  gap: 0;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #ccc;
  overflow: hidden;
}

.roadmap-mode__btn {
  font: inherit;
  font-size: 0.8125rem;
  padding: 0.375rem 0.875rem;
  background: transparent;
  color: #555;
  border: 0;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
}

.roadmap-mode__btn:hover { background: #f4f4fc; color: #3a3a8c; }

.roadmap-mode__btn--on,
.roadmap-mode__btn--on:hover {
  background: #3a3a8c;
  color: #fff;
  font-weight: 600;
}

.roadmap-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
}

.roadmap-stat {
  padding: 0.125rem 0.625rem;
  border: 1px solid var(--border-soft);
  background: #fff;
  border-radius: 999px;
  color: var(--text-mention-grey, #666);
}

.roadmap-stat strong { color: var(--text-default, #161616); font-weight: 600; }
.roadmap-stat--valide { color: #18753c; border-color: #82c8a3; }
.roadmap-stat--valide strong { color: #18753c; }
.roadmap-stat--arbitrer { color: #8a6a3a; border-color: #d4b078; }
.roadmap-stat--arbitrer strong { color: #8a6a3a; }

.roadmap-board {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

.roadmap-corner { background: transparent; }

.roadmap-col-header {
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  text-align: center;
  font-size: 0.875rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  background: #fff;
}

.roadmap-col-header.deadline-juin       { background: #fff7f5; }
.roadmap-col-header.deadline-septembre  { background: #fffbf2; }
.roadmap-col-header.deadline-decembre   { background: #f5faff; }
.roadmap-col-header.deadline-y2027      { background: #f8f8fd; }

.roadmap-row-header {
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border-soft);
  background: #fafafa;
  border-radius: 4px;
  font-size: 0.875rem;
  border-left: 4px solid #888;
  display: flex;
  align-items: center;
}

.roadmap-row-header.type-hub         { border-left-color: #6a6af4; }
.roadmap-row-header.type-editorial   { border-left-color: #aaa; }
.roadmap-row-header.type-service     { border-left-color: #8b9ed9; }
.roadmap-row-header.type-simulator   { border-left-color: #d28aa3; }
.roadmap-row-header.type-map         { border-left-color: #5cba7a; }
.roadmap-row-header.type-external    { border-left-color: #d4be91; }
.roadmap-row-header.type-marketplace { border-left-color: #e8a08a; }
.roadmap-row-header.type-kit         { border-left-color: #d4c891; }
.roadmap-row-header.type-form        { border-left-color: #88b8e0; }
.roadmap-row-header.type-private     { border-left-color: #a8998a; }

.roadmap-row-header--audiences { border-left-color: #0063cb; }

.roadmap-cell {
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-height: 80px;
  background: #fff;
}

.roadmap-cell.deadline-juin       { background: #fffcfb; }
.roadmap-cell.deadline-septembre  { background: #fffdf7; }
.roadmap-cell.deadline-decembre   { background: #fafdff; }
.roadmap-cell.deadline-y2027      { background: #fcfcfe; }

.roadmap-card {
  border: 1px solid var(--border-soft);
  border-left: 3px solid #aaa;
  border-radius: 4px;
  padding: 0.5rem 0.625rem;
  background: #fff;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  cursor: grab;
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
}

.roadmap-card:active { cursor: grabbing; }

.roadmap-card:hover {
  background: #f7f7ff;
  border-color: #6a6af4;
  box-shadow: 0 1px 3px rgba(106, 106, 244, 0.15);
}

.roadmap-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.roadmap-card--dragging {
  opacity: 0.4;
}

.roadmap-card__open {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 4px;
  color: #555;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.roadmap-card__open:hover {
  background: #3a3a8c;
  color: #fff;
  border-color: #3a3a8c;
}

.roadmap-cell--drop-target {
  outline: 2px dashed #6a6af4;
  outline-offset: -3px;
  background: #f0f0ff !important;
}

.roadmap-card--node {
  border-left-color: #6a6af4;
}

.roadmap-card--improvement {
  border-left-color: #18753c;
  background: #f7fcf8;
}

.roadmap-card--improvement:hover {
  background: #edfaf0;
  border-color: #18753c;
}

.roadmap-card__parent {
  font-size: 0.6875rem;
  color: var(--text-mention-grey, #666);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px dashed var(--border-soft);
  padding-bottom: 0.25rem;
  margin-bottom: 0.125rem;
}

.roadmap-card__title {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-default, #161616);
}

.roadmap-card__desc {
  font-size: 0.75rem;
  line-height: 1.4;
  color: #444;
  margin: 0;
}

.roadmap-card__meta {
  display: flex;
  gap: 0.375rem;
  align-items: center;
  margin-top: 0.125rem;
}

.roadmap-card__id {
  font-family: monospace;
  font-size: 0.625rem;
  color: var(--text-mention-grey, #666);
}

.roadmap-add-btn {
  margin-top: auto;
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: 1px dashed var(--border-soft);
  border-radius: 4px;
  color: var(--text-mention-grey, #666);
  cursor: pointer;
  font-size: 0.75rem;
  font-family: inherit;
}

.roadmap-add-btn:hover {
  background: #fafafa;
  border-style: solid;
  border-color: #6a6af4;
  color: #3a3a8c;
}

@media (max-width: 900px) {
  .roadmap-board { grid-template-columns: 1fr !important; }
  .roadmap-corner { display: none; }
  .roadmap-col-header { text-align: left; }
}

/* ---- Deadline pills (tree) ---- */

.deadline-pill {
  font-size: 0.625rem;
  padding: 0 0.375rem;
  border-radius: 2px;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: #f6f6f6;
  color: #666;
  border: 1px solid #ddd;
  text-transform: uppercase;
  white-space: nowrap;
}

.deadline-pill.juin       { background: #ffe4dd; color: #a93f1d; border-color: #d68a72; }
.deadline-pill.septembre  { background: #fff1d6; color: #8a6a3a; border-color: #d4b078; }
.deadline-pill.decembre   { background: #e0f3ff; color: #0063cb; border-color: #88b8e0; }
.deadline-pill.y2027      { background: #f4f4fc; color: #3a3a8c; border-color: #6a6af4; }

.time-pill {
  font-size: 0.625rem;
  padding: 0 0.375rem;
  border-radius: 2px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: #efeae3;
  color: #5e5045;
  border: 1px solid #c8b8a3;
  white-space: nowrap;
}

.blocks-pill {
  font-size: 0.625rem;
  padding: 0 0.375rem;
  border-radius: 2px;
  font-weight: 600;
  background: #f4f4fc;
  color: #3a3a8c;
  border: 1px solid #b8b8e0;
  white-space: nowrap;
}

/* Multi-audience tags inside a row: stack vertically when many, allow wrap */
.flat-row__audience {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.audience-tag--inherited {
  background: #f4f4f4;
  color: #777;
  border-color: #ddd;
  font-style: italic;
}

/* ---- Panel title input ---- */

.panel-title-group { margin-bottom: 0.25rem; }

.panel-title-input {
  font-size: 1.125rem;
  font-weight: 600;
  padding: 0.5rem 0.625rem;
  line-height: 1.3;
}

/* ---- Panel blocks (sections du détail du nœud) ---- */

.panel-block {
  margin-bottom: 1rem;
}

.panel-block--main {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-soft);
}

.panel-block--main .panel-meta-strip { margin-bottom: 0; }
.panel-block--main .panel-id { margin-bottom: 0; }
.panel-block--main .panel-title-group { margin-bottom: 0; }
.panel-block--main .fr-input-group { margin-bottom: 0; }

/* Blocks section + content-comments sit flush with the surrounding blocks */
.panel-block .blocks-section { margin-top: 0; padding-top: 0; border-top: 0; }
.panel-block .comments-section { margin-top: 0; }

/* ---- Panel accordion (Configuration détaillée, Dispositifs, Objectifs) ---- */

.panel-accordion + .panel-accordion { margin-top: 0.5rem; }

.panel-accordion {
  margin-top: 1rem;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  background: #fafafa;
}

.panel-accordion__summary {
  cursor: pointer;
  padding: 0.625rem 2.25rem 0.625rem 0.875rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-default, #161616);
  list-style: none;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-accordion__summary::-webkit-details-marker { display: none; }

.panel-accordion__title { flex: 1; min-width: 0; }

.panel-accordion__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.25rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: #e3e3fd;
  color: #2a2a8c;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid #b8b8e0;
}

.panel-accordion__count--empty {
  background: #f1f1f1;
  color: #999;
  border-color: #ddd;
}

.panel-accordion__summary::after {
  content: '▸';
  position: absolute;
  right: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.15s;
  color: var(--text-mention-grey, #666);
}

.panel-accordion[open] .panel-accordion__summary::after { transform: translateY(-50%) rotate(90deg); }

.panel-accordion__body {
  padding: 0.5rem 0.875rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  background: #fff;
  border-top: 1px solid var(--border-soft);
}

.time-fields {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.time-fields__label { font-weight: 600; }

.time-fields__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.time-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  cursor: text;
}

.time-cell__label {
  color: #555;
  font-weight: 500;
  min-width: 2.5rem;
}

.time-cell__input {
  width: 4rem;
  padding: 0.25rem 0.4rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font: inherit;
  background: #fff;
  text-align: right;
}

.time-cell__input:focus {
  outline: 2px solid var(--selected-border, #6a6af4);
  outline-offset: -1px;
}

.time-cell__unit {
  color: #777;
  font-size: 0.75rem;
}

/* ---- Type chips (single-select) ---- */

.type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.25rem;
}

.type-chip {
  font: inherit;
  font-size: 0.75rem;
  padding: 0.1875rem 0.625rem;
  border-radius: 999px;
  background: #fff;
  color: #555;
  border: 1px solid #ccc;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.type-chip:hover { filter: brightness(0.97); }

.type-chip--hub        { color: #3a3a8c; border-color: #6a6af4; }
.type-chip--editorial  { color: #444;    border-color: #aaa; }
.type-chip--service    { color: #2a3994; border-color: #8b9ed9; }
.type-chip--simulator  { color: #6e445a; border-color: #d28aa3; }
.type-chip--map        { color: #18753c; border-color: #5cba7a; }
.type-chip--external   { color: #716043; border-color: #d4be91; }
.type-chip--marketplace{ color: #b34000; border-color: #e8a08a; }
.type-chip--kit        { color: #716043; border-color: #d4c891; }
.type-chip--form       { color: #0063cb; border-color: #88b8e0; }
.type-chip--private    { color: #5e5045; border-color: #a8998a; }

.type-chip--hub.type-chip--on        { background: #f4f4fc; }
.type-chip--editorial.type-chip--on  { background: #f5f5f5; }
.type-chip--service.type-chip--on    { background: #e8edff; }
.type-chip--simulator.type-chip--on  { background: #fee7fc; }
.type-chip--map.type-chip--on        { background: #b8fec9; }
.type-chip--external.type-chip--on   { background: #fff6e3; }
.type-chip--marketplace.type-chip--on{ background: #ffe8e5; }
.type-chip--kit.type-chip--on        { background: #fef7da; }
.type-chip--form.type-chip--on       { background: #e0f3ff; }
.type-chip--private.type-chip--on    { background: #efeae3; }

.type-chip--on {
  font-weight: 700;
  box-shadow: inset 0 0 0 1px currentColor;
}

/* ---- Deadline chips (single-select) ---- */

.deadline-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.25rem;
}

.deadline-chip {
  font: inherit;
  font-size: 0.75rem;
  padding: 0.1875rem 0.625rem;
  border-radius: 999px;
  background: #fff;
  color: #555;
  border: 1px solid #ccc;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.deadline-chip:hover { filter: brightness(0.97); }

.deadline-chip--juin       { color: #a93f1d; border-color: #d68a72; }
.deadline-chip--septembre  { color: #8a6a3a; border-color: #d4b078; }
.deadline-chip--decembre   { color: #0063cb; border-color: #88b8e0; }
.deadline-chip--y2027      { color: #3a3a8c; border-color: #6a6af4; }

.deadline-chip--juin.deadline-chip--on       { background: #ffe4dd; }
.deadline-chip--septembre.deadline-chip--on  { background: #fff1d6; }
.deadline-chip--decembre.deadline-chip--on   { background: #e0f3ff; }
.deadline-chip--y2027.deadline-chip--on      { background: #f4f4fc; }

.deadline-chip--on {
  box-shadow: inset 0 0 0 1px currentColor;
}

/* ---- Audience multiselect chips ---- */

.audiences-field { margin-bottom: 0; }

.audience-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.25rem;
}

.audience-chip {
  font: inherit;
  font-size: 0.75rem;
  padding: 0.1875rem 0.625rem;
  border-radius: 999px;
  background: #fff;
  color: #555;
  border: 1px solid #ccc;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.audience-chip:hover { background: #f4f4fc; border-color: #6a6af4; color: #3a3a8c; }

.audience-chip--on,
.audience-chip--on:hover {
  background: #e3e3fd;
  color: #2a2a8c;
  border-color: #6a6af4;
  font-weight: 600;
}

.audiences-hint {
  margin: 0.375rem 0 0;
  color: var(--text-mention-grey, #666);
  font-style: italic;
}

/* ---- Blocks section ---- */

.blocks-section {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

.blocks-section > .fr-h6 { margin: 0 0 0.75rem; }

.blocks-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.block-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem;
  align-items: start;
  padding: 0.5rem 0.625rem;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  position: relative;
}

.block-card--dragging { opacity: 0.4; }

.block-card--over-before { box-shadow: 0 -2px 0 0 var(--selected-border, #6a6af4); }
.block-card--over-after  { box-shadow: 0 2px 0 0 var(--selected-border, #6a6af4); }

.block-card__handle {
  cursor: grab;
  color: #999;
  font-size: 1rem;
  line-height: 1.2;
  padding: 0.25rem 0;
  user-select: none;
}

.block-card__handle:active { cursor: grabbing; }

.block-card__fields {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}

.block-card__title {
  font-weight: 600;
}

.block-card__desc {
  resize: vertical;
  min-height: 2.5rem;
}

.block-card__delete {
  align-self: start;
}

.blocks-add {
  margin-top: 0.25rem;
}

/* ---- Improvements (roadmap-feeding blocks) ---- */

.improvements-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.improvement-card {
  background: #fbfaff;
  border-left: 3px solid #6a6af4;
}

.improvement-card__deadline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.125rem;
}

.improvement-card__deadline .deadline-chip {
  font-size: 0.6875rem;
  padding: 0.0625rem 0.5rem;
}

.improvements-add {
  margin-top: 0.25rem;
}

/* ---- Panel actions at the bottom ---- */

.panel-actions--bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

/* =========================================================================
   Maquette interactive (page maquette.html)
   ========================================================================= */

/* Navbar du prototype : un bouton par entrée, panneau qui se superpose --- */

.maquette-nav {
  margin: 0 0 1rem;
  background: #fff;
  border-bottom: 1px solid var(--border-soft);
  position: relative;
  z-index: 50;
}

.maquette-nav__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
}

.maquette-nav__item {
  position: relative;
  display: block;
  margin: 0;
}

/* Un seul élément cliquable par entrée (button OU a) */
.maquette-nav__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: inherit;
  color: #161616;
  text-decoration: none;
  background: transparent;
  background-image: none;
  border: 0;
  border-bottom: 2px solid transparent;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.maquette-nav__btn:hover {
  color: #000091;
  background: #f4f4fc;
}

.maquette-nav__chev {
  font-size: 0.6875rem;
  color: inherit;
  opacity: 0.65;
  transition: transform 0.15s;
}

.maquette-nav__item.is-open > .maquette-nav__btn .maquette-nav__chev {
  transform: rotate(180deg);
  opacity: 1;
}

/* États : page courante, branche du chemin, menu ouvert */
.maquette-nav__item.is-on-path > .maquette-nav__btn {
  color: #000091;
  font-weight: 600;
}

.maquette-nav__item.is-current > .maquette-nav__btn,
.maquette-nav__btn[aria-current="page"] {
  color: #000091;
  font-weight: 700;
  border-bottom-color: #000091;
}

.maquette-nav__item.is-open > .maquette-nav__btn {
  background: #f4f4fc;
  color: #000091;
  border-bottom-color: #000091;
}

/* Panneau déroulant qui se superpose au contenu */
.maquette-megamenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  max-width: 460px;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-top: 2px solid #000091;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  z-index: 100;
  padding: 0;
}

.maquette-megamenu__inner {
  padding: 0.5rem 0;
  max-height: 70vh;
  overflow-y: auto;
}

.maquette-megamenu__head {
  display: block;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--border-soft);
  background: #f6f6f6;
  background-image: none;
  color: #000091;
  text-decoration: none;
  font-size: 0.875rem;
}

.maquette-megamenu__head:hover { background: #e3e3fd; }
.maquette-megamenu__head span { color: #666; font-weight: 400; font-size: 0.8125rem; }

.maquette-megamenu__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.maquette-megamenu__list > li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f0f0f0;
}

.maquette-megamenu__list > li:last-child { border-bottom: 0; }

.maquette-megamenu__link {
  flex: 1;
  display: block;
  padding: 0.5rem 1rem !important;
  font-weight: 400 !important;
  border-bottom: 0 !important;
  font-size: 0.875rem !important;
}

.maquette-megamenu__link[aria-current="page"] {
  background: #e3e3fd;
  color: #000091;
  font-weight: 600 !important;
}

.maquette-megamenu__count {
  font-size: 0.75rem;
  color: #888;
  padding-right: 1rem;
  white-space: nowrap;
}

.maquette-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-soft);
}

.maquette-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
}

.maquette-crumbs__link {
  background: transparent;
  background-image: none;
  color: #3a3a8c;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.maquette-crumbs__link:hover { color: #000091; }
.maquette-crumbs__sep { color: #888; }
.maquette-crumbs__current { font-weight: 600; color: #161616; }

.maquette-status {
  font-size: 0.8125rem;
  color: #666;
  min-height: 1.25em;
}

.maquette-status--saving { color: #b34000; }
.maquette-status--saved  { color: #18753c; }
.maquette-status--error  { color: #ce0500; font-weight: 600; }

/* La page mockée -------------------------------------------------------- */

.maquette-page {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 2rem;
  min-height: 50vh;
}

.maquette-page__head { margin-bottom: 1.5rem; }

.maquette-page__type {
  display: inline-block;
  margin-bottom: 0.75rem;
}

.maquette-page__title {
  margin: 0 0 0.75rem;
  color: #161616;
}

.maquette-page__chapo {
  font-size: 1.0625rem;
  line-height: 1.5;
  color: #3a3a3a;
  margin: 0 0 1rem;
}

.maquette-page__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.75rem;
}

.maquette-tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 3px;
  background: #eee;
  color: #555;
  border: 1px solid #ddd;
}

.maquette-tag.tag-univers { background: #fceeac; border-color: #e6c33d; color: #5b4400; }
.maquette-tag.tag-cible   { background: #e3e3fd; border-color: #6a6af4; color: #2a2a8a; }
.maquette-tag.tag-mesure  { background: #b8fec9; border-color: #1f8d49; color: #0e5728; }

.maquette-page__ext {
  background: #f4f4fc;
  padding: 0.625rem 0.875rem;
  border-radius: 4px;
  border-left: 3px solid #6a6af4;
  margin-bottom: 1.5rem;
}

/* Badges Drupal type ---------------------------------------------------- */

.drupal-type {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.625rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: #eee;
  color: #555;
}

.drupal-type--accueil      { background: #fff5cc; color: #8a6700; }
.drupal-type--rubrique     { background: #d3fde7; color: #0e5728; }
.drupal-type--article      { background: #e3e3fd; color: #2a2a8a; }
.drupal-type--page-neutre  { background: #eee; color: #555; }
.drupal-type--webform      { background: #ffe9d9; color: #8c3d00; }
.drupal-type--hors-sfd     { background: #fee; color: #ce0500; border: 1px dashed #ce0500; }

/* Paragraphes mockés ---------------------------------------------------- */

.maquette-page__paragraphs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.paragraph-preview {
  background: #fafafa;
  border: 1px dashed #ccc;
  border-radius: 4px;
  padding: 0.875rem 1rem;
}

.paragraph-preview__head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.625rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dotted #ccc;
}

.paragraph-preview__tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.paragraph-preview__hint {
  font-size: 0.75rem;
  color: #888;
  font-style: italic;
}

.paragraph-preview__body .placeholder {
  color: #999;
  font-style: italic;
  font-size: 0.875rem;
  margin: 0;
}

.paragraph-preview__body details {
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 0.375rem 0.625rem;
  margin: 0.25rem 0;
  background: #fff;
}

.paragraph-preview__body details summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9375rem;
}

.tabs-mock {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #ddd;
  margin-bottom: 0.5rem;
}

.tabs-mock__t {
  padding: 0.375rem 0.875rem;
  border: 1px solid #ddd;
  border-bottom: 0;
  background: #f0f0f0;
  font-size: 0.8125rem;
  border-radius: 3px 3px 0 0;
  margin-right: 2px;
}

.tabs-mock__t.is-active {
  background: #fff;
  font-weight: 600;
  border-bottom: 2px solid #fff;
  margin-bottom: -2px;
}

.cards-mock {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.cards-mock__c {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8125rem;
}

.cards-mock__c span { color: #888; font-size: 0.75rem; }

.summary-mock {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
}

.summary-mock li {
  padding: 0.25rem 0.5rem;
  border-left: 2px solid #6a6af4;
  margin-bottom: 0.125rem;
}

.highlight-mock {
  border-left: 4px solid #6a6af4;
  background: #f4f4fc;
  padding: 0.625rem 0.875rem;
  font-style: italic;
  font-size: 0.9375rem;
}

.callout-mock {
  background: #fff5cc;
  border: 1px solid #e6c33d;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
}

.image-text-mock {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0.75rem;
  align-items: start;
}

.image-text-mock__img {
  background: #ddd;
  height: 100px;
  display: grid;
  place-items: center;
  color: #888;
  font-size: 0.75rem;
  border-radius: 3px;
}

.quote-mock {
  border-left: 3px solid #ddd;
  padding-left: 0.875rem;
  font-style: italic;
  color: #555;
  font-size: 0.9375rem;
  margin: 0;
}

.table-mock {
  width: 100%;
  font-size: 0.8125rem;
  border-collapse: collapse;
}

.table-mock th, .table-mock td {
  border: 1px solid #ddd;
  padding: 0.375rem 0.625rem;
  text-align: left;
}

.table-mock th { background: #f0f0f0; }

.video-mock {
  background: #222;
  color: #fff;
  padding: 1.25rem;
  border-radius: 3px;
  text-align: center;
  font-size: 0.875rem;
}

.download-mock {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
}

.download-mock li {
  padding: 0.375rem 0;
  border-bottom: 1px dotted #ddd;
}

.download-mock li span { color: #999; font-size: 0.75rem; }

.code-mock {
  background: #fee;
  border: 1px dashed #ce0500;
  color: #ce0500;
  padding: 0.875rem 1rem;
  border-radius: 3px;
  font-size: 0.875rem;
}

/* Cartes vers les enfants (navigation) ---------------------------------- */

.maquette-children {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-soft);
}

.maquette-children__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.maquette-child {
  background: #fff;
  background-image: none;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 0.75rem 0.875rem;
  text-decoration: none;
  color: #161616;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.maquette-child:hover {
  border-color: #6a6af4;
  box-shadow: 0 2px 8px rgba(106, 106, 244, 0.15);
  transform: translateY(-1px);
}

.maquette-child__title {
  color: #000091;
  font-size: 0.9375rem;
}

.maquette-child__desc {
  color: #555;
  font-size: 0.8125rem;
  line-height: 1.35;
}

/* Panneau de propriétés ------------------------------------------------- */

.maquette-props .maquette-props__id {
  font-size: 0.8125rem;
  color: #666;
  margin: 0 0 1rem;
}

.maquette-props .maquette-props__id code {
  background: #f0f0f0;
  padding: 0.0625rem 0.375rem;
  border-radius: 2px;
  font-size: 0.8125rem;
}

.maquette-props__note {
  color: #b34000;
  margin-top: 0.75rem;
  margin-bottom: 0;
}

.chip-multi__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.375rem;
}

.chip {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 999px;
  padding: 0.25rem 0.625rem;
  font-size: 0.8125rem;
  cursor: pointer;
  color: #555;
  transition: all 0.12s;
}

.chip:hover { border-color: #6a6af4; color: #000091; }

.chip--on {
  background: #000091;
  border-color: #000091;
  color: #fff;
}

.chip--on:hover { color: #fff; background: #1212a0; }

@media (max-width: 991px) {
  .cards-mock { grid-template-columns: repeat(2, 1fr); }
  .maquette-page { padding: 1.25rem; }
  .panel-detail { position: static; }
}

/* Paragraphes : toolbar, drag-and-drop, ajout --------------------------- */

.paragraph-preview { position: relative; cursor: grab; }
.paragraph-preview.is-dragging { opacity: 0.45; cursor: grabbing; }

.paragraph-preview.drop-before {
  box-shadow: 0 -3px 0 0 #000091 inset, 0 3px 0 0 #000091;
}
.paragraph-preview.drop-after {
  box-shadow: 0 3px 0 0 #000091 inset, 0 -3px 0 0 #000091;
}

.paragraph-preview__handle {
  display: inline-block;
  color: #aaa;
  cursor: grab;
  letter-spacing: -2px;
  margin-right: 0.25rem;
  user-select: none;
}

.paragraph-preview__tools {
  display: flex;
  gap: 0.125rem;
  margin-left: auto;
}

.paragraph-preview__btn {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 3px;
  width: 1.625rem;
  height: 1.625rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.875rem;
  color: #555;
  padding: 0;
  line-height: 1;
}

.paragraph-preview__btn:hover:not(:disabled) {
  background: #e3e3fd;
  border-color: #6a6af4;
  color: #000091;
}

.paragraph-preview__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.paragraph-add {
  margin-top: 0.25rem;
}

.paragraph-add__select {
  width: auto;
  max-width: 100%;
  font-size: 0.875rem;
  color: #555;
  border-style: dashed;
  background-color: #fafafa;
}

.maquette-props__hint {
  color: #888;
  font-style: italic;
  margin: 0 0 1.5rem;
  padding: 0.375rem 0.625rem;
  background: #f6f6f6;
  border-radius: 3px;
}

/* Paragraphes : titre/contenu personnalisés + mode édition --------------- */

.paragraph-preview__custom-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #161616;
  margin: 0.25rem 0 0.625rem;
}

.paragraph-preview__body.paragraph-preview__custom {
  font-size: 0.9375rem;
  color: #1d1d1d;
  line-height: 1.5;
  background: #fff;
  border-left: 3px solid #6a6af4;
  padding: 0.625rem 0.875rem;
  border-radius: 0 3px 3px 0;
}

.paragraph-preview.is-editing {
  background: #fff;
  border: 2px solid #6a6af4;
  border-style: solid;
  cursor: default;
}

.paragraph-preview__edit {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.paragraph-preview__edit .fr-label {
  font-size: 0.8125rem;
  margin-bottom: 0.125rem;
}

.paragraph-preview__edit .fr-input {
  font-size: 0.875rem;
}

.paragraph-preview__edit-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* Bouton ✎ identique aux autres tools */
.paragraph-preview__btn[title^="Personnaliser"] { font-size: 0.8125rem; }

/* Actions du panneau de propriétés (export, reset) ---------------------- */

.maquette-props__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

/* Bloc "Propriétés Drupal" dans la vue Arborescence --------------------- */

.maquette-section__row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.5rem;
  padding: 0.25rem 0;
  font-size: 0.875rem;
  align-items: baseline;
}

.maquette-section__label {
  color: #666;
  font-weight: 500;
}

.maquette-section__value {
  color: #161616;
  word-break: break-word;
}

.maquette-section__chip {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.0625rem 0.375rem;
  background: #f4f4fc;
  color: #2a2a8a;
  border: 1px solid #d3d3f5;
  border-radius: 2px;
  margin: 0.125rem 0.125rem 0.125rem 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Éditeur structuré de paragraphe ---------------------------------------- */

.paragraph-preview__edit .fr-input-group { margin: 0; }
.paragraph-preview__edit .items-editor__field { margin-top: 0.5rem; }

.items-editor {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dotted #ccc;
}

.items-editor__card {
  background: #f6f6f6;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 0.5rem 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.items-editor__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: #555;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.items-editor__num { color: #6a6af4; }

.items-editor__tools {
  display: flex;
  gap: 0.125rem;
}

.items-editor__add {
  align-self: flex-start;
}

/* Project picker (page d'accueil) -------------------------------------- */

.project-card {
  display: block;
  background: #fff;
  background-image: none;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  text-decoration: none;
  color: #161616;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.project-card:hover {
  border-color: #6a6af4;
  box-shadow: 0 2px 8px rgba(106, 106, 244, 0.15);
  transform: translateY(-1px);
}

.project-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-card__name {
  font-size: 1.0625rem;
  color: #000091;
}

.project-card__slug {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem;
  color: #666;
}

.project-card__desc {
  margin: 0.5rem 0 0;
  color: #555;
  font-size: 0.9375rem;
}

.project-card__meta {
  margin-top: 0.5rem;
  display: flex;
  gap: 1.25rem;
  font-size: 0.75rem;
  color: #888;
}

.project-card--with-actions {
  position: relative;
  padding-right: 10.5rem; /* place pour les boutons Exporter + Supprimer */
}

.project-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
  background-image: none;
}

.project-card__actions {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: stretch;
}

.project-card__delete {
  color: #ce0500;
}

.project-card__delete:hover {
  background-color: #ffeaea;
  color: #ce0500;
}

/* Dialog de suppression */

.delete-dialog {
  max-width: 32rem;
  border: 0;
  border-radius: 4px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

.delete-dialog::backdrop {
  background: rgba(22, 22, 22, 0.55);
}

.delete-dialog__title {
  margin-bottom: 1rem;
  color: #161616;
}

.delete-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.delete-dialog__confirm {
  background-color: #ce0500;
  color: #fff;
}

.delete-dialog__confirm:hover:not(:disabled) {
  background-color: #a30400;
  color: #fff;
}

.delete-dialog__confirm:disabled {
  background-color: #e5e5e5;
  color: #929292;
  cursor: not-allowed;
}

/* Project switcher dans le header --------------------------------------- */

.project-switcher {
  display: inline-flex;
  align-items: center;
  margin-right: 0.5rem;
}

.project-switcher__select {
  font-size: 0.8125rem;
  padding: 0.25rem 1.5rem 0.25rem 0.5rem;
  height: auto;
  min-width: 12rem;
}

/* ---- Page Structure Drupal ---- */

.sd-panel {
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
}

.sd-panel__hint {
  color: var(--text-mention-grey, #666);
  margin-bottom: 1rem;
}

.sd-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.sd-row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.sd-row .fr-input {
  flex: 1 1 auto;
}

.sd-add {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.5rem;
}

.sd-add .fr-input {
  flex: 1 1 auto;
}

.sd-icon-btn {
  min-width: 2rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  font-weight: 600;
}

/* Paragraphes */

.sd-paragraph-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sd-paragraph-row {
  display: grid;
  grid-template-columns: auto 9rem 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.35rem 0.5rem;
  border-radius: 0.25rem;
}

.sd-paragraph-row:hover {
  background: #f6f6f6;
}

.sd-paragraph-row input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
}

.sd-paragraph-code {
  font-size: 0.8125rem;
  color: #555;
  background: #f0f0f0;
  padding: 0.1rem 0.35rem;
  border-radius: 0.2rem;
}

.sd-paragraph-label {
  max-width: 18rem;
}

.sd-paragraph-hint {
  font-size: 0.8125rem;
  color: var(--text-mention-grey, #666);
  font-style: italic;
}

/* Taxonomies */

.sd-taxo-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.sd-taxo {
  border: 1px solid #ddd;
  border-radius: 0.35rem;
  padding: 0.85rem 1rem;
  background: #fafafa;
}

.sd-taxo__header {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.sd-taxo__key {
  font-size: 0.8125rem;
  background: #e8e8e8;
  padding: 0.15rem 0.4rem;
  border-radius: 0.2rem;
  flex-shrink: 0;
}

.sd-taxo__label {
  flex: 1 1 12rem;
  max-width: 18rem;
}

.sd-taxo__multi {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: #444;
  user-select: none;
  white-space: nowrap;
}

.sd-taxo__opts-label {
  font-size: 0.8125rem;
  font-weight: 600;
  margin: 0.25rem 0 0.35rem;
  color: #555;
}

.sd-taxo__opts {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}
