/**
 * Discussion talk edit (action=edit) — ext.PASTheme.discussionEdit (v1.6.66).
 * Loaded last via ResourceLoader after editForm + veToolbar + Vector Apparence.
 * Paired with discussionEdit.js (targeted MutationObserver, no CSS cascade pile).
 */

/* === Reset Vector / Codex theme vars on edit surface (Clair / Sombre / Automatique) === */
html.skin-theme-clientpref-day body.action-edit,
html.skin-theme-clientpref-night body.action-edit,
html.skin-theme-clientpref-os body.action-edit,
html body.ns-talk.action-edit,
html body.action-edit {
	--background-color-base: #111 !important;
	--background-color-neutral-subtle: #111 !important;
	--background-color-neutral: #111 !important;
	--background-color-progressive: #00ff5a !important;
	--background-color-progressive-subtle: transparent !important;
	--background-color-interactive: #00ff5a !important;
	--background-color-interactive-subtle: transparent !important;
	--color-base: #fff !important;
	--color-emphasized: #fff !important;
	--color-inverted: #000 !important;
	--color-progressive: #00ff5a !important;
	--color-progressive-hover: #fff !important;
	--color-link: #00ff5a !important;
	--cdx-color-base: #fff !important;
	--cdx-color-emphasized: #fff !important;
}

/* Conteneurs VE — thème sombre (bat veToolbar.css legacy sur .ve-init-target entier) */
html body.action-edit .ext-discussiontools-ui-targetWidget,
html body.action-edit .ext-discussiontools-ui-targetWidget .ve-init-target,
html body.action-edit .ve-init-target,
html body.action-edit .ext-discussiontools-ui-newTopic,
html body.action-edit .mw-editform {
	--color-base: #fff !important;
	--color-emphasized: #fff !important;
	--cdx-color-base: #fff !important;
	--cdx-color-emphasized: #fff !important;
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
	background: transparent !important;
	background-color: transparent !important;
}

/* ve-active: bodyContent stays light-on-dark; VE document stays dark-on-white */
html body.ve-active.action-edit #bodyContent {
	color: #fff !important;
	--color-base: #fff !important;
}

html body.ve-active.action-edit #bodyContent .ve-ce-documentNode,
html body.ve-active.action-edit #bodyContent .ve-ce-surface,
html body.ve-active.action-edit #bodyContent .ve-ui-surface {
	color: #202122 !important;
	--color-base: #202122 !important;
	--cdx-color-base: #202122 !important;
	--background-color-base: #fff !important;
	-webkit-text-fill-color: #202122 !important;
	background: #fff !important;
	background-color: #fff !important;
}

/* === Subject + summary inputs (incl. h2.ext-discussiontools-ui-newTopic-sectionTitle) === */
html body.action-edit .ext-discussiontools-ui-newTopic input,
html body.action-edit .ext-discussiontools-ui-newTopic textarea,
html body.action-edit .ext-discussiontools-ui-newTopic .oo-ui-inputWidget-input,
html body.action-edit .ext-discussiontools-ui-newTopic .oo-ui-textInputWidget-input,
html body.action-edit .ext-discussiontools-ui-newTopic-sectionTitle input,
html body.action-edit .ext-discussiontools-ui-newTopic-sectionTitle .oo-ui-inputWidget-input,
html body.action-edit .ext-discussiontools-ui-newTopic-sectionTitle .oo-ui-textInputWidget-input,
html body.action-edit h2.ext-discussiontools-ui-newTopic-sectionTitle input,
html body.action-edit h2.ext-discussiontools-ui-newTopic-sectionTitle .oo-ui-inputWidget-input,
html body.action-edit #wpSummary,
html body.action-edit #wpSummaryWidget input,
html body.action-edit #wpSummaryWidget .oo-ui-inputWidget-input,
html body.action-edit #wpSummaryWidget .oo-ui-textInputWidget-input,
html body.action-edit #bodyContent input[type="text"],
html body.action-edit #bodyContent input[type="search"],
html body.action-edit #bodyContent textarea,
html body.action-edit #bodyContent .oo-ui-inputWidget-input,
html body.action-edit #bodyContent .oo-ui-textInputWidget-input,
html body.action-edit .editOptions input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
html body.action-edit .editOptions .oo-ui-inputWidget-input,
html body.action-edit .editOptions .oo-ui-textInputWidget-input,
html body.action-edit .editOptions textarea {
	--color-base: #fff !important;
	--color-emphasized: #fff !important;
	--cdx-color-base: #fff !important;
	--cdx-color-emphasized: #fff !important;
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
	background: #111 !important;
	background-color: #111 !important;
	caret-color: #00ff5a !important;
	border: 1px solid #00ff5a !important;
}

