/* === Onglets === */
.tab-btn {
  border-color: transparent;
  color: #64748b;
}
.tab-btn:hover {
  color: #0f172a;
  background: #f8fafc;
}
.tab-btn.active {
  border-color: #0f172a;
  color: #0f172a;
}

/* === Boutons === */
.btn-primary {
  background: #0f172a;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-primary:hover {
  background: #1e293b;
}

.btn-secondary {
  background: white;
  color: #0f172a;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  font-size: 0.875rem;
  border: 1px solid #cbd5e1;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-secondary:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.btn-danger {
  background: white;
  color: #b91c1c;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  font-size: 0.875rem;
  border: 1px solid #fecaca;
  transition: all 0.15s;
}
.btn-danger:hover {
  background: #fef2f2;
  border-color: #f87171;
}

/* === Layout onglet Questions avec menu latéral === */
.questions-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 1023px) {
  .questions-layout { grid-template-columns: 1fr; }
  #nav-menu { display: none; }
}

/* === Menu vertical sticky === */
#nav-menu {
  position: sticky;
  top: 4.5rem;
  max-height: calc(100vh - 5.5rem);
  overflow-y: auto;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.75rem 0;
  font-size: 0.8125rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
#nav-menu .nav-header {
  padding: 0 1rem 0.5rem;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0.375rem;
}
#nav-menu .nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
#nav-menu .nav-section {
  margin-bottom: 0.25rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #f1f5f9;
}
#nav-menu .nav-section:last-child { border-bottom: none; }
#nav-menu .nav-sec-link {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 1rem;
  color: #0f172a;
  font-weight: 600;
  text-decoration: none;
  border-left: 3px solid transparent;
  line-height: 1.3;
}
#nav-menu .nav-sec-link:hover { background: #f8fafc; }
#nav-menu .nav-sec-num { color: #64748b; font-variant-numeric: tabular-nums; }
#nav-menu .nav-sec-title { flex: 1; }

#nav-menu .nav-tone-critical .nav-sec-link { border-left-color: #dc2626; }
#nav-menu .nav-tone-success  .nav-sec-link { border-left-color: #10b981; }
#nav-menu .nav-tone-warning  .nav-sec-link { border-left-color: #f59e0b; }
#nav-menu .nav-tone-info     .nav-sec-link { border-left-color: #3b82f6; }

#nav-menu .nav-cats {
  list-style: none;
  padding: 0;
  margin: 0;
}
#nav-menu .nav-cat-link {
  display: block;
  padding: 0.25rem 1rem 0.25rem 2rem;
  color: #475569;
  text-decoration: none;
  font-size: 0.75rem;
  border-left: 3px solid transparent;
  line-height: 1.3;
}
#nav-menu .nav-cat-link:hover { background: #f8fafc; color: #0f172a; }
#nav-menu .nav-cat-num { color: #94a3b8; font-weight: 600; font-variant-numeric: tabular-nums; }

#nav-menu a.active {
  background: #eff6ff;
  color: #1e40af;
  border-left-color: #3b82f6;
}
#nav-menu a.active .nav-cat-num,
#nav-menu a.active .nav-sec-num { color: #1e40af; }

/* Scroll fluide avec décalage pour header sticky */
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

/* === Sections / cartes de questions === */
.section-card {
  background: white;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.section-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}
