/* Léger lissage CKEditor 5 dans le contexte extranet */
.ck.ck-editor {
  border-radius: 8px;
  overflow: hidden;
}
.ck.ck-toolbar {
  background: var(--gip-bleu-soft) !important;
  border: 1px solid var(--topbar-border) !important;
  border-bottom: none !important;
  border-radius: 8px 8px 0 0;
}
.ck.ck-content {
  border: 1px solid var(--topbar-border) !important;
  border-radius: 0 0 8px 8px;
  min-height: 240px;
  font: inherit;
  color: var(--main-fg);
}
.ck.ck-content:focus {
  border-color: var(--accent-blue) !important;
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.12);
}

/* =========================================================
   Restaure une typographie lisible dans le contenu CKEditor.
   reset-min.css applique des resets globaux (li {list-style:none},
   h1-h6 {font-size:100%, font-weight:normal}, etc.) qui rendent
   le contenu illisible sans scoping ici.
   ========================================================= */
.ck.ck-content { line-height: 1.5; padding: 14px 18px !important; }
.ck.ck-content p { margin: 0 0 12px; }
.ck.ck-content p:last-child { margin-bottom: 0; }

.ck.ck-content h2,
.ck.ck-content h3,
.ck.ck-content h4 {
  margin: 20px 0 8px;
  font-weight: 700;
  color: var(--main-fg);
  line-height: 1.3;
}
.ck.ck-content h2 { font-size: 22px; }
.ck.ck-content h3 { font-size: 18px; }
.ck.ck-content h4 { font-size: 16px; }
.ck.ck-content h2:first-child,
.ck.ck-content h3:first-child,
.ck.ck-content h4:first-child { margin-top: 0; }

.ck.ck-content ul,
.ck.ck-content ol {
  margin: 0 0 12px;
  padding-left: 24px;
}
.ck.ck-content ul { list-style: disc; }
.ck.ck-content ol { list-style: decimal; }
.ck.ck-content li { list-style: inherit; margin: 4px 0; }
.ck.ck-content ul ul { list-style: circle; margin-bottom: 0; }
.ck.ck-content ol ol { list-style: lower-alpha; margin-bottom: 0; }

.ck.ck-content strong,
.ck.ck-content b { font-weight: 700; }
.ck.ck-content em,
.ck.ck-content i { font-style: italic; }
.ck.ck-content u { text-decoration: underline; }

.ck.ck-content a {
  color: var(--accent-blue);
  text-decoration: underline;
}

.ck.ck-content blockquote {
  margin: 12px 0;
  padding: 8px 16px;
  border-left: 3px solid var(--gip-red);
  background: var(--gip-bleu-soft);
  color: var(--main-fg);
  font-style: italic;
}