html body.action-edit .ext-discussiontools-ui-newTopic-sectionTitle input::placeholder,
html body.action-edit #wpSummaryWidget input::placeholder,
html body.action-edit .editOptions input::placeholder {
	color: #888 !important;
	-webkit-text-fill-color: #888 !important;
	opacity: 1 !important;
}

/* === VE toolbar — light bar, dark icons (all appearance modes) === */
html body.action-edit .ext-discussiontools-ui-targetWidget .oo-ui-toolbar,
html body.action-edit .ext-discussiontools-ui-targetWidget .oo-ui-toolbar-bar,
html body.action-edit .ext-discussiontools-ui-targetWidget .oo-ui-toolbar-tools,
html body.action-edit .ext-discussiontools-ui-targetWidget .oo-ui-toolGroup,
html body.action-edit .ext-discussiontools-ui-targetWidget .oo-ui-toolGroup-tools,
html body.action-edit .ve-init-target .oo-ui-toolbar,
html body.action-edit .ve-init-target .oo-ui-toolbar-bar,
html body.action-edit .ve-init-target .oo-ui-toolbar-tools,
html body.action-edit .ve-init-mw-desktopArticleTarget .oo-ui-toolbar-bar,
html body.action-edit .vector-page-toolbar .oo-ui-toolbar-bar {
	background: #f8f9fa !important;
	background-color: #f8f9fa !important;
	color: #202122 !important;
	--color-base: #202122 !important;
	border-bottom: 1px solid #c8ccd1 !important;
}

html body.action-edit .oo-ui-toolbar-bar .oo-ui-tool.oo-ui-buttonWidget,
html body.action-edit .oo-ui-toolbar-bar .oo-ui-tool .oo-ui-buttonWidget,
html body.action-edit .ext-discussiontools-ui-targetWidget .oo-ui-toolbar-bar .oo-ui-tool.oo-ui-buttonWidget,
html body.action-edit .ve-init-target .oo-ui-toolbar-bar .oo-ui-tool.oo-ui-buttonWidget {
	color: #202122 !important;
	-webkit-text-fill-color: #202122 !important;
	background: transparent !important;
	background-color: transparent !important;
}

html body.action-edit .oo-ui-toolbar-bar .oo-ui-tool.oo-ui-buttonWidget:hover,
html body.action-edit .ext-discussiontools-ui-targetWidget .oo-ui-toolbar-bar .oo-ui-tool.oo-ui-buttonWidget:hover,
html body.action-edit .ve-init-target .oo-ui-toolbar-bar .oo-ui-tool.oo-ui-buttonWidget:hover {
	background: #eaecf0 !important;
	color: #202122 !important;
	-webkit-text-fill-color: #202122 !important;
}

html body.action-edit .oo-ui-toolbar-bar .oo-ui-iconElement-icon svg,
html body.action-edit .oo-ui-toolbar-bar .oo-ui-iconElement-icon path,
html body.action-edit .ext-discussiontools-ui-targetWidget .oo-ui-toolbar-bar .oo-ui-iconElement-icon svg,
html body.action-edit .ve-init-target .oo-ui-toolbar-bar .oo-ui-iconElement-icon path {
	fill: #202122 !important;
	opacity: 1 !important;
}

html body.action-edit .oo-ui-tabPanelLayout-header {
	background: #111 !important;
	background-color: #111 !important;
}

