/* ==========================================================================
   SIMPLE Core — éditeur de texte mis en forme et texte affiché (.sphf-prose)
   Commun à toutes les extensions de la famille : mêmes outils, même apparence.
   Les couleurs viennent des variables --sphf-* de l'apparence commune.
   ========================================================================== */

/* ------------------------------------------------------------------ Texte affiché */

.sphf .sphf-prose { line-height: 1.65; overflow-wrap: anywhere; }
.sphf .sphf-prose > :first-child { margin-top: 0; }
.sphf .sphf-prose > :last-child { margin-bottom: 0; }
.sphf .sphf-prose p { margin: 0 0 .9em; }
.sphf .sphf-prose h3 { margin: 1.3em 0 .5em; color: var(--sphf-text); font-size: 1.2em; font-weight: var(--sphf-bold); line-height: 1.3; }
.sphf .sphf-prose h4 { margin: 1.1em 0 .4em; color: var(--sphf-text); font-size: 1.05em; font-weight: var(--sphf-bold); }
/* !important : l'emporte sur la remise à zéro des listes de sphf-base.css et sur le thème. */
.sphf .sphf-prose ul,
.sphf .sphf-prose ol { margin: 0 0 .9em 1.4em !important; padding: 0 !important; }
.sphf .sphf-prose ul li { margin: 0 0 .3em; padding-left: .2em; list-style: disc !important; }
.sphf .sphf-prose ol li { margin: 0 0 .3em; padding-left: .2em; list-style: decimal !important; }
.sphf .sphf-prose li::marker { content: normal; color: var(--sphf-link, var(--sphf-accent)); }
.sphf .sphf-prose blockquote { margin: 0 0 .9em; padding: .4em 0 .4em 1em; border-left: .1875em solid var(--sphf-accent-ring); color: var(--sphf-muted); font-style: italic; }
.sphf .sphf-prose a { color: var(--sphf-link, var(--sphf-accent)); text-decoration: underline; text-underline-offset: 2px; }
.sphf .sphf-prose u { text-decoration: underline; text-underline-offset: 2px; }

/* ------------------------------------------------------------------ Éditeur */

/* Barre d'outils + zone éditable. Sans JavaScript, seule la zone de saisie
   simple (textarea) s'affiche : la barre et la zone portent l'attribut hidden. */
.sphf .sphf-editor { overflow: hidden; border: 1px solid var(--sphf-line); border-radius: var(--sphf-radius-s); background: var(--sphf-card); }
.sphf .sphf-editor:focus-within { border-color: var(--sphf-accent); box-shadow: 0 0 0 4px var(--sphf-accent-soft); }
/* !important : l'emporte sur le cadre et l'ombre des champs communs (.sphf-field textarea). */
.sphf .sphf-editor .sphf-editor__source { display: block; width: 100%; min-height: 11.25em; border: 0 !important; border-radius: 0; box-shadow: none !important; resize: vertical; }
.sphf .sphf-editor .sphf-editor__source[hidden],
.sphf .sphf-editor .sphf-editor__bar[hidden],
.sphf .sphf-editor .sphf-editor__area[hidden] { display: none; }
.sphf .sphf-editor__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: .375em; border-bottom: 1px solid var(--sphf-line); background: var(--sphf-zone); }
/* Boutons G, I, S… : police à empattements, comme dans un traitement de texte. */
.sphf .sphf-editor__btn {
	display: inline-grid;
	place-items: center;
	min-width: 2.125em;
	height: 2.125em;
	margin: 0;
	padding: 0 .375em;
	border: 1px solid transparent;
	border-radius: var(--sphf-radius-s);
	background: transparent;
	color: var(--sphf-text);
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1em;
	font-weight: 600;
	line-height: 1;
	box-shadow: none;
	cursor: pointer;
}
.sphf .sphf-editor__btn:hover { background: var(--sphf-card); border-color: var(--sphf-line); }
.sphf .sphf-editor__btn.is-on { background: var(--sphf-accent-soft); border-color: var(--sphf-accent-ring); color: var(--sphf-accent-dark); }
.sphf .sphf-editor__btn b,
.sphf .sphf-editor__btn i,
.sphf .sphf-editor__btn u,
.sphf .sphf-editor__btn s { font-family: Georgia, "Times New Roman", serif; }
.sphf .sphf-editor__btn svg { display: block; }
.sphf .sphf-editor__sep { width: 1px; height: 1.375em; margin: 0 .3125em; background: var(--sphf-line); }
.sphf .sphf-editor__area { min-height: 12.5em; max-height: 60vh; overflow-y: auto; padding: .75em .875em; color: var(--sphf-text); outline: 0; cursor: text; }
/* Mode « Hériter du thème » : fond transparent, comme les autres champs. */
.sphf--theme .sphf-editor { background: transparent; }