.section-header.tone-success {
  background: linear-gradient(to right, #ecfdf5, white);
  border-left: 4px solid #10b981;
}
.section-header.tone-warning {
  background: linear-gradient(to right, #fffbeb, white);
  border-left: 4px solid #f59e0b;
}
.section-header.tone-info {
  background: linear-gradient(to right, #eff6ff, white);
  border-left: 4px solid #3b82f6;
}
.section-header.tone-critical {
  background: linear-gradient(to right, #fef2f2, white);
  border-left: 4px solid #dc2626;
}
.section-header.tone-critical h2 {
  color: #991b1b;
}

.badge-critical { background: #fee2e2; color: #991b1b; }

/* === Numérotation section + catégorie === */
.section-number {
  font-weight: 700;
  color: #0f172a;
  font-size: 1.125rem;
}
.section-header.tone-critical .section-number { color: #991b1b; }
.section-icon {
  font-size: 1.125rem;
  line-height: 1;
}

.category-block {
  border-top: 1px solid #f1f5f9;
}
.category-block:first-child { border-top: none; }
.category-header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem 0.25rem;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}
.category-number {
  font-weight: 600;
  color: #475569;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
.category-title {
  font-weight: 600;
  color: #334155;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* === Badge impact développement === */
.dev-impact-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.125rem 0.5rem;
  background: #ede9fe;
  color: #5b21b6;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: middle;
  border: 1px solid #ddd6fe;
}
.choice-option .dev-impact-badge {
  font-size: 0.6875rem;
  background: #f5f3ff;
  color: #6d28d9;
}
.choice-option-text {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex: 1;
}

.question-card {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}
.question-card:last-child { border-bottom: none; }
.question-card:hover { background: #fafafa; }

.question-card.fully-validated {
  background: #f0fdf4;
}

.question-card.disagreement {
  background: #fff7ed;
  border-left: 4px solid #f59e0b;
}
.question-card.disagreement.fully-validated {
  background: #f0fdf4;
  border-left: 4px solid #10b981;
}

.question-title {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.question-description {
  font-size: 0.875rem;
  color: #475569;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

/* === Champs de réponse === */
.response-area {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.response-textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
}
.response-textarea:focus {
  outline: none;
  border-color: #0f172a;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.1);
}

.choice-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.choice-option {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.15s;
}
.choice-option:hover {
  background: #f1f5f9;
}
.choice-option input[type="radio"] {
  margin-top: 0.25rem;
}
.choice-option.selected {
  background: #e0f2fe;
}

/* === Réponse de l'autre utilisateur (lecture seule) === */
.other-response {
  margin-top: 0.5rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.375rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 0.8125rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
}
.other-response.agree {
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.other-response.disagree {
  background: #fef3c7;
  border-color: #fcd34d;
}
.other-label {
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}
.other-value {
  color: #0f172a;
}
.other-value.multiline {
  width: 100%;
  white-space: pre-wrap;
  font-style: italic;
  color: #334155;
}
.other-badge {
  margin-left: auto;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: white;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
}
.other-response.agree .other-badge { color: #065f46; }
.other-response.disagree .other-badge { color: #92400e; }

/* === Zone justification (quand désaccord sur un choix) === */
.justification-area {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #fffbeb;
  border: 1px dashed #fcd34d;
  border-radius: 0.5rem;
}
.justification-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 0.375rem;
}
.justification-textarea {
  min-height: 60px;
  background: white;
}

.validation-boxes {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
  border-top: 1px dashed #e2e8f0;
}

.validation-box {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid #e2e8f0;
  transition: all 0.15s;
  background: white;
}
.validation-box:hover {
  border-color: #94a3b8;
}
.validation-box input[type="checkbox"]:checked + span {
  color: #059669;
  font-weight: 600;
}
.validation-box.checked {
  background: #ecfdf5;
  border-color: #10b981;
}

/* === Badges === */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-muted { background: #e2e8f0; color: #475569; }

/* === Barre de progression === */
.progress-wrapper {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(to right, #10b981, #059669);
  transition: width 0.4s ease;
}

/* === Phase (planning) === */
.phase-card {
  background: white;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.phase-header {
  padding: 1rem 1.5rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
}
.phase-header:hover { background: #f1f5f9; }
.phase-title { font-weight: 600; color: #0f172a; }
.phase-subtitle { font-size: 0.75rem; color: #64748b; margin-top: 0.125rem; }

.phase-progress-compact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: #475569;
  white-space: nowrap;
}
.phase-progress-compact .progress-wrapper {
  width: 100px;
  height: 6px;
}

.task-row {
  display: flex;
  gap: 1rem;
  padding: 0.875rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  align-items: flex-start;
  transition: background 0.15s;
}
.task-row:last-child { border-bottom: none; }
.task-row:hover { background: #fafafa; }
.task-row.done { background: #f0fdf4; }
.task-row.in_progress { background: #fffbeb; }
.task-row.blocked { background: #fef2f2; }

.task-status-select {
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  border: 1px solid #cbd5e1;
  min-width: 130px;
}

.task-content { flex: 1; }
.task-title {
  font-weight: 500;
  color: #0f172a;
  font-size: 0.9375rem;
}
.task-description {
  font-size: 0.8125rem;
  color: #64748b;
  margin-top: 0.125rem;
}
.task-notes {
  margin-top: 0.5rem;
  width: 100%;
  padding: 0.375rem 0.625rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  font-size: 0.8125rem;
  font-family: inherit;
  background: #fafafa;
  resize: vertical;
  min-height: 32px;
}
.task-notes:focus {
  outline: none;
  background: white;
  border-color: #94a3b8;
}

.task-done-date {
  font-size: 0.75rem;
  color: #059669;
  margin-top: 0.25rem;
}

/* === Questions personnalisées === */
.question-card.is-custom {
  background: linear-gradient(to right, #faf5ff, white);
  border-left: 3px solid #a855f7;
}
.custom-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: #f3e8ff;
  color: #6b21a8;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  border: 1px solid #e9d5ff;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.icon-btn {
  background: transparent;
  border: none;
  padding: 0.125rem 0.375rem;
  cursor: pointer;
  font-size: 0.875rem;
  border-radius: 0.25rem;
  color: #64748b;
  transition: all 0.15s;
}
.icon-btn:hover { background: #f1f5f9; color: #0f172a; }

/* Bouton "Ajouter une question" dans header catégorie */
.category-header .add-question-btn {
  margin-left: auto;
  padding: 0.25rem 0.625rem;
  background: white;
  border: 1px dashed #94a3b8;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s;
}
.category-header .add-question-btn:hover {
  background: #f1f5f9;
  border-color: #0f172a;
  color: #0f172a;
}

/* Formulaire ajout question */
.add-question-form {
  margin: 0.75rem 1.5rem 1rem;
  padding: 1rem;
  background: #fefce8;
  border: 1px dashed #facc15;
  border-radius: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.add-question-form input.aq-title,
.add-question-form textarea.aq-description {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-family: inherit;
}
.add-question-form textarea.aq-description { resize: vertical; min-height: 50px; }
.add-question-form .aq-type-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: #475569;
}
.add-question-form .aq-type-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
}
.add-question-form .aq-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* === Remarques === */
.remarks-area {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #e2e8f0;
}
.remarks-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.remark-item {
  padding: 0.625rem 0.875rem;
  border-radius: 0.375rem;
  border-left: 3px solid #94a3b8;
  background: #f8fafc;
  font-size: 0.8125rem;
}
.remark-item.rem-idea       { background: #f0f9ff; border-left-color: #0284c7; }
.remark-item.rem-normal     { background: #f8fafc; border-left-color: #64748b; }
.remark-item.rem-important  { background: #fffbeb; border-left-color: #f59e0b; }
.remark-item.rem-critical   { background: #fef2f2; border-left-color: #dc2626; }

.remark-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.75rem;
  color: #475569;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}
.remark-importance { font-weight: 700; color: #0f172a; }
.remark-author     { font-weight: 600; }
.remark-date       { color: #94a3b8; font-size: 0.7rem; }
.remark-delete     { margin-left: auto; font-size: 0.75rem; }
.remark-text {
  color: #0f172a;
  line-height: 1.5;
  white-space: pre-wrap;
}

.remark-form-details summary {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #f1f5f9;
  border-radius: 9999px;
  cursor: pointer;
  font-size: 0.75rem;
  color: #475569;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  transition: all 0.15s;
  list-style: none;
}
.remark-form-details summary::-webkit-details-marker { display: none; }
.remark-form-details summary:hover { background: #e2e8f0; color: #0f172a; }
.remark-form-details[open] summary { background: #0f172a; color: white; border-color: #0f172a; }

.remark-form {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.remark-form-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.remark-form-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
}
.remark-form select.remark-importance-select {
  padding: 0.25rem 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
}
.remark-textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
}
.remark-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* === Indicateur de synchronisation === */
#sync-status {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.7rem;
  background: #e2e8f0;
  color: #475569;
}
#sync-status[data-status="ok"]       { background: #d1fae5; color: #065f46; }
#sync-status[data-status="pending"]  { background: #fef3c7; color: #92400e; }
#sync-status[data-status="loading"]  { background: #dbeafe; color: #1e40af; }
#sync-status[data-status="error"]    { background: #fee2e2; color: #991b1b; }
#sync-status[data-status="offline"]  { background: #fef3c7; color: #92400e; }
#sync-status[data-status="conflict"] { background: #fed7aa; color: #9a3412; }

/* === Onglet "Schéma fonctionnel" === */
.scheme-intro {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.scheme-intro h2 { font-size: 1.25rem; font-weight: 700; color: #0f172a; margin-bottom: 0.5rem; }
.scheme-intro p { color: #475569; font-size: 0.9rem; line-height: 1.6; }
.scheme-note { margin-top: 0.75rem !important; padding: 0.75rem 1rem; background: #fffbeb; border-left: 4px solid #f59e0b; border-radius: 0.375rem; color: #78350f !important; font-size: 0.875rem !important; }

.scheme-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 2rem 0 1rem;
  padding-left: 0.75rem;
  border-left: 4px solid #0f172a;
}

/* 1. Acteurs */
.actors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.actor-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1.25rem;
  border-top: 4px solid #64748b;
}
.actor-ml { border-top-color: #7c3aed; }
.actor-ce { border-top-color: #059669; }
.actor-beneficiary { border-top-color: #0284c7; }
.actor-supplier { border-top-color: #f59e0b; }

.actor-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}
.actor-icon { font-size: 2rem; line-height: 1; }
.actor-title { font-weight: 700; color: #0f172a; font-size: 1rem; }
.actor-sub { font-size: 0.75rem; color: #64748b; }
.actor-card ul { list-style: disc; padding-left: 1.25rem; color: #334155; font-size: 0.875rem; line-height: 1.6; }

/* 2. Flux de vie */
.flow-chain {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}
.flow-step {
  flex: 1 0 180px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.875rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.flow-num {
  flex-shrink: 0;
  width: 1.75rem; height: 1.75rem;
  background: #0f172a;
  color: white;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}
.flow-title { font-weight: 600; color: #0f172a; font-size: 0.875rem; margin-bottom: 0.125rem; }
.flow-desc { font-size: 0.75rem; color: #64748b; line-height: 1.4; }
.flow-arrow {
  flex-shrink: 0;
  align-self: center;
  font-size: 1.25rem;
  color: #94a3b8;
  font-weight: 700;
}
@media (max-width: 900px) {
  .flow-chain { flex-direction: column; }
  .flow-arrow { align-self: flex-start; transform: rotate(90deg); }
}

/* 3. Arborescence par espace */
.tree-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}
.tree-col {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
}
.tree-header {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}
.tree-ml .tree-header { border-bottom-color: #ddd6fe; }
.tree-ce .tree-header { border-bottom-color: #a7f3d0; }
.tree-beneficiary .tree-header { border-bottom-color: #bae6fd; }
.tree-supplier .tree-header { border-bottom-color: #fde68a; }
.tree-list, .tree-list ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.tree-list > li {
  padding: 0.25rem 0 0.25rem 1rem;
  position: relative;
  color: #0f172a;
  font-size: 0.875rem;
}
.tree-list > li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: #94a3b8;
  font-weight: 700;
}
.tree-list ul {
  padding-left: 1rem;
  margin-top: 0.25rem;
}
.tree-list ul li {
  padding: 0.125rem 0 0.125rem 0.75rem;
  position: relative;
  color: #475569;
  font-size: 0.8125rem;
}
.tree-list ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #cbd5e1;
}

/* 4. Composants transverses */
.components-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
}
.component-chip {
  background: white;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #0f172a;
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.component-chip strong { color: #0f172a; font-size: 0.875rem; }
.component-chip span { color: #64748b; font-size: 0.75rem; line-height: 1.4; }

/* 5. Architecture technique */
.arch-diagram {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}
.arch-layer {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  width: 100%;
  max-width: 900px;
}
.arch-client { border-top: 4px solid #0284c7; }
.arch-app    { border-top: 4px solid #dc2626; }
.arch-infra  { border-top: 4px solid #7c3aed; }
.arch-layer-label {
  font-weight: 700;
  font-size: 0.8125rem;
  color: #0f172a;
  margin-bottom: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.arch-blocks {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.arch-block {
  flex: 1 1 160px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  padding: 0.625rem 0.75rem;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0f172a;
}
.arch-block small {
  display: block;
  font-weight: 400;
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 0.25rem;
}
.arch-block.arch-db  { background: #ede9fe; border-color: #ddd6fe; }
.arch-block.arch-ext { background: #fef3c7; border-color: #fde68a; }
.arch-separator {
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* === Toast === */
.toast {
  padding: 0.75rem 1rem;
  background: #0f172a;
  color: white;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  min-width: 240px;
  animation: slideIn 0.2s ease-out;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}
.toast.success { background: #059669; }
.toast.error { background: #dc2626; }
@keyframes slideIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* === Utilitaires === */
.hidden { display: none !important; }
details > summary { cursor: pointer; user-select: none; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] .chevron { transform: rotate(90deg); }
.chevron { transition: transform 0.2s; display: inline-block; }

/* === Nav menu : état fully-validated (les deux ont validé) === */
#nav-menu .nav-cat-link.fully-validated {
  background: #ecfdf5;
  color: #065f46;
  border-left-color: #10b981;
  font-weight: 500;
}
#nav-menu .nav-cat-link.fully-validated:hover {
  background: #d1fae5;
  color: #064e3b;
}
#nav-menu .nav-cat-link.fully-validated .nav-cat-num {
  color: #10b981;
}
#nav-menu .nav-section.fully-validated > .nav-sec-link {
  background: #ecfdf5;
  color: #065f46;
  border-left-color: #059669;
}
#nav-menu .nav-section.fully-validated > .nav-sec-link:hover {
  background: #d1fae5;
}
#nav-menu .nav-section.fully-validated > .nav-sec-link .nav-sec-num {
  color: #059669;
}
#nav-menu .nav-check {
  color: #059669;
  font-weight: 700;
  margin-left: 0.25rem;
}
#nav-menu .nav-cat-link.fully-validated .nav-check {
  color: #10b981;
  margin-right: 0.25rem;
  margin-left: 0;
}