html body.action-edit .oo-ui-tabOptionWidget .oo-ui-labelElement-label {
	color: #ccc !important;
	-webkit-text-fill-color: #ccc !important;
}

html body.action-edit .oo-ui-tabOptionWidget.oo-ui-optionWidget-selected .oo-ui-labelElement-label {
	color: #00ff5a !important;
	-webkit-text-fill-color: #00ff5a !important;
}

/* === Advanced / summary panels — dark (no Vector grey header) === */
html body.action-edit .editOptions,
html body.action-edit #editpage-detail,
html body.action-edit .editOptions .oo-ui-fieldsetLayout,
html body.action-edit .editOptions .oo-ui-fieldsetLayout-group,
html body.action-edit .editOptions .oo-ui-fieldsetLayout-header,
html body.action-edit .editOptions .oo-ui-panelLayout-framed,
html body.action-edit .editOptions .oo-ui-panelLayout-framed .oo-ui-panelLayout-content,
html body.action-edit .editOptions .oo-ui-panelLayout-header,
html body.action-edit #editpage-detail .oo-ui-fieldsetLayout,
html body.action-edit #editpage-detail .oo-ui-fieldsetLayout-group,
html body.action-edit #editpage-detail .oo-ui-panelLayout-framed {
	--background-color-base: #111 !important;
	--background-color-neutral-subtle: #111 !important;
	--background-color-neutral: #111 !important;
	background: #111 !important;
	background-color: #111 !important;
	color: #fff !important;
	border-color: rgba(0, 255, 90, 0.35) !important;
}

html body.action-edit .editOptions .oo-ui-fieldsetLayout-header,
html body.action-edit #editpage-detail .oo-ui-fieldsetLayout-header,
html body.action-edit .editOptions .oo-ui-panelLayout-header {
	border-bottom: 1px solid rgba(0, 255, 90, 0.25) !important;
}

html body.action-edit .editOptions .oo-ui-labelElement-label,
html body.action-edit .editOptions .oo-ui-fieldLayout-label,
html body.action-edit .editOptions .oo-ui-fieldsetLayout-header .oo-ui-labelElement-label,
html body.action-edit #editpage-detail .oo-ui-labelElement-label {
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
	background: transparent !important;
	background-color: transparent !important;
}

/* === Submit (ButtonInputWidget + OOUI framed) === */
html body.action-edit #wpSaveWidget.oo-ui-buttonInputWidget input,
html body.action-edit #wpSaveWidget input[type="submit"],
html body.action-edit input#wpSave,
html body.action-edit input[name="wpSave"],
html body.action-edit #wpSaveWidget .oo-ui-buttonElement-button,
html body.action-edit .mw-editform-buttons .oo-ui-flaggedElement-progressive .oo-ui-buttonElement-button,
html body.action-edit .mw-editform-buttons .oo-ui-flaggedElement-primary .oo-ui-buttonElement-button,
html body.action-edit .ext-discussiontools-ui-newTopic .oo-ui-flaggedElement-progressive .oo-ui-buttonElement-button,
html body.action-edit .ext-discussiontools-ui-newTopic .oo-ui-flaggedElement-primary .oo-ui-buttonElement-button,
html body.action-edit #bodyContent .oo-ui-flaggedElement-progressive .oo-ui-buttonElement-button,
html body.action-edit #bodyContent .oo-ui-flaggedElement-primary .oo-ui-buttonElement-button {
	--background-color-progressive: #00ff5a !important;
	--background-color-interactive: #00ff5a !important;
	--color-base: #000 !important;
	--color-inverted: #000 !important;
	background: #00ff5a !important;
	background-color: #00ff5a !important;
	color: #000 !important;
	-webkit-text-fill-color: #000 !important;
	border: 1px solid #00ff5a !important;
	font-weight: bold !important;
	cursor: pointer !important;
	fill: #000 !important;
}

