body { background: #f6f7f9; }
.card, .list-group { border: 0; }
.note-content, .section-preview { white-space: pre-wrap; }
.timeline { border-left: 3px solid #dee2e6; padding-left: 1.25rem; }
.section-preview { max-height: 13rem; overflow: auto; border-left: 3px solid #dee2e6; padding-left: 1rem; color: #495057; }
.imported-report { overflow-x: auto; line-height: 1.55; }
.imported-report h1 { font-size: 1.8rem; margin-top: 1rem; }
.imported-report h2 { font-size: 1.45rem; margin-top: 1.25rem; }
.imported-report h3 { font-size: 1.2rem; margin-top: 1rem; }
.imported-report table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.imported-report th, .imported-report td { border: 1px solid #ced4da; padding: .5rem .65rem; vertical-align: top; }
.imported-report blockquote { border-left: 4px solid #ced4da; padding-left: 1rem; color: #6c757d; }
.imported-report pre { white-space: pre-wrap; word-break: break-word; margin-bottom: 0; font-family: inherit; }
.import-section { border-left: 4px solid #0d6efd; }
summary.btn { display: inline-block; list-style: none; cursor: pointer; }
summary.btn::-webkit-details-marker { display: none; }
@media (max-width: 767.98px) {
  .navbar .container { align-items: flex-start; }
  .imported-report { padding: 1rem !important; }
}
.meta-box { background: #f8f9fa; border: 1px solid #e9ecef; border-radius: .5rem; padding: .65rem .8rem; height: 100%; }
.meta-label { font-size: .75rem; color: #6c757d; text-transform: uppercase; letter-spacing: .03em; margin-bottom: .15rem; }
.trello-preview-table { max-height: 28rem; overflow: auto; }
.trello-preview-table thead th { position: sticky; top: 0; background: #fff; z-index: 1; }

/* Saisie structurée PR / PC / PI */
.category-choice .btn { border-radius: 999px; }
.cr-category-editor { border: 1px solid #e2e5e9; border-radius: .75rem; padding: 1rem; background: #fbfcfd; }
.category-heading { max-width: 900px; }
.rich-editor-shell { border: 1px solid #cfd5dc; border-radius: .65rem; overflow: hidden; background: #fff; }
.rich-toolbar { display: flex; gap: .25rem; flex-wrap: wrap; align-items: center; padding: .45rem .55rem; border-bottom: 1px solid #e1e5ea; background: #f7f8fa; }
.rich-tool { border: 1px solid transparent; background: transparent; border-radius: .35rem; padding: .25rem .5rem; font-size: .875rem; }
.rich-tool:hover { background: #fff; border-color: #ced4da; }
.rich-hint { margin-left: auto; font-size: .75rem; color: #6c757d; }
.rich-editor { min-height: 150px; padding: .85rem 1rem; outline: none; line-height: 1.5; overflow-x: auto; }
.rich-editor:empty::before { content: attr(data-placeholder); color: #98a2ad; pointer-events: none; }
.rich-editor.drag-over { box-shadow: inset 0 0 0 3px rgba(13,110,253,.25); background: #f7fbff; }
.rich-editor img, .rich-content img { display: block; max-width: 100%; height: auto; border-radius: .35rem; margin: .65rem 0; }
.rich-editor figure, .rich-content figure { margin: .75rem 0 1rem; }
.rich-editor figcaption, .rich-content figcaption { color: #6c757d; font-size: .8rem; margin-top: .25rem; }
.rich-editor table, .rich-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: .75rem 0; }
.rich-editor td, .rich-editor th, .rich-content td, .rich-content th { border: 1px solid #ced4da; padding: .4rem .55rem; }
.cr-read-section { border-left: 4px solid #dee2e6; padding: .15rem 0 .15rem 1rem; }
.cr-read-recurrent { border-left-color: #0d6efd; }
.cr-read-current { border-left-color: #fd7e14; }
.cr-read-info { border-left-color: #6f42c1; }
.cr-read-title { font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .025em; margin-bottom: .65rem; }
.rich-content { line-height: 1.55; overflow-wrap: anywhere; }
.rich-content p:last-child, .rich-content div:last-child { margin-bottom: 0; }
.rich-content section[data-cr-category] > h4 { display: none; }
.sticky-save { position: sticky; bottom: 0; background: linear-gradient(to top, #f6f7f9 70%, rgba(246,247,249,0)); z-index: 4; }
@media (max-width: 767.98px) {
  .rich-hint { width: 100%; margin-left: 0; }
  .rich-editor { min-height: 130px; }
}

/* Réunions et couleurs pastel des thématiques */
.meeting-group-inactive { opacity: .72; background: #f1f3f5; }
.meeting-summary-card { border: 1px solid #e5e7eb; }
.meeting-badge { background: rgba(255,255,255,.72); color: #343a40; border: 1px solid rgba(0,0,0,.08); }
.theme-list { overflow: hidden; }
.theme-list-item { border-bottom: 1px solid rgba(0,0,0,.08) !important; }
.theme-list-item:last-child { border-bottom: 0 !important; }
.theme-list-main { min-width: 0; flex: 1 1 320px; }
.theme-colored-card { border: 1px solid rgba(0,0,0,.07); }
.theme-colored-card .card-body { background: transparent; }
.theme-edit-card { border: 1px solid rgba(0,0,0,.08); }
.dashboard-theme-list .list-group-item { border: 1px solid rgba(0,0,0,.06); }

.pastel-picker { display: flex; flex-wrap: wrap; gap: .55rem; }
.pastel-choice { position: relative; cursor: pointer; margin: 0; }
.pastel-choice input { position: absolute; opacity: 0; pointer-events: none; }
.pastel-swatch {
  display: block;
  width: 2rem;
  height: 2rem;
  border-radius: .55rem;
  border: 2px solid rgba(0,0,0,.10);
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.pastel-choice:hover .pastel-swatch { transform: translateY(-1px); }
.pastel-choice input:focus-visible + .pastel-swatch,
.pastel-choice input:checked + .pastel-swatch {
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13,110,253,.20);
  transform: scale(1.08);
}
.theme-state-tabs .nav-link { color: #495057; }
.theme-state-tabs .nav-link.active { font-weight: 600; }

@media (max-width: 767.98px) {
  .pastel-swatch { width: 2.25rem; height: 2.25rem; }
}

/* Authentification, permissions et archivage */
.user-chip { white-space: nowrap; }
.archived-row { opacity: .72; }
.theme-readonly-card { box-shadow: inset 4px 0 0 rgba(108,117,125,.35), 0 .125rem .25rem rgba(0,0,0,.075) !important; }
.permission-group { border: 1px solid #e1e5ea; overflow: hidden; }
.permission-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: #6c757d; background: #f8f9fa; }
.permission-table td, .permission-table th { padding: .75rem 1rem; }
.theme-dot { width: 1rem; height: 1rem; display: inline-block; vertical-align: -.12rem; border-radius: .3rem; border: 1px solid rgba(0,0,0,.12); margin-right: .4rem; }
.permission-rule { border: 1px solid #dee2e6; border-radius: .5rem; padding: .5rem .65rem; background: #f8f9fa; text-align: center; }
.permission-arrow { text-align: center; color: #6c757d; line-height: 1.2; padding: .15rem 0; }
.lock-banner { border-left: 4px solid #212529; }

@media (max-width: 991.98px) {
  .permission-table td, .permission-table th { padding: .6rem .65rem; }
}

/* Indentation dans les rubriques
   Sur une liste, indenter cree une sous-liste imbriquee, rendue par le
   navigateur. Sur un paragraphe, le navigateur produit un <blockquote> dont
   l'attribut de style est retire au nettoyage HTML : sans ces regles, le
   retrait serait perdu a l'affichage. */
.rich-editor blockquote, .rich-content blockquote {
  margin: 0 0 0 1.5rem;
  padding-left: .75rem;
  border-left: 2px solid #e9ecef;
}
.rich-editor ul ul, .rich-editor ol ol,
.rich-editor ul ol, .rich-editor ol ul,
.rich-content ul ul, .rich-content ol ol,
.rich-content ul ol, .rich-content ol ul { margin-bottom: 0; }
.rich-editor li, .rich-content li { margin-bottom: .15rem; }

/* Résumé de projet dans un « Point en Cours »
   Deux lignes, visuellement distinctes du texte courant sans l'écraser. Le
   curseur ne change qu'une fois le bloc rendu ouvrable, c'est-à-dire sur le
   compte rendu le plus récent : ailleurs, ce n'est plus qu'un texte figé. */
.projet-resume {
  border-left: 3px solid #0d6efd;
  background: rgba(13,110,253,.04);
  border-radius: .35rem;
  padding: .45rem .65rem;
  margin: .5rem 0;
}
.projet-resume-ouvrable { cursor: pointer; }
.projet-resume-ouvrable:hover, .projet-resume-ouvrable:focus-visible {
  background: rgba(13,110,253,.10);
  outline: none;
}
.projet-resume-ouvrable::after {
  content: ' ⌕';
  color: #0d6efd;
  font-size: .85em;
}

/* Dans l'editeur, le resume est un bloc non modifiable : le format standard et
   la limite de deux lignes sont ainsi garantis, et le clic ouvre le projet sans
   que le curseur vienne se placer dans le texte. */
.rich-editor .projet-resume {
  cursor: pointer;
  position: relative;
  padding-right: 2rem;
  user-select: none;
}
.rich-editor .projet-resume:hover { background: rgba(13,110,253,.10); }
.projet-resume-retirer {
  position: absolute;
  top: .25rem;
  right: .35rem;
  border: 0;
  background: transparent;
  color: #6c757d;
  line-height: 1;
  padding: .15rem .3rem;
  border-radius: .25rem;
  opacity: 0;
  transition: opacity .12s ease;
}
.rich-editor .projet-resume:hover .projet-resume-retirer { opacity: 1; }
.projet-resume-retirer:hover { background: rgba(0,0,0,.08); color: #842029; }
.rich-tool-projet { color: #0d6efd; font-weight: 600; }

.dialogue-projet {
  width: min(38rem, 92vw);
  border: 0;
  border-radius: .75rem;
  padding: 0;
  box-shadow: 0 1rem 3rem rgba(0,0,0,.25);
}
.dialogue-projet::backdrop { background: rgba(0,0,0,.4); }
.liste-choix-projet { max-height: 55vh; overflow-y: auto; }

/* Projets */
.projet-statut { font-weight: 600; }
.projet-statut-en_cours { background-color: #cfe2ff; color: #084298; }
.projet-statut-en_attente { background-color: #fff3cd; color: #664d03; }
.projet-statut-termine { background-color: #d1e7dd; color: #0f5132; }
.projet-avancement { height: .5rem; }
.projet-tache { border-bottom: 1px solid rgba(0,0,0,.06); }
.projet-tache:last-child { border-bottom: 0; }
.projet-tache-faite { text-decoration: line-through; color: #6c757d; }
.projet-coche { min-width: 2.25rem; font-weight: 700; line-height: 1.2; }