html body.action-edit #wpSaveWidget .oo-ui-buttonElement-button .oo-ui-labelElement-label,
html body.action-edit #bodyContent .oo-ui-flaggedElement-progressive .oo-ui-labelElement-label,
html body.action-edit #bodyContent .oo-ui-flaggedElement-primary .oo-ui-labelElement-label {
	color: #000 !important;
	-webkit-text-fill-color: #000 !important;
	background: transparent !important;
}

html body.action-edit #wpSaveWidget.oo-ui-buttonInputWidget input:hover,
html body.action-edit #wpSaveWidget.oo-ui-buttonInputWidget input:focus,
html body.action-edit input#wpSave:hover,
html body.action-edit input#wpSave:focus,
html body.action-edit #wpSaveWidget .oo-ui-buttonElement-button:hover,
html body.action-edit #bodyContent .oo-ui-flaggedElement-progressive .oo-ui-buttonElement-button:hover,
html body.action-edit #bodyContent .oo-ui-flaggedElement-primary .oo-ui-buttonElement-button:hover {
	background: #000 !important;
	background-color: #000 !important;
	color: #00ff5a !important;
	-webkit-text-fill-color: #00ff5a !important;
	border-color: #00ff5a !important;
	fill: #00ff5a !important;
}

html body.action-edit #wpSaveWidget .oo-ui-buttonElement-button:hover .oo-ui-labelElement-label,
html body.action-edit #bodyContent .oo-ui-flaggedElement-progressive .oo-ui-buttonElement-button:hover .oo-ui-labelElement-label {
	color: #00ff5a !important;
	-webkit-text-fill-color: #00ff5a !important;
}

/* === Message boxes + copywarn === */
html body.action-edit #editpage-copywarn,
html body.action-edit #editpage-copywarn p,
html body.action-edit #editpage-copywarn li,
html body.action-edit .mw-message-box,
html body.action-edit .mw-message-box-notice {
	background: #111 !important;
	background-color: #111 !important;
	color: #ddd !important;
	-webkit-text-fill-color: #ddd !important;
	border: 1px solid rgba(0, 255, 90, 0.35) !important;
	border-radius: 4px;
}

html body.action-edit #editpage-copywarn a,
html body.action-edit .mw-message-box a {
	color: #00ff5a !important;
	-webkit-text-fill-color: #00ff5a !important;
}

/* === Vector appearance sidebar + footer === */
html body.action-edit .vector-appearance .cdx-radio__label,
html body.action-edit .vector-appearance .cdx-label,
html body.action-edit .vector-appearance label,
html body.action-edit .vector-appearance .oo-ui-labelElement-label,
html body.action-edit #vector-appearance-dropdown .cdx-radio__label {
	background: transparent !important;
	background-color: transparent !important;
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
}

html body.action-edit #footer-places,
html body.action-edit #footer-places li {
	background: transparent !important;
	background-color: transparent !important;
}

html body.action-edit #footer-places a,
html body.action-edit #footer-places li a {
	background: transparent !important;
	background-color: transparent !important;
	color: #00ff5a !important;
	-webkit-text-fill-color: #00ff5a !important;
}

html body.action-edit #footer-places a:hover,
html body.action-edit #footer-places li a:hover {
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
}

/* Notifications VE (ex. « Changements récupérés ») */
html body.action-edit .mw-notification,
html body.action-edit .mw-notification-area .mw-notification {
	background: #111 !important;
	background-color: #111 !important;
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
	border: 1px solid rgba(0, 255, 90, 0.45) !important;
}

html body.action-edit .mw-notification-title {
	color: #00ff5a !important;
	-webkit-text-fill-color: #00ff5a !important;
}

html body.action-edit .mw-notification-content {
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
}

/* Conteneur formulaire — texte clair (bat veEditorOverride sur ancêtres) */
html body.action-edit #bodyContent,
html body.action-edit .ext-discussiontools-ui-newTopic,
html body.action-edit .ext-discussiontools-ui-newTopic-sectionTitle,
html body.action-edit .editOptions,
html body.action-edit #editpage-detail {
	color: #fff !important;
	--color-base: #fff !important;
	-webkit-text-fill-color: #fff !important;
}
