/*
 * Amanela : feuille de style unique de l'interface (gabarit, applications, dialogues, connexion, accueil mobile).
 *
 * Chargée après jQuery UI et jquery-confirm, qu'elle habille ; elle commence par la base reprise de Foundation 6
 * (remise à zéro, grille, composants). Les couleurs de l'instance viennent de variables.css.php
 * (C1_global_variables : --primary_color, --alert_color…) ; les jetons ci-dessous en dérivent.
 * Les noms de classes sont ceux que les applications utilisent : ne pas les renommer.
 *
 * Sommaire : base reprise de Foundation, police, jetons, base, mise en page, barre du haut, menus déroulants,
 * onglets, panneau de gauche, cartes et titres, boutons, champs, listes, tableaux, pagination, étiquettes, dialogues
 * jquery-confirm et jQuery UI, notifications, connexion, accueils (bureau et téléphone), clés d'accès, grille des
 * dialogues.
 *
 * Dans une section, les quelques règles reprises de l'ancienne feuille (style.css) précèdent celles du thème, qui
 * l'emportent à spécificité égale : ne garder que ce qui change encore le rendu.
 */

/* ---------------------------------------------------------------------------------------------------------------- */
/* Base (reprise de Foundation 6)                                                                                   */
/* ---------------------------------------------------------------------------------------------------------------- */
/*
 * Règles reprises de Foundation for Sites 6.7.5 (https://get.foundation, licence MIT, (c) ZURB) et de normalize.css
 * 8.0.0 (licence MIT, Nicolas Gallagher et Jonathan Neal), qui ne sont plus chargées : seules ont été gardées les
 * règles qui changent le rendu des pages, ou qui servent des classes employées par le code. Les noms de classes de
 * Foundation restent valables : grille (grid-x, grid-margin-x, cell, small-*, medium-*, large-*, *-auto), visibilité
 * (show-for-*, hide-for-*, hide, invisible, show-for-sr), bouton (button, button-group, expanded, small, tiny,
 * large, hollow, secondary, success, warning, alert), callout, label, menu (dropdown, vertical, is-dropdown-submenu,
 * barre top-bar et title-bar), pagination, input-group, text-right.
 *
 * Points de rupture (ceux de la compilation de Foundation) : small < 50em (800 px) ≤ medium < 100em (1600 px) ≤
 * large ; « print, screen and » : l'impression prend la mise en page des grands écrans. Les règles du thème, plus
 * bas, l'emportent à spécificité égale.
 */

html { line-height: 1.15; -webkit-text-size-adjust: 100%; }
img { border-style: none; }
button, input, select, textarea { font-family: inherit; font-size: 100%; line-height: 1.15; margin: 0; }
button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner { border-style: none; padding: 0; }
button:-moz-focusring, [type="button"]:-moz-focusring, [type="reset"]:-moz-focusring, [type="submit"]:-moz-focusring { outline: 1px dotted ButtonText; }
fieldset { padding: 0.35em 0.75em 0.625em; }
textarea { overflow: auto; }
[type="search"] { -webkit-appearance: textfield; outline-offset: -2px; }
[type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button { height: auto; }
[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
::-webkit-file-upload-button { -webkit-appearance: button; font: inherit; }
html { box-sizing: border-box; font-size: 100%; }
*, *::before, *::after { box-sizing: inherit; }
img { display: inline-block; vertical-align: middle; max-width: 100%; height: auto; }
textarea { height: auto; min-height: 50px; border-radius: 0; }
button { padding: 0; -webkit-appearance: none; -moz-appearance: none; appearance: none; border: 0; border-radius: 0; background: transparent; line-height: 1; cursor: auto; }
button, input, select, textarea { font-family: inherit; }
.grid-x { display: flex; flex-flow: row wrap; }
.cell { flex: 0 0 auto; min-height: 0; min-width: 0; width: 100%; }
@media print, screen and (min-width: 100em) {
	.grid-x > .large-2, .grid-x > .large-6 { flex-basis: auto; }
}
.grid-x > .small-6 { width: 50%; }
@media print, screen and (min-width: 50em) {
	.grid-x > .medium-auto { flex: 1 1 0; width: auto; }
}
@media print, screen and (min-width: 100em) {
	.grid-x > .large-auto { flex: 1 1 0; width: auto; }
	.grid-x > .large-2, .grid-x > .large-6 { flex: 0 0 auto; }
	.grid-x > .large-2 { width: 16.66667%; }
	.grid-x > .large-6 { width: 50%; }
}
.grid-margin-x:not(.grid-x) > .cell { width: auto; }
.grid-margin-x { margin-left: -0.625rem; margin-right: -0.625rem; }
@media print, screen and (min-width: 50em) {
	.grid-margin-x { margin-left: -0.9375rem; margin-right: -0.9375rem; }
}
.grid-margin-x > .cell { width: calc(100% - 1.25rem); margin-left: 0.625rem; margin-right: 0.625rem; }
@media print, screen and (min-width: 50em) {
	.grid-margin-x > .cell { width: calc(100% - 1.875rem); margin-left: 0.9375rem; margin-right: 0.9375rem; }
}
.grid-margin-x > .small-6 { width: calc(50% - 1.25rem); }
@media print, screen and (min-width: 50em) {
	.grid-margin-x > .small-6 { width: calc(50% - 1.875rem); }
	.grid-margin-x > .medium-auto { width: auto; }
	.grid-margin-x > .medium-3 { width: calc(25% - 1.875rem); }
	.grid-margin-x > .medium-4 { width: calc(33.33333% - 1.875rem); }
	.grid-margin-x > .medium-6 { width: calc(50% - 1.875rem); }
	.grid-margin-x > .medium-8 { width: calc(66.66667% - 1.875rem); }
	.grid-margin-x > .medium-12 { width: calc(100% - 1.875rem); }
}
@media print, screen and (min-width: 100em) {
	.grid-margin-x > .large-auto { width: auto; }
	.grid-margin-x > .large-2 { width: calc(16.66667% - 1.875rem); }
	.grid-margin-x > .large-6 { width: calc(50% - 1.875rem); }
}
.align-left { justify-content: flex-start; }
.align-right { justify-content: flex-end; }
p { margin-bottom: 1rem; font-size: inherit; line-height: 1.6; text-rendering: optimizeLegibility; }
h1, h2, h3 { font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; font-style: normal; font-weight: normal; color: inherit; text-rendering: optimizeLegibility; }
ul { margin-bottom: 1rem; list-style-position: outside; line-height: 1.6; }
ul { margin-left: 1.25rem; list-style-type: disc; }
code { border: 1px solid var(--border); background-color: var(--bg-hover); font-family: Consolas, "Liberation Mono", Courier, monospace; font-weight: normal; color: var(--text-strong); display: inline; max-width: 100%; word-wrap: break-word; padding: 0.125rem 0.3125rem 0.0625rem; }
.text-right { text-align: right; }
@media print {
	* { background: transparent !important; color: black !important; print-color-adjust: economy; box-shadow: none !important; text-shadow: none !important; }
	.show-for-print { display: block !important; }
	.hide-for-print { display: none !important; }
	table.show-for-print { display: table !important; }
	thead.show-for-print { display: table-header-group !important; }
	tbody.show-for-print { display: table-row-group !important; }
	tr.show-for-print { display: table-row !important; }
	td.show-for-print { display: table-cell !important; }
	th.show-for-print { display: table-cell !important; }
	a, a:visited { text-decoration: underline; }
	a[href]:after { content: " (" attr(href) ")"; }
	.ir a:after, a[href^='javascript:']:after, a[href^='#']:after { content: ''; }
	abbr[title]:after { content: " (" attr(title) ")"; }
	pre, blockquote { border: 1px solid var(--border-strong); page-break-inside: avoid; }
	thead { display: table-header-group; }
	tr, img { page-break-inside: avoid; }
	img { max-width: 100% !important; }
	@page { margin: 0.5cm; }
	p, h2, h3 { orphans: 3; widows: 3; }
	h2, h3 { page-break-after: avoid; }
	.print-break-inside { page-break-inside: auto; }
}
.button { display: inline-block; vertical-align: middle; margin: 0 0 1rem 0; padding: 0.85em 1em; border: 1px solid transparent; border-radius: 0; transition: background-color 0.25s ease-out, color 0.25s ease-out; font-family: inherit; font-size: 0.9rem; -webkit-appearance: none; line-height: 1; text-align: center; cursor: pointer; }
.button, .button[disabled], .button[disabled]:hover, .button[disabled]:focus { background-color: var(--primary); color: var(--primary-on); }
.button:hover, .button:focus { background-color: var(--primary-hover); color: var(--primary-on); }
.button.secondary, .button.secondary[disabled], .button.secondary[disabled]:hover, .button.secondary[disabled]:focus { background-color: var(--bg-surface); color: var(--text); }
.button.secondary:hover, .button.secondary:focus { background-color: var(--bg-hover); color: var(--text-strong); }
.button.alert, .button.alert[disabled], .button.alert[disabled]:hover, .button.alert[disabled]:focus { background-color: var(--danger); color: var(--danger-on); }
.button.alert:hover, .button.alert:focus { background-color: var(--danger-hover); color: var(--danger-on); }
.button.hollow, .button.hollow:hover, .button.hollow:focus, .button.hollow[disabled], .button.hollow[disabled]:hover, .button.hollow[disabled]:focus { background-color: transparent; }
.button.hollow, .button.hollow[disabled], .button.hollow[disabled]:hover, .button.hollow[disabled]:focus { border: 1px solid var(--primary); color: var(--primary-ink); }
.button.hollow:hover, .button.hollow:focus { border-color: var(--primary-ink); color: var(--primary-ink); }
.button.hollow.alert, .button.hollow.alert[disabled], .button.hollow.alert[disabled]:hover, .button.hollow.alert[disabled]:focus { border: 1px solid var(--danger); color: var(--danger-ink); }
.button.hollow.alert:hover, .button.hollow.alert:focus { border-color: var(--danger-ink); color: var(--danger-ink); }
a.button:hover, a.button:focus { text-decoration: none; }
[type='text'], [type='password'], [type='date'], [type='datetime'], [type='datetime-local'], [type='month'], [type='week'], [type='email'], [type='number'], [type='search'], [type='tel'], [type='time'], [type='url'], [type='color'], textarea { display: block; box-sizing: border-box; width: 100%; height: 2.4375rem; margin: 0 0 1rem; padding: 0.5rem; border: 1px solid var(--border-strong); border-radius: 0; background-color: var(--bg-surface); box-shadow: none; font-family: inherit; font-size: 1rem; font-weight: normal; line-height: 1.5; color: var(--text-strong); transition: border-color 0.25s ease-in-out, -webkit-box-shadow 0.5s; transition: box-shadow 0.5s, border-color 0.25s ease-in-out; transition: box-shadow 0.5s, border-color 0.25s ease-in-out, -webkit-box-shadow 0.5s; -webkit-appearance: none; -moz-appearance: none; appearance: none; }
[type='text']:focus, [type='password']:focus, [type='date']:focus, [type='datetime']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='week']:focus, [type='email']:focus, [type='number']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='url']:focus, [type='color']:focus, textarea:focus { outline: none; border: 1px solid var(--border-strong); background-color: var(--bg-surface); box-shadow: var(--focus-ring); transition: border-color 0.25s ease-in-out, -webkit-box-shadow 0.5s; transition: box-shadow 0.5s, border-color 0.25s ease-in-out; transition: box-shadow 0.5s, border-color 0.25s ease-in-out, -webkit-box-shadow 0.5s; }
textarea { max-width: 100%; }
[type='submit'], [type='button'] { -webkit-appearance: none; -moz-appearance: none; appearance: none; border-radius: 0; }
[type='file'], [type='checkbox'], [type='radio'] { margin: 0 0 1rem; }
label > [type='checkbox'], label > [type='radio'] { margin-right: 0.5rem; }
[type='file'] { width: 100%; }
label { display: block; margin: 0; font-size: 0.875rem; font-weight: normal; line-height: 1.8; color: var(--text); }
.input-group-label, .input-group-field, .input-group-button, .input-group-button a, .input-group-button input, .input-group-button button, .input-group-button label { margin: 0; white-space: nowrap; }
.input-group-label { padding: 0 1rem; border: 1px solid var(--border-strong); background: var(--bg-subtle); color: var(--text-muted); text-align: center; white-space: nowrap; display: flex; flex: 0 0 auto; align-items: center; }
.input-group-label:last-child { border-left: 0; }
.input-group-field { border-radius: 0; flex: 1 1 0px; min-width: 0; }
.input-group-button { padding-top: 0; padding-bottom: 0; text-align: center; display: flex; flex: 0 0 auto; }
.input-group-button a, .input-group-button input, .input-group-button button, .input-group-button label { align-self: stretch; height: auto; padding-top: 0; padding-bottom: 0; font-size: 1rem; }
fieldset { margin: 0; padding: 0; border: 0; }
select:focus { outline: none; border: 1px solid var(--border-strong); background-color: var(--bg-surface); box-shadow: var(--focus-ring); transition: border-color 0.25s ease-in-out, -webkit-box-shadow 0.5s; transition: box-shadow 0.5s, border-color 0.25s ease-in-out; transition: box-shadow 0.5s, border-color 0.25s ease-in-out, -webkit-box-shadow 0.5s; }
.button-group { margin-bottom: 1rem; display: flex; flex-wrap: wrap; align-items: stretch; flex-grow: 1; }
.button-group::before, .button-group::after { display: table; content: ' '; flex-basis: 0; order: 1; }
.button-group::after { clear: both; }
.button-group::before, .button-group::after { display: none; }
.button-group .button { margin: 0; margin-right: 1px; margin-bottom: 1px; font-size: 0.9rem; flex: 0 0 auto; }
@media print, screen and (min-width: 50em) {
	.button-group.stacked-for-small .button { flex: 0 0 auto; margin-bottom: 0; }
}
.callout { position: relative; margin: 0 0 1rem 0; padding: 1rem; border: 1px solid var(--border); border-radius: 0; background-color: var(--bg-surface); color: var(--text); }
.callout.success { background-color: var(--success-tint); border-color: var(--success-border); color: var(--text-strong); }
.menu { padding: 0; margin: 0; list-style: none; position: relative; display: flex; flex-wrap: wrap; }
.menu a, .menu .button { line-height: 1; text-decoration: none; display: block; padding: 0.7rem 1rem; }
.menu input { display: inline-block; }
.menu.vertical { flex-wrap: nowrap; flex-direction: column; }
.menu .active > a { background: var(--primary); color: var(--primary-on); }
.dropdown.menu > li.opens-left > .is-dropdown-submenu { top: 100%; right: 0; left: auto; }
.dropdown.menu > li.opens-right > .is-dropdown-submenu { top: 100%; right: auto; left: 0; }
.dropdown.menu > li.is-dropdown-submenu-parent > a { position: relative; padding-right: 1.5rem; }
.dropdown.menu > li.is-dropdown-submenu-parent > a::after { display: block; width: 0; height: 0; border-style: solid; border-width: 6px; content: ''; border-bottom-width: 0; border-color: var(--text-muted) transparent transparent; right: 5px; left: auto; margin-top: -3px; }
.is-dropdown-submenu-parent { position: relative; }
.is-dropdown-submenu-parent a::after { position: absolute; top: 50%; right: 5px; left: auto; margin-top: -6px; }
.is-dropdown-submenu { position: absolute; top: 0; left: 100%; z-index: 1; display: none; min-width: 200px; border: 1px solid var(--border); background: var(--bg-surface); }
.dropdown .is-dropdown-submenu a { padding: 0.7rem 1rem; }
.is-dropdown-submenu .is-dropdown-submenu-parent > a::after { right: 14px; }
.is-dropdown-submenu .is-dropdown-submenu-parent.opens-left > a::after { display: block; width: 0; height: 0; border-style: solid; border-width: 6px; content: ''; border-left-width: 0; border-color: transparent var(--text-muted) transparent transparent; right: auto; left: 5px; }
.is-dropdown-submenu .is-dropdown-submenu-parent.opens-right > a::after { display: block; width: 0; height: 0; border-style: solid; border-width: 6px; content: ''; border-right-width: 0; border-color: transparent transparent transparent var(--text-muted); }
.is-dropdown-submenu .is-dropdown-submenu { margin-top: -1px; }
.is-dropdown-submenu > li { width: 100%; }
.is-dropdown-submenu.js-dropdown-active { display: block; }
.label { display: inline-block; padding: 0.33333rem 0.5rem; border-radius: 0; font-size: 0.8rem; line-height: 1; white-space: nowrap; cursor: default; background: var(--primary); color: var(--primary-on); }
.pagination::before, .pagination::after { display: table; content: ' '; flex-basis: 0; order: 1; }
.pagination::after { clear: both; }
.pagination li { margin-right: 0.0625rem; border-radius: 0; font-size: 0.875rem; display: none; }
@media print, screen and (min-width: 50em) {
	.pagination li { display: inline-block; }
}
.pagination a:hover, .pagination button:hover { background: var(--bg-hover); }
.pagination .disabled { padding: 0.1875rem 0.625rem; color: var(--text-muted); cursor: not-allowed; }
.pagination .disabled:hover { background: transparent; }
table { border-collapse: collapse; width: 100%; margin-bottom: 1rem; border-radius: 0; }
thead, tbody { border: 1px solid var(--border); background-color: var(--bg-surface); }
thead { background: var(--bg-subtle); color: var(--text-strong); }
thead th, thead td { padding: 0.5rem 0.625rem 0.625rem; font-weight: bold; text-align: left; }
tbody tr:nth-child(even) { border-bottom: 0; background-color: var(--bg-subtle); }
.title-bar { padding: 0.5rem; background: var(--bg-surface); color: var(--text); display: flex; justify-content: flex-start; align-items: center; }
.top-bar { display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: center; padding: 0.5rem; flex-wrap: wrap; }
.top-bar input { max-width: 200px; margin-right: 1rem; }
.top-bar .input-group-field { width: 100%; margin-right: 0; }
.top-bar input.button { width: auto; }
.top-bar .top-bar-left, .top-bar .top-bar-right { flex: 0 0 100%; max-width: 100%; }
@media print, screen and (min-width: 50em) {
	.top-bar .top-bar-left { flex: 1 1 auto; margin-right: auto; }
	.top-bar .top-bar-right { flex: 0 1 auto; margin-left: auto; }
}

/* visibilité selon la largeur ; .show-for-large cache bien sous 100em (la compilation d'origine avait une erreur,
   « 99.99875emm », qui laissait ces éléments visibles partout) */
.hide { display: none !important; }
.invisible { visibility: hidden; }
@media print, screen and (max-width: 49.99875em) {
	.hide-for-small-only { display: none !important; }
}
@media screen and (max-width: 0em), screen and (min-width: 50em) {
	.show-for-small-only { display: none !important; }
}
@media print, screen and (min-width: 50em) {
	.hide-for-medium { display: none !important; }
}
@media screen and (max-width: 49.99875em) {
	.show-for-medium { display: none !important; }
}
@media print, screen and (min-width: 50em) and (max-width: 99.99875em) {
	.hide-for-medium-only { display: none !important; }
}
@media screen and (max-width: 49.99875em), screen and (min-width: 100em) {
	.show-for-medium-only { display: none !important; }
}
@media print, screen and (min-width: 100em) {
	.hide-for-large { display: none !important; }
}
@media screen and (max-width: 99.99875em) {
	.show-for-large { display: none !important; }
}
/* Foundation était chargée avant jQuery UI, dont cette règle l'emportait donc à spécificité égale (champs et boutons
   des dialogues jQuery UI, dont la reconnexion) */
/* lu seulement par les lecteurs d'écran */
.show-for-sr {
	position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important;
	overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}

/* ---------------------------------------------------------------------------------------------------------------- */
/* Police : Inter (OFL), auto-hébergée, sous-ensembles latin et latin étendu                                        */
/* ---------------------------------------------------------------------------------------------------------------- */

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../../../thirdparty/inter/inter-latin-wght-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../../../thirdparty/inter/inter-latin-ext-wght-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Inter";
	font-style: italic;
	font-weight: 100 900;
	font-display: swap;
	src: url("../../../thirdparty/inter/inter-latin-wght-italic.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Inter";
	font-style: italic;
	font-weight: 100 900;
	font-display: swap;
	src: url("../../../thirdparty/inter/inter-latin-ext-wght-italic.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------------------------------------------------------------------------------------------- */
/* Jetons                                                                                                           */
/* ---------------------------------------------------------------------------------------------------------------- */

:root {
	/* typographie */
	--font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-mono: ui-monospace, "SFMono-Regular", "DejaVu Sans Mono", Consolas, monospace;
	--fs-xs: 12px;   --lh-xs: 16px;    /* aides, badges, en-têtes de tableau */
	--fs-sm: 13px;   --lh-sm: 18px;    /* libellés, méta, date */
	--fs-base: 14px; --lh-base: 20px;  /* texte courant, champs, boutons */
	--fs-md: 16px;   --lh-md: 24px;    /* champs au téléphone, sous-titres */
	--fs-lg: 18px;   --lh-lg: 26px;    /* titres de dialogue, h2 */
	--fs-xl: 22px;   --lh-xl: 28px;    /* titre de page */
	--fs-2xl: 28px;  --lh-2xl: 34px;   /* accueil */
	--fw-regular: 400;
	--fw-medium: 500;
	--fw-semibold: 600;

	/* couleurs : calculées par le serveur (C1_Theme::palette, core/template2/css/variables.css.php), une palette par
	   mode d'affichage (couleurs de l'instance, sombre, contraste élevé) choisie par <html data-theme="…"> et par les
	   préférences de l'appareil. À employer : surfaces --bg-page, --bg-surface, --bg-subtle, --bg-hover ; texte
	   --text, --text-strong, --text-muted, --text-label ; bordures --border, --border-strong ; liens --link ;
	   accent --primary, --primary-on (texte sur --primary), --primary-hover, --primary-tint (fond pâle),
	   --primary-border, --primary-ink (texte sur fond pâle ou blanc) ; de même --danger-*, --warning-*,
	   --success-* ; --info-tint, --info-ink ; --inverse-bg, --inverse-text (bulle sombre en mode clair) ; --overlay
	   (voile sous un dialogue) ; --focus-outline, --focus-ring ; --shadow-xs à -lg ; couleurs du Markdown --md-red…,
	   --md-mark-yellow… (section Markdown). Chaque texte y atteint 4,5:1 sur
	   les fonds où il s'affiche (7:1 en contraste élevé). Jamais de couleur écrite en dur dans une page (vérificateur,
	   règle U04). */

	/* rayons */
	--radius-sm: 6px;
	--radius-md: 8px;
	--radius-lg: 12px;
	--radius-full: 999px;

	/* espacements (pas de 4 px) */
	--space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
	--space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px;

	/* dimensions */
	--control-h: 36px;
	--control-h-sm: 30px;
	--control-h-touch: 44px;
	--topbar-h: 56px;
	--tabs-h: 48px;
	--leftpane-w: 240px;

	--ease: 120ms ease;
}

/* ---------------------------------------------------------------------------------------------------------------- */
/* Base                                                                                                             */
/* ---------------------------------------------------------------------------------------------------------------- */

* { margin: 0; padding: 0; }
p { margin: 0; }
.menu { margin: auto; }
/* menus de la barre masqués jusqu'à ce que js/layout.js les ait branchés */
.hideWhileCharging { max-height: 10vh; visibility: hidden; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
	font-family: var(--font-sans);
	font-size: var(--fs-base);
	line-height: var(--lh-base);
	color: var(--text);
	background: var(--bg-page);
	-webkit-font-smoothing: antialiased;
	font-feature-settings: "cv11" 1;
}
button, input, select, textarea, .button { font-family: inherit; }
h1, h2, h3, h4 { font-family: inherit; color: var(--text-strong); font-weight: var(--fw-semibold); margin: 0; }
h1 { font-size: var(--fs-xl); line-height: var(--lh-xl); letter-spacing: -0.01em; }
h2 { font-size: var(--fs-lg); line-height: var(--lh-lg); }
h3 { font-size: var(--fs-md); line-height: var(--lh-md); }
h4 { font-size: var(--fs-base); line-height: var(--lh-base); }
strong, b { font-weight: var(--fw-semibold); }
p { line-height: var(--lh-base); }
small { font-size: var(--fs-sm); }
code, kbd, pre { font-family: var(--font-mono); font-size: 0.92em; }

a { color: var(--link); text-decoration: var(--link-decoration); text-underline-offset: 3px; cursor: pointer; }
a:hover { color: var(--primary-ink); text-decoration: underline; text-underline-offset: 3px; opacity: 1; }
a:focus { text-decoration: var(--link-decoration); }
p a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

:focus { outline: none; }
:focus-visible { outline: var(--focus-outline); outline-offset: 2px; border-radius: var(--radius-sm); }

.icon { cursor: inherit; text-decoration: none; }
a.icon, button.icon, [onclick].icon, [role="button"].icon { cursor: pointer; }

label { font-weight: var(--fw-regular); }

@media (max-width: 639px) {
	body { font-size: 15px; line-height: 22px; }
}

/* ---------------------------------------------------------------------------------------------------------------- */
/* Mise en page (body.app_layout : pages de l'application, utilisateur connecté)                                    */
/* ---------------------------------------------------------------------------------------------------------------- */

#left_pane, #right_pane { color: var(--text); }
#left_pane div.apps_left_menu_ { position: sticky; top: 10px; }

body.app_layout { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body.app_layout #global_menu { flex: 0 0 auto; min-height: 0; }
body.app_layout #content { flex: 1 1 auto; min-height: 0; max-height: none; overflow: hidden; background: var(--bg-page); color: var(--text); }
body.app_layout #content > .grid-x { height: 100%; flex-flow: column nowrap; }
body.app_layout #content > .grid-x > .cell.grid-x { flex: 1 1 auto; min-height: 0; flex-wrap: nowrap; overflow: auto; }
body.app_layout #left_pane {
	height: auto; max-height: none; overflow-y: auto;
	background: var(--bg-surface); border-right: 1px solid var(--border);
	padding: var(--space-4) var(--space-3);
	flex: 0 0 var(--leftpane-w); max-width: var(--leftpane-w); width: var(--leftpane-w);
}
body.app_layout #left_pane.hide-for-medium { display: none; }
body.app_layout #right_pane { min-width: 0; height: auto; max-height: none; overflow-y: auto; background: var(--bg-page); padding: var(--space-6); }
/* page du noyau (recherche, signature) : directement dans #content, sans la rangée qui défile : elle défile elle-même */
body.app_layout #content > #right_pane.core_page { height: 100%; box-sizing: border-box; }
/* zone de travail en plein écran (bouton de la rangée d'onglets, choix retenu par application) */
#exit_focus_right_pane { display: none; position: fixed; top: 0.5rem; right: 1rem; z-index: 3000; }
body.layout_focus_right_pane #global_menu, body.layout_focus_right_pane #animated-menu,
body.layout_focus_right_pane #left_pane { display: none !important; }
body.layout_focus_right_pane #content { min-height: 100vh !important; max-height: 100vh !important; }
body.layout_focus_right_pane #right_pane { flex: 0 0 100%; max-width: 100%; }
body.layout_focus_right_pane #exit_focus_right_pane { display: inline-flex; }

#global_footer { flex: 0 0 auto; font-size: var(--fs-xs); color: var(--text-muted); text-align: center; padding: var(--space-1); }
#global_footer:empty { display: none; }

@media (max-width: 639px) {
	body.app_layout { height: auto; overflow: auto; }
	body.app_layout #content { overflow: visible; flex-wrap: wrap; }
	body.app_layout #content > .grid-x > .cell.grid-x { flex-wrap: wrap; }
	body.app_layout #left_pane { flex-basis: 100%; max-width: 100%; width: 100%; border-right: 0; border-bottom: 1px solid var(--border); }
	body.app_layout #right_pane { padding: var(--space-4); }
	body.app_layout #content > #right_pane.core_page { height: auto; }
}

/* ---------------------------------------------------------------------------------------------------------------- */
/* Barre du haut                                                                                                    */
/* ---------------------------------------------------------------------------------------------------------------- */

.top-bar, .top-bar ul { color: var(--backgroundcolor_text); list-style-type: none; align-items: start; border-radius: var(--default_border_radius); }
.top-bar .has-submenu { z-index: 10; }
@media screen and (max-width: 800px) {
	.app_menu { width: 90vw; }
}

.top-bar {
	display: flex; align-items: center; flex-wrap: nowrap; gap: var(--space-2);
	height: var(--topbar-h); padding: 0 var(--space-4);
	background: var(--bg-surface); color: var(--text);
	border-top: 3px solid var(--app_color, var(--primary));
	border-bottom: 1px solid var(--border); border-radius: 0;
}
.top-bar ul { background: transparent; }
.top-bar-left { flex: 1 1 auto; min-width: 0; }
.top-bar-left > ul.dropdown.menu { display: flex; align-items: center; flex-wrap: nowrap; gap: var(--space-1); }
.top-bar-right { flex: 0 0 auto; display: flex; align-items: center; gap: var(--space-1); }

.top-bar .dropdown.menu > li > a {
	display: inline-flex; align-items: center; gap: var(--space-2);
	height: 36px; padding: 0 var(--space-3); border-radius: var(--radius-md);
	font-size: var(--fs-base); font-weight: var(--fw-medium); color: var(--text); text-decoration: none;
	background: transparent;
}
.top-bar .dropdown.menu > li > a:hover,
.top-bar .dropdown.menu > li.is-active > a { background: var(--bg-hover); color: var(--text-strong); border: 0; }
.top-bar .dropdown.menu > li.is-dropdown-submenu-parent > a { padding-right: 28px; }
.top-bar .dropdown.menu > li.is-dropdown-submenu-parent > a::after { border-color: var(--gray-500) transparent transparent; border-width: 5px; right: 10px; margin-top: -2px; }

/* applications de la section */
#second_menu { min-width: 0; padding-block: 4px; margin-left: var(--space-2); padding-left: var(--space-3); border-left: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
#second_menu:empty { border-left: 0; }
/* Icônes des applications (C2_Application::icon, seule source de leur HTML), dessin repris de l'ancienne police : disque
   plein de la couleur de l'instance (--primary, ajustée par mode d'affichage), pictogramme de l'application (applications/
   <dossier>/icon.svg, format Lucide) posé en masque CSS dans la couleur de texte de ce disque (--primary-on), et liseré
   de la couleur de l'application (--app-color), adouci, séparé du disque par un fin espace et volontairement un peu
   décentré vers le bas et la gauche (plus épais de ce côté-là). Le fichier n'est jamais inséré dans la page. Taille :
   font-size (le disque fait 1em, le liseré déborde de .16em au plus). */
.app_icon {
	position: relative; isolation: isolate; display: inline-block; flex: 0 0 auto; vertical-align: middle;
	width: 1em; height: 1em; margin: .16em; font-size: 28px; line-height: 1;
	border-radius: var(--radius-full); background: var(--primary);
}
.app_icon::before {
	content: ""; position: absolute; inset: 20%;
	background: var(--primary-on);
	-webkit-mask: var(--app-picto) center / contain no-repeat; mask: var(--app-picto) center / contain no-repeat;
}
.app_icon::after {
	content: ""; position: absolute; z-index: -1; inset: -.13em -.1em -.16em -.15em;
	border-radius: var(--radius-full);
	border: .09em solid color-mix(in srgb, var(--app-color, var(--primary)) 62%, transparent);
	border-bottom-width: .11em; border-left-width: .11em;
}
/* couleurs forcées (contraste élevé de Windows) : le navigateur effacerait le fond, donc le pictogramme ; disque cerclé
   aux couleurs du système, pictogramme dans la couleur du texte, liseré retiré */
@media (forced-colors: active) {
	.app_icon { forced-color-adjust: none; background: Canvas; box-shadow: 0 0 0 .07em CanvasText; }
	.app_icon::before { background: CanvasText; }
	.app_icon::after { display: none; }
}

ul.app_menu { display: flex; flex-wrap: nowrap; gap: 2px; margin: 0; }
ul.app_menu > li.menu_hover_show, ul.app_menu > li.menu_hover_show:hover { border: 0; background: none; }
.mainmenu_icon { display: block; width: auto; height: auto; text-align: center; }
.mainmenu_icon span { font-size: 0.82em; font-weight: bold; text-overflow: ellipsis; }
.mainmenu_icon a {
	display: flex; flex-direction: row; align-items: center; gap: 2px;
	height: 40px; padding: 0 10px; border-radius: var(--radius-md);
	color: var(--text); text-decoration: none;
}
.mainmenu_icon a:hover { background: var(--bg-hover); text-decoration: none; color: var(--text-strong); }
.mainmenu_icon a.active { background: var(--bg-hover); }
.mainmenu_icon a.active span { font-weight: var(--fw-semibold); }
.mainmenu_icon span:not(.app_icon) { display: inline; width: auto; height: auto; padding: 0; font-size: var(--fs-sm); line-height: var(--lh-sm); font-weight: var(--fw-medium); white-space: nowrap; overflow: visible; text-align: left; }
.mainmenu_icon i { font-size: 28px; }
.mainmenu_icon .app_icon { font-size: 28px; margin-right: .3em; }
@media (max-width: 1279px) {
	.mainmenu_icon span:not(.app_icon) { display: none; }
	.mainmenu_icon a { padding: 0 6px; }
}
/* place réelle de la barre (panneau de l'assistant ouvert, section de nombreuses applications) : layout.js, fitTopBar,
   resserre par étapes tant que les applications débordent ; le logo et le menu des sections ne rétrécissent jamais */
.top-bar-left > ul.dropdown.menu > li:not(#second_menu) { flex: 0 0 auto; }
@media (min-width: 640px) {
	.top-bar.is_compact .mainmenu_icon span:not(.app_icon) { display: none; }
	.top-bar.is_compact .mainmenu_icon a { padding: 0 6px; }
	.top-bar.is_tight .user_name { display: none; }
	.top-bar.is_tight .top_search input[type="search"] { width: 10rem; }
	.top-bar.is_tight .top_search input[type="search"]:focus { width: 14rem; }
}

.top_brand { display: inline-flex; align-items: center; margin-right: var(--space-2); }
.top_brand img { width: 28px; height: 28px; border-radius: var(--radius-sm); }
.top_brand:hover { opacity: .85; }

.user_avatar {
	display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
	width: 32px; height: 32px; border-radius: var(--radius-full);
	background: var(--primary-tint); color: var(--primary-ink);
	font-size: var(--fs-xs); font-weight: var(--fw-semibold);
}
.top-bar .dropdown.menu > li > a.user_menu { padding-left: var(--space-1); }
@media (max-width: 1023px) { .user_name { display: none; } }
/* nombre en attente à côté d'une entrée du menu de l'utilisateur (Mes propositions à valider) */
.user_menu_count { display: inline-block; margin-left: var(--space-2); }

/* barre du téléphone */
.title-bar {
	display: flex; align-items: center; justify-content: space-between;
	height: var(--topbar-h); padding: 0 var(--space-2) 0 var(--space-4);
	background: var(--bg-surface); color: var(--text);
	border-top: 3px solid var(--app_color, var(--primary)); border-bottom: 1px solid var(--border);
}
.title-bar .menu { display: flex; gap: var(--space-1); margin: 0 0 0 auto; background: transparent; }
.title-bar .menu a {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	min-width: 56px; height: 48px; padding: 0 var(--space-2); border-radius: var(--radius-md);
	color: var(--gray-700); text-decoration: none;
}
.title-bar .menu a:hover { background: var(--bg-hover); }
.title-bar .menu a i { font-size: 22px; }
.title-bar_label { font-size: 11px; line-height: 14px; font-weight: var(--fw-medium); }
.title-bar .app_icon { font-size: 34px; cursor: pointer; }
.app_home_link { display: inline-block; border-radius: var(--radius-full); }
.app_home_link:focus-visible { outline: var(--focus-outline); outline-offset: 2px; }
.title-bar .top_brand img { width: 32px; height: 32px; }

@media (max-width: 639px) {
	.top-bar { flex-direction: column; align-items: stretch; height: auto; padding: var(--space-2); }
	.top-bar-left > ul.dropdown.menu { flex-direction: column; align-items: stretch; }
	.top-bar .dropdown.menu > li > a { height: 44px; width: 100%; }
	.top-bar-right { justify-content: flex-start; }
	#second_menu { margin: var(--space-2) 0 0; padding: var(--space-2) 0 0; border-left: 0; border-top: 1px solid var(--border); }
	ul.app_menu { display: grid; grid-template-columns: repeat(3, 1fr); }
	.mainmenu_icon a { flex-direction: column; height: auto; padding: var(--space-2); }
	.mainmenu_icon span:not(.app_icon) { display: block; text-align: center; white-space: normal; }
}

/* ---------------------------------------------------------------------------------------------------------------- */
/* Menus déroulants                                                                                                 */
/* ---------------------------------------------------------------------------------------------------------------- */

.top-bar .submenu, .dropdown.menu .is-dropdown-submenu {
	min-width: 220px; padding: 6px;
	background: var(--bg-surface); border: 1px solid var(--border);
	border-radius: var(--radius-lg); box-shadow: var(--shadow-md); z-index: 50;
	margin-top: 4px;
}
.top-bar .has-submenu { background: transparent; }
.is-dropdown-submenu-item > a, .menu_hover_show > a {
	display: flex; align-items: center; gap: var(--space-2);
	min-height: 36px; padding: 0 var(--space-3); border-radius: var(--radius-sm);
	font-size: var(--fs-base); color: var(--text); text-decoration: none;
}
.menu_hover_show:hover, .menu_hover_show:focus, .is-dropdown-submenu-item:hover > a {
	background: var(--bg-hover); color: var(--text-strong); border: 0; border-radius: var(--radius-sm); text-decoration: none;
}
/* séparateur au-dessus de la déconnexion seulement s'il y a des liens au-dessus (jamais de trait vide) */
.submenu li + .menu_logout { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 6px; }
.submenu .is-dropdown-submenu-item > a > i { width: 1.25em; text-align: center; color: var(--text-muted); }
@media (min-width: 640px) { #user_submenu a { white-space: nowrap; } }
.submenu .menu_logout:hover { background: none; }
/* déconnexion : bouton d'un formulaire POST (logout.php), présenté comme les liens du menu */
.submenu .menu_logout form { margin: 0; }
.submenu .menu_logout button {
	display: flex; align-items: center; gap: var(--space-2); width: 100%;
	min-height: 36px; padding: 0 var(--space-3); border: 0; border-radius: var(--radius-sm); background: none;
	font: inherit; font-size: var(--fs-base); color: var(--danger-ink); text-align: left; cursor: pointer;
}
.submenu .menu_logout button:hover, .submenu .menu_logout button:focus-visible { background: var(--danger-tint); }
/* « À propos » : icône à droite de la déconnexion, sur la même ligne (core/template2/about.dlg.php) */
.submenu .menu_logout { display: flex; align-items: center; gap: var(--space-2); }
.submenu .menu_logout form { flex: 1 1 auto; }
.submenu .menu_logout button.menu_about {
	flex: 0 0 auto; width: 36px; justify-content: center; padding: 0; color: var(--text-muted);
}
.submenu .menu_logout button.menu_about:hover, .submenu .menu_logout button.menu_about:focus-visible { background: var(--bg-hover); color: var(--text); }
.about_dialog .about_product { margin-bottom: var(--space-2); }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Onglets de l'application et rangée d'outils                                                                      */
/* ---------------------------------------------------------------------------------------------------------------- */

#mainmenu_application { color: var(--text); }

#content .app_toolbar {
	display: flex; align-items: center; gap: var(--space-2);
	height: var(--tabs-h); padding: 0 var(--space-4);
	background: var(--bg-surface); border-bottom: 1px solid var(--border);
}
#mainmenu_application {
	display: flex; flex: 1 1 auto; align-self: stretch; align-items: stretch; gap: var(--space-1);
	margin: 0; background: transparent !important; overflow-x: auto; scrollbar-width: none;
}
#mainmenu_application a, #mainmenu_application a.button, #mainmenu_application a.active {
	display: inline-flex; align-items: center; height: auto; margin: 0; padding: 0 var(--space-3);
	background: transparent; color: var(--text-muted); box-shadow: none;
	font-size: var(--fs-base); font-weight: var(--fw-medium); text-decoration: none; white-space: nowrap;
	border: 0; border-bottom: 2px solid transparent; border-radius: 0;
}
#mainmenu_application a:hover { color: var(--text-strong); border-bottom-color: var(--gray-300); background: transparent; opacity: 1; text-decoration: none; }
#mainmenu_application a.active, #mainmenu_application a.active:hover { color: var(--primary-ink); border-bottom-color: var(--primary); font-weight: var(--fw-semibold); }
#C1_date_and_time { order: 1; margin-left: auto; padding: 0 !important; float: none !important; font-size: var(--fs-sm) !important; color: var(--text-muted); white-space: nowrap; }
#toggle_left_pane, #toggle_focus_right_pane {
	order: 2; display: inline-flex; align-items: center; justify-content: center;
	width: 32px; height: 32px; border-radius: var(--radius-md); font-size: 18px !important; color: var(--gray-500);
}
#toggle_left_pane:hover, #toggle_focus_right_pane:hover { background: var(--bg-hover); color: var(--text-strong); }
/* bouton « ? » : la page du guide officiel de l'application pour l'écran courant (C1_Guides::helpUrl) */
#app_help {
	order: 2; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
	width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 50%;
	color: var(--text-muted); font-weight: var(--fw-semibold); font-size: var(--fs-sm); text-decoration: none;
}
#app_help:hover, #app_help:focus-visible { background: var(--bg-hover); color: var(--primary-ink); border-color: var(--primary); text-decoration: none; }
@media (max-width: 1023px) { #C1_date_and_time { display: none; } }
@media (max-width: 639px) {
	#content .app_toolbar { padding: 0 var(--space-2); }
	#mainmenu_application.stacked-for-small { display: flex !important; flex-direction: row; flex-wrap: nowrap; }
	#mainmenu_application.stacked-for-small .button { width: auto; flex: 0 0 auto !important; }
}

/* ---------------------------------------------------------------------------------------------------------------- */
/* Panneau de gauche                                                                                                */
/* ---------------------------------------------------------------------------------------------------------------- */

#left_pane .callout_glb, #left_pane .apps_left_menu.callout_glb {
	background: transparent; border: 0; box-shadow: none; padding: 0; margin: 0 0 var(--space-2);
}
#main_logo_app { text-align: left; padding: var(--space-1) var(--space-3) var(--space-2); }
#main_logo_app .app_icon { font-size: 40px; }
h1.apps_left_menu {
	background: none; color: var(--text-muted); border-radius: 0; margin: 0;
	padding: var(--space-4) var(--space-3) 6px; text-align: left;
	font-size: var(--fs-xs); line-height: var(--lh-xs); font-weight: var(--fw-semibold);
	text-transform: uppercase; letter-spacing: 0.06em;
}
p.apps_left_menu { margin: 0 0 2px; text-align: left; text-decoration: none; font-size: inherit; cursor: pointer; }
a.apps_left_menu_item, .apps_left_menu_item {
	display: flex; align-items: center; gap: var(--space-2);
	min-height: 36px; padding: 0 var(--space-3); border-radius: var(--radius-md);
	color: var(--text); font-size: var(--fs-base); font-weight: var(--fw-medium); text-decoration: none;
}
a.apps_left_menu_item:hover, .apps_left_menu_item:hover { background: var(--bg-hover); color: var(--text-strong); text-decoration: none; }
.apps_left_menu_item.active { background: var(--primary-tint); color: var(--primary-ink); font-weight: var(--fw-semibold); }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Cartes et titres                                                                                                 */
/* ---------------------------------------------------------------------------------------------------------------- */

.callout_glb {
	background: var(--bg-surface); color: var(--text);
	border: 1px solid var(--border); border-radius: var(--radius-lg);
	box-shadow: var(--shadow-xs);
	padding: var(--space-4); margin: 0 0 var(--space-4); font-size: inherit;
}
.callout_glb_secondary {
	background: var(--bg-subtle); color: var(--text);
	border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: none;
	padding: var(--space-3) var(--space-4); margin: 0 0 var(--space-4); font-size: inherit;
}
.callout_glb_warning, .callout_glb_alert {
	border-radius: var(--radius-lg); box-shadow: none; padding: var(--space-3) var(--space-4);
	margin: 0 0 var(--space-4); font-size: inherit; color: var(--text-strong);
}
.callout_glb_warning { background: var(--warning-tint); border: 1px solid var(--warning-border); border-left: 4px solid var(--warning); }
.callout_glb_alert { background: var(--danger-tint); border: 1px solid var(--danger-border); border-left: 4px solid var(--danger); }
.callout_glb > label, .callout_glb > form > label { font-size: inherit; }
.callout_glb h2 { font-size: var(--fs-md); line-height: var(--lh-md); margin-bottom: var(--space-3); }
.separator_glb { border-left: 3px solid var(--primary); padding-left: var(--space-3); margin-bottom: var(--space-5); }

h1.details, h1.details.callout_glb {
	display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;
	background: none; border: 0; box-shadow: none; padding: 0; margin: 0 0 var(--space-5);
	font-size: var(--fs-xl); line-height: var(--lh-xl); font-weight: var(--fw-semibold); text-align: left; color: var(--text-strong);
}
h2.details { font-size: var(--fs-lg); line-height: var(--lh-lg); margin: 0 0 var(--space-3); text-align: left; }
h3.details { font-size: var(--fs-md); line-height: var(--lh-md); text-align: left; font-weight: bold; }
h1.box_title {
	background: none; color: var(--text-strong); border-radius: 0; padding: 0 40px 0 0;
	margin: 0 0 var(--space-5); font-size: var(--fs-lg); line-height: var(--lh-lg); font-weight: var(--fw-semibold); text-align: left;
}
fieldset legend {
	background: none; color: var(--text-strong); border: 0; padding: 0; margin: 0 0 var(--space-2);
	font-size: var(--fs-base); font-weight: var(--fw-semibold);
}

/* valeurs d'une fiche : <strong>Libellé</strong><br/>valeur */
.callout_glb .cell > strong:first-child { display: block; font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-muted); margin-bottom: 2px; }
.callout_glb .grid-x > .cell { margin-bottom: var(--space-3); }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Boutons : .button seul = action principale ; .secondary, .hollow, .clear, .alert, .success, .warning             */
/* ---------------------------------------------------------------------------------------------------------------- */

/* un bouton caché par l'attribut hidden le reste (le display de .button l'emporterait sur celui du navigateur) */
.button[hidden] { display: none; }
/* .button.disabled, .button[disabled] : plus spécifiques que .button du thème, ils gardent ce fond et ces marges */
button, .button, .button.disabled, .button[disabled], .button.disabled:hover, .button[disabled]:hover,
.button.disabled:focus, .button[disabled]:focus { background-color: var(--secondary_color); color: var(--secondary_color_text); font-size: 1em; padding: 0.4em; }
body .btn {
	line-height: 1.42857143; white-space: nowrap; cursor: pointer;
	transition: opacity .1s ease, background-color .1s ease, color .1s ease, box-shadow .1s ease, background .1s ease;
}

.button, button.button, input[type="submit"].button, input[type="button"].button, .btn-standard, .btn-standard:hover {
	display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
	height: var(--control-h); padding: 0 14px; margin: 0;
	font-family: inherit; font-size: var(--fs-base); font-weight: var(--fw-medium); line-height: 1;
	text-decoration: none; text-transform: none; white-space: nowrap; cursor: pointer;
	background: var(--primary); color: var(--primary-on);
	border: 1px solid transparent; border-radius: var(--radius-md); box-shadow: var(--shadow-xs);
	transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}
.button:hover, .button:focus, .btn-standard:hover { background: var(--primary-hover); color: var(--primary-on); text-decoration: none; opacity: 1; }
.button:focus-visible { outline: var(--focus-outline); outline-offset: 2px; }

.button.secondary, .button.hollow.secondary, .jconfirm .btn-default {
	background: var(--bg-surface); color: var(--text); border-color: var(--gray-300);
}
.button.secondary:hover, .button.secondary:focus, .jconfirm .btn-default:hover { background: var(--bg-hover); color: var(--text-strong); border-color: var(--gray-400); }

.button.hollow { background: transparent; color: var(--primary-ink); border-color: var(--primary); box-shadow: none; }
.button.hollow:hover, .button.hollow:focus { background: var(--primary-tint); color: var(--primary-ink); }

.button.clear { background: transparent; color: var(--primary-ink); border-color: transparent; box-shadow: none; }
.button.clear:hover, .button.clear:focus { background: var(--primary-tint); color: var(--primary-ink); }

.button.alert, .jconfirm .btn-red { background: var(--danger); color: var(--danger-on); }
.button.alert:hover, .button.alert:focus, .jconfirm .btn-red:hover { background: var(--danger-hover); color: var(--danger-on); }
.button.alert.hollow { background: transparent; color: var(--danger-ink); border-color: var(--danger); }
.button.alert.hollow:hover, .button.alert.hollow:focus { background: var(--danger-tint); color: var(--danger-ink); }

.button.success { background: var(--success); color: var(--success-on); }
.button.success:hover { background: var(--success-hover); color: var(--success-on); }
.button.warning { background: var(--warning); color: var(--warning-on); }
.button.warning:hover { background: var(--warning-hover); color: var(--warning-on); }

.button.small { height: var(--control-h-sm); padding: 0 10px; font-size: var(--fs-sm); border-radius: var(--radius-sm); }
.button.tiny { height: 26px; padding: 0 8px; font-size: var(--fs-xs); border-radius: var(--radius-sm); }
.button.large { height: 44px; padding: 0 20px; font-size: var(--fs-md); }
.button.expanded { display: flex; width: 100%; }

.button.disabled, .button[disabled], button[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }

.button-group { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; }
.button-group .button { margin: 0; border-radius: var(--radius-md); }
.button-group .button.small { border-radius: var(--radius-sm); }
.button-group.align-right { justify-content: flex-end; }

/* boutons hérités Bootstrap et jquery-confirm : mêmes règles, sans majuscules */
body .btn {
	display: inline-flex; align-items: center; justify-content: center;
	height: var(--control-h); padding: 0 14px; font-family: inherit; font-size: var(--fs-base);
	font-weight: var(--fw-medium); text-transform: none; text-shadow: none; border-radius: var(--radius-md);
	background: var(--bg-surface); background-image: none; color: var(--text); border: 1px solid var(--gray-300);
	float: none; min-height: 0; box-shadow: none;
}
body .btn:hover { background: var(--bg-hover); color: var(--text-strong); }
body .btn.btn-primary, body .btn.btn-blue, body .btn.btn-green, body .btn.button { background: var(--primary); color: var(--primary-on); border-color: transparent; }
body .btn.btn-primary:hover, body .btn.btn-blue:hover, body .btn.btn-green:hover, body .btn.button:hover { background: var(--primary-hover); }
body .btn[type="submit"]:not(.close) { background: var(--primary); color: var(--primary-on); border-color: transparent; }
body .btn[type="submit"]:not(.close):hover { background: var(--primary-hover); color: var(--primary-on); }
body .btn.button.secondary { background: var(--bg-surface); color: var(--text); border-color: var(--gray-300); }
body .btn.button.secondary:hover { background: var(--bg-hover); color: var(--text-strong); border-color: var(--gray-400); }
body .btn.button.alert { background: var(--danger); color: var(--danger-on); }
body .btn.button.alert:hover { background: var(--danger-hover); }
body .btn.close { background: transparent; border: 0; opacity: 1; color: var(--gray-500); }
body .btn.close:hover { background: var(--bg-hover); color: var(--text-strong); }

/* boutons-icônes : actions de tableau, crayon de titre */
td > a.icon, td > span.icon[onclick], h1.details > a.icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 32px; height: 32px; border-radius: var(--radius-md);
	font-size: 16px; color: var(--gray-500); text-decoration: none;
}
td > a.icon:hover, td > span.icon[onclick]:hover, h1.details > a.icon:hover { background: var(--bg-hover); color: var(--primary-ink); }

@media (max-width: 639px) {
	/* button.button : un <button class="button"> a la même taille qu'un lien .button (règle générale plus haut) */
	.button, button.button, input[type="submit"].button, input[type="button"].button, body .btn { height: var(--control-h-touch); font-size: var(--fs-md); }
	.button.small, button.button.small { height: 40px; font-size: var(--fs-base); }
	td > a.icon { width: 44px; height: 44px; }
}

/* rangée de boutons des anciens dialogues (div.btn_row) : comme .button-group */
body .btn_row { float: none; clear: both; display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-6); padding: var(--space-4) 0 var(--space-6); border-top: 1px solid var(--border); }

/* boutons dans les sous-menus hérités (p.a_sub_menu) */
p.a_sub_menu { margin: 0 0 var(--space-4); text-align: left; }
p.a_sub_menu a.button, p.a_sub_menu span.button { color: var(--primary-on); text-decoration: none; }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Champs et formulaires                                                                                            */
/* ---------------------------------------------------------------------------------------------------------------- */

input:read-only { border: 1px solid var(--backgroundcolor); background-color: var(--internal_backgroundcolor); color: var(--text); }
input[type="text"]:disabled { border: 1px solid var(--backgroundcolor); background-color: var(--internal_backgroundcolor); color: var(--text); padding-left: var(--default_border_radius); }
.input-group > :last-child, .input-group > :last-child.input-group-button > * { border-radius: var(--default_border_radius); }
[type="text"]:focus, [type="password"]:focus, [type="date"]:focus, [type="datetime"]:focus, [type="datetime-local"]:focus,
[type="month"]:focus, [type="week"]:focus, [type="email"]:focus, [type="number"]:focus, [type="search"]:focus,
[type="tel"]:focus, [type="time"]:focus, [type="url"]:focus, [type="color"]:focus, textarea:focus {
	color: var(--text); padding-left: var(--default_border_radius);
}

[type="text"], [type="password"], [type="date"], [type="datetime"], [type="datetime-local"], [type="month"],
[type="week"], [type="email"], [type="number"], [type="search"], [type="tel"], [type="time"], [type="url"],
[type="color"], select, textarea, .input-group-field {
	display: block; width: 100%; height: var(--control-h); margin: 0;
	padding: 0 var(--space-3);
	font-family: inherit; font-size: var(--fs-base); line-height: var(--lh-base); color: var(--text-strong);
	background-color: var(--bg-surface);
	border: 1px solid var(--border-strong); border-radius: var(--radius-md);
	box-shadow: none;
	transition: border-color var(--ease);
}
textarea { height: auto; min-height: 88px; padding: var(--space-2) var(--space-3); resize: vertical; }
select {
	appearance: none; -webkit-appearance: none; padding-right: 36px; text-overflow: ellipsis; background-origin: border-box;
	background-image: var(--select-arrow);
	background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
select[multiple] { height: auto; background-image: none; padding: var(--space-1); }
::placeholder { color: var(--text-muted); background: transparent; opacity: 1; }

[type="text"]:focus, [type="password"]:focus, [type="email"]:focus, [type="number"]:focus, [type="search"]:focus,
[type="tel"]:focus, [type="url"]:focus, [type="date"]:focus, [type="time"]:focus, [type="datetime-local"]:focus,
select:focus, textarea:focus, .input-group-field:focus {
	border-color: var(--primary); box-shadow: var(--focus-ring); background-color: var(--bg-surface); outline: none;
}

input:disabled, input[readonly], select:disabled, textarea:disabled, textarea[readonly] {
	background-color: var(--bg-subtle); color: var(--text-muted); border-color: var(--border); box-shadow: none; cursor: default;
}
.is-invalid-input, input:user-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-tint); }

[type="checkbox"], [type="radio"] {
	width: 16px; height: 16px; margin: 0 6px 0 0; vertical-align: -3px; accent-color: var(--primary);
}
label { font-size: var(--fs-base); color: var(--text); }
label:has(> [type="checkbox"]), label:has(> [type="radio"]) {
	display: inline-flex !important; align-items: center; min-height: 32px; margin-right: var(--space-4) !important; cursor: pointer;
}

.form_fieldset { position: relative; display: flex; align-items: flex-start; gap: var(--space-4); width: 100%; min-width: 0; margin: 0 0 var(--space-3); padding: 0; border: 0; }
.form_fieldset > * { min-width: 0; }
input[type="file"] { max-width: 100%; height: 2.2em; }
/* colonne des libellés : 28 % de la largeur, jamais plus de 13rem (un grand dialogue ou une page large ne repousse
   pas les champs au milieu) */
.form_label, .form_label_long {
	display: inline-block; vertical-align: top; width: min(28%, 13rem); flex: 0 0 min(28%, 13rem);
	padding-top: 8px;
	text-align: left; font-size: var(--fs-sm); line-height: var(--lh-sm);
	font-weight: var(--fw-medium); color: var(--text-label);
}
.form_label_long { width: 45%; flex-basis: 45%; }
.form_input { display: inline-block; vertical-align: top; width: calc(72% - var(--space-4)); margin: 0 0 0 var(--space-4) !important; }
.form_input_long { display: inline-block; width: calc(55% - var(--space-4)); margin: 0 0 0 var(--space-4) !important; }
.form_fieldset > .form_input, .form_fieldset > .form_input_long { flex: 1 1 0; width: auto; max-width: 100%; margin: 0 !important; overflow-wrap: anywhere; }
span.form_input, small.form_input { padding-top: 8px; }
small.form_input em { font-style: normal; font-size: var(--fs-sm); color: var(--text-muted); }
.form_border_fieldset { padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-lg); }
/* formulaire en une colonne (libellé au-dessus du champ, à toute largeur) : un éditeur en pleine page (S1) */
.form_stacked .form_fieldset { flex-direction: column; align-items: stretch; gap: 0; }
.form_stacked .form_label, .form_stacked .form_label_long { display: block; width: 100%; flex-basis: auto; padding: 0 0 6px; }
.form_stacked .form_label:empty { display: none; }
.form_stacked .form_fieldset > .form_input, .form_stacked .form_fieldset > .form_input_long { flex: 0 0 auto; width: 100%; }

@media (max-width: 639px) {
	.form_fieldset { flex-direction: column; align-items: stretch; gap: 0; }
	.form_label, .form_label_long { display: block; width: 100%; flex-basis: auto; padding: 0 0 6px; }
	.form_label:empty { display: none; }
	.form_input, .form_input_long { display: block; width: 100%; margin: 0 !important; }
	.form_fieldset > .form_input, .form_fieldset > .form_input_long { flex: 0 0 auto; }
	[type="text"], [type="password"], [type="email"], [type="number"], [type="search"], [type="tel"], [type="url"],
	[type="date"], [type="time"], [type="datetime-local"], select, .input-group-field {
		height: var(--control-h-touch); font-size: var(--fs-md);
	}
	textarea { font-size: var(--fs-md); }
	[type="checkbox"], [type="radio"] { width: 20px; height: 20px; }
	label:has(> [type="checkbox"]), label:has(> [type="radio"]) { min-height: 44px; }
}

/* groupe libellé + champ (recherche, connexion) : le libellé devient un préfixe accolé */
.input-group { display: flex; align-items: stretch; width: 100%; margin: 0 0 var(--space-2); }
.input-group-label, div.input-group .input-group-label:has(+ input:read-only) {
	display: flex; align-items: center; flex: 0 0 auto; min-width: 120px; height: auto;
	padding: 0 var(--space-3); white-space: nowrap;
	background: var(--bg-subtle); color: var(--text-muted);
	font-size: var(--fs-sm); font-weight: var(--fw-medium);
	border: 1px solid var(--border-strong); border-right: 0;
	border-radius: var(--radius-md) 0 0 var(--radius-md) !important;
}
label.input-group-label { margin: 0; line-height: inherit; }   /* libellé relié à son champ (for) : même aspect qu'un span */
.input-group > .input-group-field, .input-group > select, .input-group > input { flex: 1 1 auto; width: auto; min-width: 0; border-radius: 0 var(--radius-md) var(--radius-md) 0 !important; }
.input-group > .input-group-field:first-child { border-radius: var(--radius-md) !important; }
.input-group-button > .button, .input-group-button > button { height: 100%; border-radius: 0 var(--radius-md) var(--radius-md) 0; }
@media (max-width: 639px) { .input-group-label { min-width: 96px; } }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Listes (tools/list/list.js, C1_ListView) : filtres, résultat, tri                                               */
/* ---------------------------------------------------------------------------------------------------------------- */

/* le formulaire de filtres reste visible en haut de la zone de travail quand la liste défile */
.list_filters, .list_filters.callout_glb_secondary {
	position: sticky; top: 0; z-index: 5;
	text-align: left; background: var(--bg-surface); border: 1px solid var(--border);
	border-radius: var(--radius-lg); padding: var(--space-4); margin-bottom: var(--space-4); box-shadow: var(--shadow-xs);
}
.list_filters fieldset { border: 0; padding: 0; margin: 0 0 var(--space-2); }
.list_filters fieldset > strong { display: block; font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.list_result { background-color: var(--internal_backgroundcolor); overflow-x: auto; overflow-y: visible; transition: opacity .15s; }
.list_result:focus { outline: none; }
/* chargement de plus de 200 ms : la liste s'estompe */
.list_result[aria-busy="true"] { opacity: .55; transition-delay: .2s; }
.list_result > p:first-of-type { margin: 0 0 var(--space-2); font-size: var(--fs-sm); color: var(--text-muted); }
@media (max-width: 639px) {
	.list_filters { padding: var(--space-3); }
}

/* en-tête de colonne triable (C1_ListView::header) : le bouton prend l'aspect de l'en-tête, flèche du sens */
.list_sort {
	display: inline-flex; align-items: center; gap: 4px; margin: 0; padding: 0; border: 0; background: none;
	font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer;
}
.list_sort:hover { color: var(--text-strong); }
.list_sort::after { content: "\2195"; font-size: 1.1em; line-height: 1; opacity: .35; }
th[aria-sort="ascending"] > .list_sort::after { content: "\2191"; opacity: 1; }
th[aria-sort="descending"] > .list_sort::after { content: "\2193"; opacity: 1; }
th[aria-sort] > .list_sort { color: var(--text-strong); }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Tableaux                                                                                                         */
/* ---------------------------------------------------------------------------------------------------------------- */

tbody tr:nth-child(2n) { background-color: transparent; }
table.admin_table { margin: 0; }
table.admin_table tbody { border: none; }
table.admin_table tbody th, table.admin_table tbody td { padding: 0; }
.container { overflow-y: auto; max-height: 100vh; }

.tableCSS {
	width: 100%; max-height: none; margin: 0 0 var(--space-4);
	border-collapse: separate !important; border-spacing: 0 !important;
	background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
	font-variant-numeric: tabular-nums;
}
.tableCSS th, .tableCSS td { box-shadow: none; border: 0; }
.tableCSS thead { position: sticky; top: 0; z-index: 2; }
table.tableCSS thead tr, table.tableCSS thead tr:hover { background: var(--bg-subtle); color: var(--text-muted); }
table.tableCSS thead th {
	padding: 10px var(--space-3); text-align: left; white-space: nowrap;
	font-size: var(--fs-xs); line-height: var(--lh-xs); font-weight: var(--fw-semibold);
	color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em;
	background: var(--bg-subtle); border-bottom: 1px solid var(--border);
}
.tableCSS thead tr:first-child th:first-child { border-top-left-radius: var(--radius-lg); }
.tableCSS thead tr:first-child th:last-child { border-top-right-radius: var(--radius-lg); }
.tableCSS tbody tr:last-child td:first-child { border-bottom-left-radius: var(--radius-lg); }
.tableCSS tbody tr:last-child td:last-child { border-bottom-right-radius: var(--radius-lg); }
table.tableCSS td {
	padding: var(--space-2) var(--space-3); line-height: var(--lh-base); vertical-align: middle;
	border-bottom: 1px solid var(--border); color: var(--text);
}
.tableCSS tbody tr:last-child td { border-bottom: 0; }
.tableCSS tbody, .tableCSS tfoot, .tableCSS tbody tr, .tableCSS tbody tr:nth-child(2n) { background: var(--bg-surface); color: var(--text); }
table.hover tbody tr:hover, table.hover:not(.unstriped) tr:nth-of-type(2n):hover { background: var(--bg-hover); color: var(--text); }
.tableCSS td:first-child a { color: var(--text-strong); font-weight: var(--fw-medium); text-decoration: var(--link-decoration); }
.tableCSS td:first-child a:hover { color: var(--primary-ink); text-decoration: underline; }
.tableCSS td:last-child { white-space: nowrap; }
/* ligne de total, collée sous l'en-tête quand la liste défile */
.tableCSS .total {
	position: sticky; top: 1.5em; z-index: 2; border: none; padding-left: 2px;
	background: var(--warning-tint); color: var(--text-strong); font-weight: var(--fw-semibold); height: auto;
}
table.tableCSS tbody tr.title { background: var(--bg-subtle); color: var(--text); font-weight: var(--fw-semibold); }

table.admin_table th { padding: 10px var(--space-3); font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; text-align: left; background: var(--bg-subtle); border-bottom: 1px solid var(--border); }
table.admin_table td { padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--border); }

@media (max-width: 639px) {
	.tableCSS td:first-child, .tableCSS th:first-child { position: sticky; left: 0; z-index: 1; background: inherit; }
	.tableCSS thead th:first-child { z-index: 3; }
	table.tableCSS td, table.tableCSS thead th { padding: 10px; }
}

/* tableau en cartes au téléphone (<table class="tableCSS table_cards">) : un tableau dont la dernière colonne porte des
   boutons ne défile pas en largeur, chaque ligne devient une carte et chaque cellule une ligne de la carte (titre
   facultatif : data-label="…") ; les colonnes .show-for-medium restent masquées, les boutons passent à la ligne.
   Modèles : RA1 > Automatismes, DEV > Intégrations, RA4 > Applications */
@media (max-width: 49.99875em) {
	table.tableCSS.table_cards, .table_cards > tbody, .table_cards > tbody > tr { display: block; width: 100%; }
	.table_cards > thead { display: none; }
	.table_cards > tbody > tr { padding: var(--space-2) 0; border-bottom: 1px solid var(--border); }
	.table_cards > tbody > tr:last-child { border-bottom: 0; }
	table.tableCSS.table_cards > tbody > tr > td { display: block; position: static; border: 0; padding: var(--space-1) var(--space-3); white-space: normal; overflow-wrap: anywhere; }
	table.tableCSS.table_cards > tbody > tr > td.show-for-medium { display: none; }
	.table_cards td[data-label]::before { content: attr(data-label); display: block; font-size: var(--fs-xs); line-height: var(--lh-xs); font-weight: var(--fw-semibold); color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
	.table_cards td .button-group { flex-direction: row; flex-wrap: wrap; gap: var(--space-1); margin: 0; }
	.table_cards td .button-group .button, .table_cards td > .button { width: auto; flex: 0 1 auto; margin: 0 var(--space-1) var(--space-1) 0; white-space: normal; height: auto; min-height: var(--control-h-touch); }
	.table_cards td .button-group .button { margin: 0; }
}
/* journal au téléphone (<table class="tableCSS table_wrap">) : garde ses colonnes et son tri, le texte long (chemin,
   identifiant) passe à la ligne au lieu d'élargir le tableau ; modèle : DEV > Intégrations, journal des appels */
@media (max-width: 49.99875em) {
	table.tableCSS.table_wrap td { white-space: normal; overflow-wrap: anywhere; }
	table.tableCSS.table_wrap td:first-child { overflow-wrap: normal; }
}

/* ---------------------------------------------------------------------------------------------------------------- */
/* Pagination (C1_ListView::pagination)                                                                             */
/* ---------------------------------------------------------------------------------------------------------------- */

/* petit écran : Foundation ne montre que la première et la dernière page ; on garde aussi les voisines */
@media screen and (max-width: 800px) {
	.pagination li:nth-child(-n+2), .pagination li.active, .pagination li:nth-last-child(-n+3),
	.pagination li.active + li, .pagination li.active + li + li { display: inline; }
}

.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--space-1); margin: var(--space-3) 0; padding: 0; list-style: none; }
.pagination > li, .pagination > li:hover { background: none; border: 0; padding: 0; font-size: var(--fs-base); }
.pagination > li > button, .pagination > li > span {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 32px; height: 32px; padding: 0 var(--space-2);
	border: 0; border-radius: var(--radius-md); background: transparent;
	color: var(--text); font-size: var(--fs-base); text-decoration: none;
}
.pagination > li > button { margin: 0; font-family: inherit; line-height: 1; cursor: pointer; }
.pagination > li > button:hover { background: var(--bg-hover); color: var(--text-strong); }
.pagination > .active > span { background: var(--primary); color: var(--primary-on); font-weight: var(--fw-semibold); }
.pagination > .disabled > span { color: var(--gray-400); background: transparent; }
@media (max-width: 639px) { .pagination > li > button, .pagination > li > span { min-width: 40px; height: 40px; } }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Étiquettes : pastilles douces ; une couleur de la base se passe par style="--tag:#xxxxxx"                        */
/* ---------------------------------------------------------------------------------------------------------------- */

.label {
	display: inline-flex; align-items: center; height: 22px; padding: 0 var(--space-2); margin: 0 4px 4px 0;
	border-radius: var(--radius-sm); border: 1px solid var(--border);
	background: var(--bg-hover); color: var(--text-label);
	font-size: var(--fs-xs); line-height: 1; font-weight: var(--fw-medium); white-space: nowrap; vertical-align: middle;
}
.label.tag, .label[style*="--tag"] {
	background: color-mix(in srgb, var(--tag) var(--tag-tint-weight), var(--bg-surface));
	color: color-mix(in srgb, var(--tag) var(--tag-ink-weight), var(--tag-mix));
	border-color: color-mix(in srgb, var(--tag) 40%, var(--bg-surface));
}
.label.primary { background: var(--primary-tint); color: var(--primary-ink); border-color: var(--primary-border); }
.label.secondary { background: var(--bg-hover); color: var(--text-label); }
.label.info { background: var(--info-tint); color: var(--info-ink); border-color: transparent; }
/* pastille de couleur seule (couleur d'un type, d'une application) : style="--tag:#rrggbb" */
.color_swatch { display: inline-block; width: 1em; height: 1em; vertical-align: middle; border-radius: 3px; background: var(--tag); border: 1px solid var(--border-strong); }
.label.success { background: var(--success-tint); color: var(--success-ink); border-color: transparent; }
.label.warning { background: var(--warning-tint); color: var(--warning-ink); border-color: transparent; }
.label.alert { background: var(--danger-tint); color: var(--danger-ink); border-color: transparent; }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Dialogues jquery-confirm                                                                                         */
/* ---------------------------------------------------------------------------------------------------------------- */

.jconfirm { z-index: 500; font-family: var(--font-sans); }
/* grille de jquery-confirm (classes de Bootstrap 3, reprises plus bas) : marges internes de 15 px, sans quoi la
   rangée (marges de -15 px) déborde en largeur sous le dialogue */
.jconfirm .jc-bs3-container { padding-left: 15px; padding-right: 15px; margin-left: auto; margin-right: auto; }
.jconfirm .jc-bs3-container [class*="col-"] { padding-left: 15px; padding-right: 15px; }
/* jquery-confirm centre la boîte dans un tableau (display: table) qui s'élargit au contenu le plus large (liste de
   choix aux options longues…) : largeur fixe, sinon le dialogue déborde de l'écran du téléphone */
.jconfirm .jconfirm-scrollpane { table-layout: fixed; }
.jconfirm .jconfirm-bg { background: var(--overlay) !important; opacity: 1 !important; }
/* boîte sans marge : bandeau de titre (couleur de l'instance) en haut, puis contenu et boutons avec leurs marges.
   Le titre d'une page de dialogue (h1.box_title) est remonté dans le bandeau par openSmall/Medium/LargeDialog. */
.jconfirm .jconfirm-box {
	background: var(--bg-surface); color: var(--text);
	border-radius: var(--radius-lg) !important; box-shadow: var(--shadow-lg); border: 0;
	padding: 0 !important; overflow: hidden;
}
.jconfirm .jconfirm-box div.jconfirm-title-c {
	margin: 0; padding: var(--space-4) 64px var(--space-4) var(--space-6); min-height: 0;
	background: var(--primary); color: var(--primary-on);
	font-size: var(--fs-lg); line-height: var(--lh-lg); font-weight: var(--fw-semibold);
}
.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-title { font-size: inherit; font-weight: inherit; color: inherit; }
.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c { color: inherit !important; margin-right: var(--space-2); }
.jconfirm .jconfirm-box div.jconfirm-title-c:has(.jconfirm-title:empty):has(.jconfirm-icon-c:empty) { display: none; }
.jconfirm .jconfirm-box div.jconfirm-closeIcon {
	display: flex !important; align-items: center; justify-content: center;
	top: 13px !important; right: 16px !important; width: 32px; height: 32px; line-height: 1 !important;
	border-radius: var(--radius-md); color: var(--gray-500); opacity: 1; font-size: 22px !important;
}
.jconfirm .jconfirm-box div.jconfirm-closeIcon:hover { background: var(--bg-hover); color: var(--text-strong); }
.jconfirm .jconfirm-box:has(.jconfirm-title:not(:empty)) div.jconfirm-closeIcon { color: var(--primary-on); }
.jconfirm .jconfirm-box:has(.jconfirm-title:not(:empty)) div.jconfirm-closeIcon:hover { background: color-mix(in srgb, var(--primary-on) 18%, transparent); color: var(--primary-on); }
.jconfirm .jconfirm-box div.jconfirm-content-pane { margin: 0; padding: var(--space-5) var(--space-6) 0; }
.jconfirm .jconfirm-box:has(.jconfirm-title:empty) div.jconfirm-content-pane { padding-top: var(--space-12); }
/* le contenu défile (overflow:auto) : 4 px de marge pour que l'anneau de focus des champs au bord ne soit pas rogné */
/* overflow visible (jquery-confirm : auto) : le volet du contenu reste seul à défiler, ce qui garde les boutons du
   formulaire collés en bas (position: sticky) ; flow-root contient les flottants comme le faisait overflow */
.jconfirm .jconfirm-box div.jconfirm-content-pane .jconfirm-content { margin: -4px; padding: 4px; font-size: var(--fs-base); overflow: visible; display: flow-root; }
.jconfirm .jconfirm-box .jconfirm-buttons { display: flex; justify-content: flex-end; gap: var(--space-2); float: none; padding: var(--space-5) var(--space-6) var(--space-6); }
.jconfirm .jconfirm-box div.jconfirm-content-pane:last-child, .jconfirm .jconfirm-box .jconfirm-buttons:empty { padding-bottom: var(--space-6); }
.jconfirm .jconfirm-box .jconfirm-buttons:empty { display: none; }
.jconfirm .jconfirm-box .jconfirm-buttons button, .jconfirm.jconfirm-light .jconfirm-box .jconfirm-buttons button,
.jconfirm.jconfirm-white .jconfirm-box .jconfirm-buttons button, .jconfirm.jconfirm-material .jconfirm-box .jconfirm-buttons button {
	margin: 0; text-transform: none; font-weight: var(--fw-medium); font-size: var(--fs-base);
}
/* boutons du formulaire d'un dialogue : toujours visibles, collés au bas du dialogue quand son contenu défile */
.jconfirm form .button-group {
	position: sticky; bottom: 0; z-index: 2; margin-top: var(--space-6); padding: var(--space-4) 0 var(--space-6);
	border-top: 1px solid var(--border); background: var(--bg-surface);
}
.jconfirm form .button-group .button.alert.hollow { margin-right: auto; }

@media (max-width: 639px) {
	.jconfirm .jconfirm-box-container { padding: var(--space-2) !important; }
	.jconfirm .jconfirm-box { border-radius: 16px !important; }
	.jconfirm .jconfirm-box div.jconfirm-title-c { padding-left: var(--space-4); }
	.jconfirm .jconfirm-box div.jconfirm-content-pane { padding-left: var(--space-4); padding-right: var(--space-4); }
	.jconfirm .jconfirm-box .jconfirm-buttons { padding-left: var(--space-4); padding-right: var(--space-4); }
	.jconfirm form .button-group .button { flex: 1 1 auto; }
}

/* jquery-confirm : bouton par défaut du thème « light » (sélecteur plus précis que celui du thème) et boîte en
   chargement */
.jconfirm.jconfirm-light .jconfirm-box .jconfirm-buttons button.btn-default { background: var(--bg-surface); color: var(--text); border: 1px solid var(--border-strong); }
.jconfirm.jconfirm-light .jconfirm-box .jconfirm-buttons button.btn-default:hover { background: var(--bg-hover); color: var(--text-strong); }
.jconfirm .jconfirm-box.loading::before { background: var(--bg-surface); }
.jconfirm .jconfirm-box div.jconfirm-content-pane::-webkit-scrollbar-thumb { background: var(--border-strong); }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Notifications et indicateur de chargement                                                                        */
/* ---------------------------------------------------------------------------------------------------------------- */

/* centre de notifications : cloche à côté du nom du compte (et dans la barre du téléphone), panneau #notify_panel
   sous la cloche sur ordinateur, feuille du bas au téléphone (js/layout.js) */
.notify_button {
	position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
	width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--radius-md); background: transparent;
	color: var(--text-muted); cursor: pointer;
}
.notify_button i { font-size: 20px; }
.notify_button:hover, .notify_button[aria-expanded="true"] { background: var(--bg-hover); color: var(--text-strong); }
.notify_button:focus-visible { outline: var(--focus-outline); outline-offset: 2px; }
.notify_button.has_unread { color: var(--text-strong); }
.notify_badge {
	position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px;
	border-radius: var(--radius-full); border: 2px solid var(--bg-surface);
	background: var(--danger); color: var(--danger-on);
	font-size: 11px; line-height: 14px; font-weight: var(--fw-semibold); text-align: center;
}
/* rien à lire mais des choses à traiter : un simple point, discret */
.notify_button.has_todo::after {
	content: ""; position: absolute; top: 8px; right: 8px; width: 8px; height: 8px;
	border-radius: var(--radius-full); background: var(--gray-400); border: 2px solid var(--bg-surface);
}
.title-bar .menu .notify_button {
	flex-direction: column; width: auto; min-width: 56px; height: 48px; padding: 0 var(--space-2); color: var(--gray-700);
}
.title-bar .menu .notify_button i { font-size: 22px; }
.title-bar .menu .notify_badge { top: 0; right: 6px; }
.title-bar .menu .notify_button.has_todo::after { top: 4px; right: 14px; }

.notify_panel {
	position: fixed; z-index: 1000; display: flex; flex-direction: column;
	width: 400px; max-width: calc(100vw - 16px); max-height: min(560px, calc(100vh - 80px));
	background: var(--bg-surface); color: var(--text);
	border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.notify_panel[hidden] { display: none; }
.notify_panel_head {
	display: flex; align-items: center; gap: var(--space-2);
	padding: var(--space-3) var(--space-3) var(--space-2) var(--space-4); border-bottom: 1px solid var(--border);
}
.notify_panel_head h2 { flex: 1 1 auto; margin: 0; font-size: var(--fs-md); line-height: var(--lh-md); font-weight: var(--fw-semibold); }
.notify_panel_head h2:focus { outline: none; }
.notify_panel_head h2:focus-visible { outline: var(--focus-outline); outline-offset: 2px; border-radius: var(--radius-sm); }
.notify_panel_head .button { margin: 0; }
.notify_close {
	display: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--radius-md);
	background: transparent; color: var(--text-muted); font-size: 18px; cursor: pointer;
}
.notify_close:hover { background: var(--bg-hover); color: var(--text-strong); }
.notify_panel_body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: var(--space-1) 0; }
.notify_panel_body h3 {
	margin: var(--space-2) var(--space-4) var(--space-1); font-size: var(--fs-xs); line-height: var(--lh-xs);
	font-weight: var(--fw-semibold); letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted);
}
.notify_panel ul { list-style: none; margin: 0; padding: 0 var(--space-2); }
.notify_todo { border-bottom: 1px solid var(--border); padding-bottom: var(--space-1); }
.notify_todo_item {
	display: flex; align-items: center; gap: var(--space-3); min-height: 40px; padding: 0 var(--space-2);
	border-radius: var(--radius-md); color: var(--text); text-decoration: none;
}
.notify_todo_item i { font-size: 18px; width: 22px; text-align: center; }
.notify_todo_label { flex: 1 1 auto; font-size: var(--fs-sm); }
.notify_count {
	min-width: 24px; padding: 1px 8px; border-radius: var(--radius-full); background: var(--bg-hover);
	font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-align: center; color: var(--text-strong);
}
.notify_item { position: relative; }
.notify_link {
	display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-2) 36px var(--space-2) var(--space-2);
	border-radius: var(--radius-md); color: var(--text); text-decoration: none;
}
.notify_todo_item:hover, .notify_link:hover { background: var(--bg-hover); color: var(--text-strong); text-decoration: none; }
.notify_todo_item:focus-visible, .notify_link:focus-visible { outline: var(--focus-outline); outline-offset: -2px; }
.notify_icon { font-size: 24px; margin-top: 2px; }
.notify_content { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.notify_item_title { font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--text); overflow-wrap: anywhere; }
.notify_item.is_unread .notify_item_title { font-weight: var(--fw-semibold); color: var(--text-strong); }
.notify_item_text {
	font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--text-muted); overflow-wrap: anywhere;
	display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.notify_meta { font-size: var(--fs-xs); line-height: var(--lh-xs); color: var(--text-muted); }
.notify_mark {
	position: absolute; top: 6px; right: 6px; display: inline-flex; align-items: center; justify-content: center;
	width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--radius-full); background: transparent; cursor: pointer;
}
.notify_mark:hover, .notify_mark:focus-visible { background: var(--primary-tint); outline: none; }
.notify_dot { width: 9px; height: 9px; border-radius: var(--radius-full); background: var(--primary); }
.notify_empty { margin: var(--space-6) var(--space-4); text-align: center; color: var(--text-muted); font-size: var(--fs-sm); }
.notify_panel_foot {
	display: flex; justify-content: space-between; gap: var(--space-3);
	padding: var(--space-2) var(--space-4); border-top: 1px solid var(--border); font-size: var(--fs-sm);
}
.notify_panel_foot a { color: var(--primary-ink); text-decoration: var(--link-decoration); font-weight: var(--fw-medium); }
.notify_panel_foot a:hover { text-decoration: underline; }
.notify_backdrop { position: fixed; inset: 0; z-index: 999; background: var(--overlay); }
.notify_backdrop[hidden] { display: none; }

/* téléphone : feuille du bas, presque tout l'écran, boutons à la taille du doigt */
.notify_panel.is_sheet {
	left: 0; right: 0; bottom: 0; top: auto; width: 100%; max-width: none; max-height: 88vh;
	border-radius: var(--radius-lg) var(--radius-lg) 0 0; border-bottom: 0;
	padding-bottom: env(safe-area-inset-bottom);
}
.notify_panel.is_sheet .notify_close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; }
.notify_panel.is_sheet .notify_link, .notify_panel.is_sheet .notify_todo_item { min-height: 44px; }
.notify_panel.is_sheet .notify_mark { width: 40px; height: 40px; top: 4px; }
.notify_panel.is_sheet .notify_panel_foot { padding-block: var(--space-3); }
body.notify_sheet_open { overflow: hidden; }

/* historique (Mon espace > Notifications > Historique) et préférences */
.notify_history_item.is_unread td:first-child { font-weight: var(--fw-semibold); }
.notify_history_title { display: flex; align-items: flex-start; gap: var(--space-2); }
.notify_history_title .notify_icon { font-size: 20px; }
.notify_prefs_app .notify_icon { font-size: 18px; margin: 0 var(--space-2) 0 var(--space-2); }
.notify_history_text { display: block; color: var(--text-muted); font-size: var(--fs-sm); font-weight: var(--fw-regular); white-space: pre-line; overflow-wrap: anywhere; }
.notify_prefs td, .notify_prefs th { vertical-align: middle; }
.notify_prefs .notify_pref_channel { text-align: center; width: 9rem; }
.notify_prefs select { margin: 0; min-width: 9rem; }
.notify_prefs input[type="checkbox"] { width: 20px; height: 20px; margin: 0; }
.notify_prefs_app th { background: var(--bg-subtle); text-align: left; }
.notify_device_status { margin: var(--space-2) 0; }
.notify_device_actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.notify_settings dt { font-weight: var(--fw-semibold); }
.notify_settings { display: grid; grid-template-columns: minmax(10rem, max-content) 1fr; gap: var(--space-1) var(--space-4); margin: 0 0 var(--space-3); }
.notify_settings dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.notify_settings code.notify_key { display: inline-block; max-width: 100%; overflow-wrap: anywhere; word-break: break-all; }
.notify_test_address { max-width: 20rem; margin: 0; }
.notify_error { color: var(--danger-ink); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.notify_device_actions .button { white-space: normal; text-align: left; height: auto; min-height: var(--control-h); padding-block: var(--space-2); }
/* téléphone : réglages en une colonne ; préférences en cartes (le type, puis ses trois canaux côte à côte) */
@media (max-width: 49.99875em) {
	.notify_settings { grid-template-columns: 1fr; }
	.notify_settings dd { margin-bottom: var(--space-2); }
	.notify_prefs, .notify_prefs tbody { display: block; width: 100%; }
	.notify_prefs thead { display: none; }
	.notify_prefs tr { display: grid; grid-template-columns: auto auto 1fr; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--border); }
	.notify_prefs tr > td:first-child, .notify_prefs_app th { grid-column: 1 / -1; }
	.notify_prefs td, .notify_prefs th { display: block; padding: 0; border: 0; }
	.notify_prefs .notify_pref_channel { width: auto; text-align: left; }
	.notify_prefs .notify_pref_channel::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: var(--fs-xs); color: var(--text-muted); }
	.notify_prefs select { min-width: 0; width: 100%; }
}
#global_ajax_loading_indicator {
	position: fixed; right: 12px; bottom: 12px; z-index: 100001;
	padding: 6px 12px; border-radius: var(--radius-full);
	background: var(--inverse-bg); color: var(--inverse-text); font-size: var(--fs-xs); box-shadow: var(--shadow-md);
}
/* « Page également ouverte par … » (présence, js/layout.js) */
#page_presence_banner, .page_presence_banner {
	background: var(--warning-tint); color: var(--text-strong);
	border: 1px solid var(--warning-border); border-left: 4px solid var(--warning);
	border-radius: var(--radius-md); padding: var(--space-2) var(--space-3); margin-bottom: var(--space-3); font-size: var(--fs-sm);
}
/* fiche ouverte qui change (« Cette fiche a été modifiée par … », page et dialogue) et liste qui a changé pendant que
   l'utilisateur agissait (« N modifications. Actualiser ») : C1_Changes, js/layout.js, tools/list/list.js */
.record_change_banner, .list_changes {
	display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2);
	background: var(--info-tint); color: var(--text-strong);
	border: 1px solid color-mix(in srgb, var(--info-ink) 35%, var(--info-tint)); border-left: 4px solid var(--info-ink);
	border-radius: var(--radius-md); padding: var(--space-2) var(--space-3); margin-bottom: var(--space-3); font-size: var(--fs-sm);
}
.record_change_banner[hidden] { display: none; }
.record_change_banner .icon-refresh-cw { align-self: flex-start; margin-top: 3px; }
.record_change_text { flex: 1 1 16rem; }
.record_change_banner .record_change_text:has(+ .button) { flex: 0 1 auto; }
.record_change_banner .button, .list_changes .button { margin: 0; }
.user_warning { color: var(--warning-ink); }
/* conflit champ par champ dans un dialogue (« Marie Durand a modifié les mêmes champs que vous… ») : pour chaque champ,
   « Garder la sienne » ou « Garder la vôtre » (C1_EditConflict, js/layout.js) */
.edit_conflict {
	background: var(--warning-tint); color: var(--text-strong);
	border: 1px solid var(--warning-border); border-left: 4px solid var(--warning);
	border-radius: var(--radius-md); padding: var(--space-3); margin-bottom: var(--space-4); font-size: var(--fs-sm);
}
.edit_conflict:focus { outline: var(--focus-outline); outline-offset: 2px; }
.edit_conflict_message { margin: 0 0 var(--space-2); }
.edit_conflict_message .icon-triangle-alert { color: var(--warning-ink); }
.edit_conflict_field { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-surface); padding: var(--space-2) var(--space-3); margin: 0 0 var(--space-2); }
.edit_conflict_field legend { font-weight: 600; padding: 0 var(--space-1); }
.edit_conflict_choice { display: flex; align-items: flex-start; gap: var(--space-2); margin: var(--space-1) 0; }
.edit_conflict_choice input { margin: 3px 0 0; flex: none; }
.edit_conflict_choice label { margin: 0; font-size: var(--fs-sm); color: var(--text); overflow-wrap: anywhere; }
.edit_conflict_value { white-space: pre-wrap; }
.edit_conflict_error { margin: var(--space-2) 0 0; font-weight: 600; }
/* avis discret en bas de l'écran (enregistrement fusionné avec le changement d'un autre : C1_Changes, js/layout.js) */
.amanela_notice {
	position: fixed; left: 50%; bottom: var(--space-4); transform: translateX(-50%); z-index: 100000;
	display: flex; align-items: center; gap: var(--space-2); max-width: min(40rem, calc(100vw - 2rem));
	background: var(--inverse-bg); color: var(--inverse-text); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
	padding: var(--space-2) var(--space-3); font-size: var(--fs-sm);
}
.amanela_notice[hidden] { display: none; }
.amanela_notice_text { flex: 1 1 auto; }
.amanela_notice .button { margin: 0; flex: none; }
#page_presence_banner .icon-triangle-alert, .page_presence_banner .icon-triangle-alert { margin-right: 4px; }
/* mot de passe compromis : icône du menu de l'utilisateur et bandeau du haut de page */
#pwd_compromised { margin: var(--space-3) var(--space-4) 0; display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
/* maintenance (C1_Maintenance, js/layout.js) : annoncée (planned), en cours pour qui est entré (inside), commencée
   pendant que la page était ouverte (down : au-dessus des dialogues, qui gardent leur saisie), finie (over) */
.maintenance_banner {
	display: flex; align-items: flex-start; gap: var(--space-2); padding: var(--space-2) var(--space-4);
	font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--text-strong);
	background: var(--warning-tint); border-bottom: 1px solid var(--warning-border);
}
.maintenance_banner i { color: var(--warning-ink); font-size: var(--fs-md); }
.maintenance_banner.is_inside { background: var(--danger-tint); border-bottom-color: var(--danger-border); }
.maintenance_banner.is_inside i { color: var(--danger-ink); }
.maintenance_banner.is_down { position: fixed; top: 0; left: 0; right: 0; z-index: 100000000; box-shadow: var(--shadow-md); border-bottom-width: 2px; }
.maintenance_banner.is_over { background: var(--success-tint); border-bottom-color: var(--success-border); }
.maintenance_banner.is_over i { color: var(--success-ink); }
/* saisie mise de côté quand la session a expiré (js/layout.js, AmanelaLogin) : « Reprendre votre saisie », « Ignorer » */
.draft_banner {
	display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-3); margin: var(--space-3) var(--space-4) 0;
	padding: var(--space-2) var(--space-3); font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--text-strong);
	background: var(--info-tint); border: 1px solid var(--border); border-radius: var(--radius-md);
}
.draft_banner > i { color: var(--info-ink); font-size: var(--fs-md); }
.draft_banner_text { flex: 1 1 16rem; }
.draft_banner_buttons { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.draft_banner_buttons .button { margin: 0; }
/* écrans Activité, Mes sessions, Maintenance */
.session_current { font-weight: var(--fw-semibold); }
.session_dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--gray-300); vertical-align: middle; }
.session_dot.is_active { background: var(--success); }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Connexion                                                                                                        */
/* ---------------------------------------------------------------------------------------------------------------- */

.login_page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--space-6) var(--space-4); background: var(--bg-page); }
.login_logo { margin-bottom: var(--space-6); }
.login_logo img { height: 56px; width: auto; border-radius: var(--radius-lg); }
.login_card { width: 100%; max-width: 400px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: var(--space-8) var(--space-6); }
.login_card h1.box_title { font-size: var(--fs-xl); line-height: var(--lh-xl); margin-bottom: var(--space-6); padding: 0; }
.login_field { margin-bottom: var(--space-4); }
.login_field label { display: block; margin-bottom: 6px; font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--gray-700); }
.login_field input { height: var(--control-h-touch); font-size: var(--fs-md); }
.login_password { position: relative; }
.login_password input { padding-right: 48px; }
.login_password .toggle-password { position: absolute; top: 0; right: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--gray-500); box-shadow: none; cursor: pointer; }
.login_card .button.expanded { height: var(--control-h-touch); font-size: var(--fs-md); margin-top: var(--space-2); }
.login_tips { min-height: var(--lh-sm); font-size: var(--fs-sm); color: var(--danger-ink); margin-bottom: var(--space-2); }
.password-reset-toggle { background: none; border: 0; padding: 0; margin-top: var(--space-5); color: var(--primary-ink); font-size: var(--fs-sm); font-weight: var(--fw-medium); cursor: pointer; }
.password-reset-body { margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--border); }
.password-reset-help { font-size: var(--fs-sm); color: var(--text-muted); }
.webauthn-divider { color: var(--text-muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; text-align: center; margin: var(--space-4) 0; }
.webauthn-btn, .button.webauthn-btn { width: 100%; height: auto; min-height: var(--control-h-touch); white-space: normal; gap: var(--space-2); padding: var(--space-2) var(--space-4); line-height: var(--lh-base); }
#webauthn-status:empty { display: none; }
.password-reset-caret { display: inline-block; margin-left: var(--space-1); transition: transform var(--ease); }
.password-reset-toggle[aria-expanded="true"] .password-reset-caret { transform: rotate(180deg); }
/* .toggle-password : afficher le mot de passe */
.input-group .toggle-password { display: flex; align-items: center; height: 100%; padding: 0 0.75rem; background: transparent; border: none; color: var(--text); cursor: pointer; }
.input-group .toggle-password:hover, .input-group .toggle-password:focus { color: var(--primary-ink); background: transparent; }
.input-group .toggle-password:focus { outline: none; }
/* connexion intégrée à l'accueil mobile : la carte suffit */
.login-panel { background: none; box-shadow: none; padding: 0; }
.login-panel .login_page { min-height: 0; padding: 0; }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Accueil (bureau)                                                                                                 */
/* ---------------------------------------------------------------------------------------------------------------- */

.home { max-width: 1120px; margin: 0 auto; padding: var(--space-10) var(--space-6); overflow-y: auto; height: 100%; }
.home_title { font-size: var(--fs-2xl); line-height: var(--lh-2xl); font-weight: var(--fw-semibold); letter-spacing: -0.02em; }
.home_subtitle { color: var(--text-muted); margin: var(--space-1) 0 var(--space-8); }
.home_section { font-size: var(--fs-xs); line-height: var(--lh-xs); font-weight: var(--fw-semibold); color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin: var(--space-6) 0 var(--space-3); }
.home_grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-3); }
.home_tile {
	display: flex; align-items: center; gap: var(--space-3);
	padding: var(--space-4); min-height: 72px;
	background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
	box-shadow: var(--shadow-xs); color: var(--text); text-decoration: none;
	transition: border-color var(--ease), box-shadow var(--ease);
}
.home_tile:hover { border-color: var(--gray-300); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--text-strong); }
.home_tile .app_icon { font-size: 40px; }
.home_tile strong { display: block; font-size: var(--fs-base); font-weight: var(--fw-semibold); color: var(--text-strong); }
.home_tile small { display: block; font-size: var(--fs-xs); color: var(--text-muted); }
.home .callout_glb { margin-top: var(--space-8); }
@media (max-width: 639px) {
	.home { padding: var(--space-6) var(--space-4); }
	.home_grid { grid-template-columns: 1fr; }
}

/* Mon tableau de bord (C1_Dashboard, js/dashboard.js) : grille de blocs (une colonne au téléphone ; « Large » : toute
   la largeur) ; « Personnaliser » : outils de chaque bloc (poignée, Monter, Descendre, Large, Retirer) et catalogue */
.dashboard { margin: 0 0 var(--space-8); }
.dashboard_header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-6) 0 var(--space-3); }
.dashboard_header .home_section { margin: 0; }
.dashboard_header .button { margin: 0; }
.dashboard_empty { margin: 0 0 var(--space-3); }
.dashboard_grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: var(--space-4); align-items: start; }
.dashboard_item { min-width: 0; margin: 0; }
.dashboard_item.is_wide { grid-column: 1 / -1; }
.home .dashboard_item .block { margin: 0; }
.dashboard_item .block_body { overflow-x: auto; }
.dashboard_item .block_body .tableCSS { margin-bottom: 0; }
.dashboard_tools { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-1); padding: var(--space-1) var(--space-2); border: 1px dashed var(--border-strong); border-bottom: 0; border-radius: var(--radius-md) var(--radius-md) 0 0; background: var(--bg-subtle); }
.dashboard_tools[hidden] { display: none; }
.dashboard_tools .button { margin: 0; }
.dashboard_tools .button[aria-pressed="true"] { background: var(--primary-tint); border-color: var(--primary-border); color: var(--primary-ink); }
.dashboard_handle { margin-right: auto; padding: var(--space-1) var(--space-2); color: var(--text-muted); cursor: grab; font-size: var(--fs-lg); line-height: 1; }
.dashboard.is_editing .dashboard_item .block { border-style: dashed; border-top-left-radius: 0; border-top-right-radius: 0; }
/* place du bloc pendant qu'on le glisse (SortableJS : Libraries.sortable) */
.dashboard_item.lib_sortable_ghost { border: 2px dashed var(--primary-border); background: var(--primary-tint); }
.home .dashboard_catalog { margin-top: var(--space-4); }
.dashboard_catalog_title { margin: 0 0 var(--space-2); font-size: var(--fs-lg); }
.dashboard_catalog_list { list-style: none; margin: 0 0 var(--space-3); padding: 0; }
.dashboard_catalog_list > li { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--border); }
.dashboard_catalog_list > li[hidden] { display: none; }
.dashboard_catalog_list .button { margin: 0; flex: 0 0 auto; }
.dashboard_catalog_text { flex: 1 1 auto; min-width: 0; }
.dashboard_catalog_text strong { display: block; color: var(--text-strong); }
.dashboard_catalog_text small { display: block; color: var(--text-muted); font-size: var(--fs-sm); }
.dashboard_catalog[hidden], .dashboard_empty[hidden], .dashboard_catalog_empty[hidden] { display: none; }
.dashboard_catalog .button-group { margin: 0; }
.dashboard_catalog .button-group .button { margin-bottom: 0; }
@media (max-width: 639px) {
	.dashboard_catalog_list > li { flex-wrap: wrap; }
	.dashboard_catalog_text { flex-basis: 100%; }
}
@media (forced-colors: active) {
	.dashboard_item.lib_sortable_ghost, .dashboard_tools { border-color: CanvasText; }
	.dashboard_tools .button[aria-pressed="true"] { outline: 2px solid Highlight; }
}

/* ---------------------------------------------------------------------------------------------------------------- */
/* Accueil mobile (phone_home.php)                                                                                  */
/* ---------------------------------------------------------------------------------------------------------------- */

.phone_home { background: var(--bg-page); min-height: 100vh; min-height: 100dvh; padding: var(--space-6) var(--space-4) var(--space-12); }
.phone-home-wrapper { max-width: 480px; margin: 0 auto; }
.phone-header { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-6); text-align: left; }
.phone-header img { height: 40px; width: auto; border-radius: var(--radius-md); }
.phone-header h1 { font-size: var(--fs-xl); line-height: var(--lh-xl); }
.home-shortcuts { display: flex; flex-direction: column; gap: var(--space-2); }
.home-shortcut-card {
	display: flex; align-items: center; gap: var(--space-3);
	min-height: 72px; padding: var(--space-3) var(--space-4);
	background: var(--bg-surface) !important;
	border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-xs);
	color: var(--text); text-decoration: none;
}
.home-shortcut-card:hover { text-decoration: none; color: var(--text); }
.home-shortcut-card:active { background: var(--bg-hover) !important; }
.shortcut-icon {
	flex: 0 0 44px; width: 44px; height: 44px; border-radius: var(--radius-lg);
	display: flex; align-items: center; justify-content: center; font-size: 22px;
	background: color-mix(in srgb, var(--card_color, var(--primary)) var(--tag-tint-weight), var(--bg-surface));
	color: color-mix(in srgb, var(--card_color, var(--primary)) var(--tag-ink-weight), var(--tag-mix));
}
.shortcut-text { flex: 1 1 auto; min-width: 0; }
.home-shortcut-card strong { display: block; font-size: var(--fs-md); line-height: 22px; font-weight: var(--fw-semibold); color: var(--text-strong); }
.home-shortcut-card small { display: block; font-size: var(--fs-sm); color: var(--text-muted); opacity: 1; }
.home-shortcut-card::after { content: "›"; font-size: 22px; color: var(--gray-400); }
.home-shortcut-card.is-secondary .shortcut-icon { background: var(--gray-100); color: var(--gray-700); }
.phone_empty { text-align: center; padding: var(--space-8) var(--space-4); color: var(--text-muted); border: 1px dashed var(--gray-300); border-radius: 14px; }
.home-secondary { margin-top: var(--space-6); text-align: center; }
.home-secondary form { display: inline; margin: 0; }
.home-secondary a, .home-secondary .home_logout { display: inline-flex; align-items: center; height: 44px; padding: 0 var(--space-4); color: var(--primary-ink); font-weight: var(--fw-medium); background: none; border: 0; }
.home-secondary .home_logout { font: inherit; font-weight: var(--fw-medium); color: var(--danger-ink); cursor: pointer; }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Clés d'accès (WebAuthn) : connexion (login.dlg.php) et Mon compte (RA1, js/webauthn.js)                          */
/* ---------------------------------------------------------------------------------------------------------------- */

.webauthn_keys .webauthn_add { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-bottom: var(--space-3); }
.webauthn_keys .webauthn_add input { flex: 1 1 14em; max-width: 24em; margin: 0; }
.webauthn_keys .webauthn_add .button { margin: 0; }
.webauthn_keys .webauthn_status:empty { display: none; }
.webauthn_keys .webauthn_status { font-size: var(--fs-sm); color: var(--text-muted); }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Double authentification et annuaires (login.dlg.php : étapes ; Mon compte ; RA1 > Annuaires)                     */
/* ---------------------------------------------------------------------------------------------------------------- */

.login_step[hidden] { display: none; }
.login_directories { display: flex; flex-direction: column; gap: var(--space-2); }
.login_directories .button.login_directory { margin: 0; height: auto; min-height: var(--control-h-touch); white-space: normal; gap: var(--space-2); }
.login_fallback { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--border); }
/* le contenu d'un <details> n'hérite pas de box-sizing (fente interne du navigateur) : rétabli ici */
.login_fallback * { box-sizing: border-box; }
.login_fallback > summary { cursor: pointer; color: var(--primary-ink); font-size: var(--fs-sm); font-weight: var(--fw-medium); margin-bottom: var(--space-3); }
.login_links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); }
.login_links .password-reset-toggle { margin-top: var(--space-3); }
.two_factor_qr { display: flex; justify-content: center; margin: var(--space-3) auto; }
.two_factor_qr svg { width: 200px; height: 200px; max-width: 100%; border: 1px solid var(--border); border-radius: var(--radius-md); }
.two_factor_qr:empty { min-height: 200px; }
.two_factor_secret { display: inline-block; margin-top: var(--space-1); font-size: var(--fs-sm); letter-spacing: .04em; word-break: break-all; }
.two_factor_codes { columns: 2; column-gap: var(--space-6); margin: var(--space-3) 0 var(--space-4) var(--space-6); font-family: var(--font-mono); font-size: var(--fs-md); }
.two_factor_codes li { margin-bottom: var(--space-1); }
.two_factor_box .button-group { margin-bottom: 0; }
.identity_link { display: inline-block; margin: 0 var(--space-2) var(--space-2) 0; }
.identity_admin_link { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.identity_admin_link select, .identity_admin_link input { flex: 1 1 12em; margin: 0; }
.identity_admin_link .button { margin: 0; }
.directory_rules { display: grid; grid-template-columns: minmax(10rem, 13rem) 1fr; gap: var(--space-2) var(--space-4); margin: 0 0 var(--space-3); }
.directory_rules dt { font-weight: var(--fw-semibold, 600); }
.directory_rules dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.directory_rules code { overflow-wrap: anywhere; word-break: break-all; }
@media screen and (max-width: 49.99em) { .directory_rules { grid-template-columns: 1fr; gap: var(--space-1); } .directory_rules dd { margin-bottom: var(--space-3); } }
.directory_actions { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.directory_actions .button { margin: 0; }
.directory_mapping { margin: 0; }
.directory_mapping input, .directory_mapping select { margin: 0; }
.directory_checks { list-style: none; margin: 0; }
.directory_checks li { padding: var(--space-2) var(--space-3); margin-bottom: var(--space-1); border-radius: var(--radius-md); }
.directory_checks li.is_ok { background: var(--success-tint); color: var(--success-ink); }
.directory_checks li.is_ko { background: var(--danger-tint); color: var(--danger-ink); }
.directory_checks small { word-break: break-all; }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Accès API (RA1 : comptes non humains, clés, journal des appels ; Mon compte : délégations)                       */
/* ---------------------------------------------------------------------------------------------------------------- */

.api_access_tabs { margin-bottom: var(--space-3); }
.api_access_tabs .button { margin-bottom: 0; }
.tableCSS tr.row_inactive td { opacity: .6; }
.api_access_actions { flex-wrap: nowrap; gap: var(--space-1); margin: 0; }
.tableCSS td.api_access_account { min-width: 16em; white-space: normal; }
.tableCSS td.api_access_account code { font-size: var(--fs-xs); }
.api_access_actions .button { margin: 0; }
.api_access_muted { color: var(--text-muted); font-size: var(--fs-sm); }
.api_access_secret { display: block; padding: var(--space-2) var(--space-3); margin: var(--space-1) 0 var(--space-3); word-break: break-all;
	background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius-md); user-select: all; }
.api_access_delegation_add { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-bottom: var(--space-3); }
.api_access_delegation_add select, .api_access_delegation_add input { flex: 1 1 12em; max-width: 22em; margin: 0; }
.api_access_delegation_add .button { margin: 0; }
/* écritures directes de l'IA (RA1, fiche d'une personne) : application, date de fin, Autoriser */
.ai_direct_add { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-bottom: var(--space-2); }
.ai_direct_add select, .ai_direct_add input { flex: 1 1 12em; max-width: 22em; margin: 0; }
.ai_direct_add .button { margin: 0; }
textarea.api_access_ips { min-height: 4.5em; font-family: var(--font-mono); font-size: var(--fs-sm); }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Compte d'une personne (RA1 : Mon compte, dialogue d'un utilisateur) ; Mes boutons smartphone                     */
/* ---------------------------------------------------------------------------------------------------------------- */

/* titre d'une partie d'un formulaire long (Identité, Mot de passe…) */
.form_section_title {
	font-size: var(--fs-base); line-height: var(--lh-base); font-weight: var(--fw-semibold); color: var(--text-strong);
	margin: var(--space-5) 0 var(--space-3); padding-bottom: var(--space-2); border-bottom: 1px solid var(--border);
}
.form_section_title:first-of-type { margin-top: 0; }
/* bloc repliable d'un dialogue ou d'une fiche : titre et état résumé, contenu à l'ouverture */
details.fold_section { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-surface); margin: 0 0 var(--space-2); }
details.fold_section * { box-sizing: border-box; }
details.fold_section > summary {
	display: flex; align-items: center; gap: var(--space-2); cursor: pointer; list-style: none;
	padding: var(--space-3) var(--space-4); font-weight: var(--fw-medium); color: var(--text-strong);
}
details.fold_section > summary::-webkit-details-marker { display: none; }
details.fold_section > summary::before { content: "›"; display: inline-block; width: 1em; color: var(--text-muted); transition: transform var(--ease); }
details.fold_section[open] > summary::before { transform: rotate(90deg); }
details.fold_section > summary:hover { background: var(--bg-hover); }
details.fold_section[open] > summary { border-bottom: 1px solid var(--border); }
details.fold_section > .fold_body { padding: var(--space-3) var(--space-4); }
details.fold_section > .fold_body > :last-child { margin-bottom: 0; }
.account_section h2 > .label { margin-left: var(--space-2); vertical-align: middle; font-weight: var(--fw-medium); }
.account_section p { margin: 0 0 var(--space-2); }
.account_section .button-group, .account_section > p:last-child { margin-bottom: 0; }
/* Journal des accès et historique d'une fiche d'administration (RA1) : détail d'un changement, une ligne par champ */
ul.log_details { margin: var(--space-1) 0 0; padding-left: 1.1em; font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--text-muted); }
ul.log_details > li { margin: 0; overflow-wrap: anywhere; }
table.log_history td { vertical-align: top; }
.account_dialog_title, .account_group_title { font-size: var(--fs-md); line-height: var(--lh-md); font-weight: var(--fw-semibold); color: var(--text-strong); margin: var(--space-6) 0 var(--space-3); }
.account_group_title { margin-top: var(--space-2); }
.form_fieldset > .account_short_input { max-width: 8rem; }
.form_fieldset > .account_color_input { max-width: 8rem; padding: 2px; }
.account_choices { display: flex; flex-wrap: wrap; column-gap: var(--space-4); }
.account_units { display: block; max-height: 14em; overflow: auto; padding: var(--space-1) var(--space-2) !important; border: 1px solid var(--border); border-radius: var(--radius-md); }
.account_units > label { display: flex !important; padding-left: calc(var(--level, 0) * 1.5em); margin-right: 0 !important; }
.account_photo img { display: block; width: 100%; max-width: 160px; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-lg); border: 1px solid var(--border); margin-bottom: var(--space-3); }
.account_photo img[hidden] { display: none; }
.account_photo form { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.account_photo form .button { margin: 0; }
.account_display_modes { border: 0; padding: 0; margin: 0 0 var(--space-2); display: flex; flex-direction: column; }
.account_actions { display: inline-flex; flex-wrap: wrap; gap: var(--space-1); }
.account_actions .button { margin: 0; }
.account_security .identity_link { margin-bottom: var(--space-2); }

/* Mes boutons smartphone : boutons choisis (rangés par glisser-déposer ou flèches) et catalogue */
.phone_shortcut_list { list-style: none; margin: 0 0 var(--space-3); padding: 0; }
.phone_shortcut {
	display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); margin-bottom: var(--space-2);
	border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-surface); box-shadow: var(--shadow-xs);
}
.phone_shortcut_handle { cursor: grab; color: var(--text-muted); font-size: var(--fs-lg); }
.phone_shortcut_icon {
	flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
	border-radius: var(--radius-md); background: var(--primary-tint); color: var(--primary-ink); font-size: 18px;
}
.phone_shortcut_text { flex: 1 1 0; min-width: 0; }
.phone_shortcut_text strong { display: block; color: var(--text-strong); }
.phone_shortcut_text small { display: block; color: var(--text-muted); font-size: var(--fs-sm); }
.phone_shortcut_actions { flex: 0 0 auto; display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-1); }
.phone_shortcut_actions .button { margin: 0; }
.phone_shortcut_group { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-label); text-transform: uppercase; letter-spacing: .04em; margin: var(--space-3) 0 var(--space-2); }
@media (max-width: 639px) {
	.phone_shortcut { flex-wrap: wrap; }
	.phone_shortcut_handle { display: none; }
	.phone_shortcut_actions { flex-basis: 100%; justify-content: flex-start; }
	.phone_shortcut_actions .button { min-height: var(--control-h-touch); }
	details.fold_section > summary { min-height: var(--control-h-touch); }
}

/* opérations d'API (DEV) : phrase de l'opération et accords dans la liste */
.api_operation_summary { color: var(--text); font-size: var(--fs-sm); }
.api_operation_keys { color: var(--text-muted); }
.tableCSS.api_operations td:first-child { white-space: normal; min-width: 14em; }
.tableCSS.api_operations td .button { margin: 0 var(--space-1) var(--space-1) 0; }
@media (max-width: 639px) { .tableCSS.api_operations td .button { white-space: normal; text-align: left; height: auto; min-height: var(--control-h-sm); padding-top: var(--space-1); padding-bottom: var(--space-1); line-height: var(--lh-sm); } }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Liaisons entre applications (C1_References) : objet lié absent ou supprimé, bloc « Utilisé par »                  */
/* ---------------------------------------------------------------------------------------------------------------- */

.reference_none, .reference_missing { color: var(--text-muted); }
.reference_missing { font-style: italic; }
.references_used_by small { color: var(--text-muted); }
.references_used_by ul ul { margin-top: var(--space-1); margin-bottom: var(--space-2); }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Markdown (C1_Markdown) : rendu (.markdown_body), blocs, éditeur visuel des <textarea data-markdown>          */
/* ---------------------------------------------------------------------------------------------------------------- */

.markdown_body { color: var(--text); font-size: var(--fs-base); line-height: 1.6; overflow-wrap: anywhere; }
.markdown_body > :first-child { margin-top: 0; }
.markdown_body > :last-child { margin-bottom: 0; }
.markdown_body p, .markdown_body ul, .markdown_body ol, .markdown_body blockquote, .markdown_body pre, .markdown_body table { margin: 0 0 var(--space-3); }
.markdown_body h1, .markdown_body h2, .markdown_body h3, .markdown_body h4, .markdown_body h5, .markdown_body h6 {
	margin: var(--space-5) 0 var(--space-2); color: var(--text-strong); font-weight: var(--fw-semibold);
}
.markdown_body h1 { font-size: var(--fs-xl); line-height: var(--lh-xl); }
.markdown_body h2 { font-size: var(--fs-lg); line-height: var(--lh-lg); }
.markdown_body h3 { font-size: var(--fs-md); line-height: var(--lh-md); }
.markdown_body h4, .markdown_body h5, .markdown_body h6 { font-size: var(--fs-base); line-height: var(--lh-base); }
.markdown_body .heading_anchor { margin-left: var(--space-2); color: var(--text-muted); text-decoration: none; opacity: 0; transition: opacity var(--ease); }
.markdown_body :is(h1, h2, h3, h4, h5, h6):hover .heading_anchor, .markdown_body .heading_anchor:focus-visible { opacity: 1; }
.markdown_body ul, .markdown_body ol { padding-left: var(--space-6); margin-left: 0; }
.markdown_body li > ul, .markdown_body li > ol { margin-bottom: 0; }
.markdown_body li:has(> input[type="checkbox"]) { list-style: none; margin-left: calc(-1 * var(--space-5)); }
.markdown_body li > input[type="checkbox"] { margin: 0 var(--space-2) 0 0; vertical-align: middle; }
.markdown_body a { color: var(--primary-ink); text-decoration: underline; text-underline-offset: 2px; }
.markdown_body blockquote { padding: var(--space-1) var(--space-4); border-left: 3px solid var(--border-strong); color: var(--text-muted); background: var(--bg-subtle); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.markdown_body code { font-family: var(--font-mono); font-size: .92em; padding: 1px var(--space-1); border-radius: var(--radius-sm); background: var(--bg-hover); }
.markdown_body pre { padding: var(--space-3); overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-subtle); }
.markdown_body pre code { padding: 0; background: none; font-size: var(--fs-sm); }
.markdown_body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.markdown_body th, .markdown_body td { padding: var(--space-1) var(--space-3); border: 1px solid var(--border); text-align: left; vertical-align: top; }
/* dans une cellule, un mot ne se coupe pas lettre à lettre (overflow-wrap: anywhere du texte réduirait une colonne à un
   caractère) : le tableau défile plutôt en largeur */
.markdown_body th, .markdown_body td { overflow-wrap: normal; min-width: 4em; }
.markdown_body th { background: var(--bg-subtle); font-weight: var(--fw-semibold); }
.markdown_body img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.markdown_body hr { margin: var(--space-4) 0; border: 0; border-top: 1px solid var(--border); }
.markdown_body del { color: var(--text-muted); }
.markdown_truncated, .markdown_empty { color: var(--text-muted); font-size: var(--fs-sm); }


/* blocs repliables et encadrés (:::details, :::info, :::warning, :::danger ; C1_MarkdownDirectives) */
.markdown_body details.md_details, .md_editor_directive.is_details {
	margin: 0 0 var(--space-3); border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--bg-surface);
}
.markdown_body details.md_details > summary {
	display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); cursor: pointer;
	color: var(--text-strong); font-weight: var(--fw-semibold); list-style: none; border-radius: var(--radius-md);
}
.markdown_body details.md_details > summary::-webkit-details-marker { display: none; }
.markdown_body details.md_details > summary::before {
	content: "\ea69"; display: inline-block; font-family: IcoFont; font-weight: normal; color: var(--text-muted); transition: transform var(--ease);
}
.markdown_body details.md_details[open] > summary::before { transform: rotate(90deg); }
.markdown_body details.md_details > summary:hover { background: var(--bg-hover); }
.markdown_body details.md_details[open] > summary { border-bottom: 1px solid var(--border); border-radius: var(--radius-md) var(--radius-md) 0 0; }
.markdown_body .md_details_body { padding: var(--space-3); }
.markdown_body .md_details_body > :last-child, .markdown_body .md_callout > :last-child { margin-bottom: 0; }
.markdown_body .md_callout, .md_editor_directive.is_info, .md_editor_directive.is_warning, .md_editor_directive.is_danger {
	position: relative; margin: 0 0 var(--space-3); padding: var(--space-3) var(--space-4) var(--space-3) calc(var(--space-4) + 24px);
	border: 1px solid var(--callout-border); border-left-width: 4px; border-radius: var(--radius-md); background: var(--callout-tint); color: var(--text-strong);
}
.markdown_body .md_callout::before, .md_editor_directive:not(.is_details)::before {
	position: absolute; left: var(--space-3); top: var(--space-3); font-family: IcoFont; font-size: 18px; line-height: var(--lh-base); color: var(--callout-ink);
}
.markdown_body .md_callout.is_info, .md_editor_directive.is_info { --callout-tint: var(--info-tint); --callout-ink: var(--info-ink); --callout-border: color-mix(in srgb, var(--info-ink) 35%, var(--info-tint)); }
.markdown_body .md_callout.is_warning, .md_editor_directive.is_warning { --callout-tint: var(--warning-tint); --callout-ink: var(--warning-ink); --callout-border: var(--warning-border); }
.markdown_body .md_callout.is_danger, .md_editor_directive.is_danger { --callout-tint: var(--danger-tint); --callout-ink: var(--danger-ink); --callout-border: var(--danger-border); }
.markdown_body .md_callout.is_info::before, .md_editor_directive.is_info::before { content: "\ef4e"; }
.markdown_body .md_callout.is_warning::before, .md_editor_directive.is_warning::before { content: "\f026"; }
.markdown_body .md_callout.is_danger::before, .md_editor_directive.is_danger::before { content: "\ef1b"; }
.markdown_body .md_callout_title { margin: 0 0 var(--space-1); color: var(--callout-ink); font-weight: var(--fw-semibold); }
.markdown_body .md_callout_title.show-for-sr { margin: 0; }
.markdown_body .md_callout a { color: var(--text-strong); }
.markdown_body .md_callout code { background: var(--bg-surface); }

/* couleur du texte et surlignage (:red[…], :mark-yellow[…] ; C1_MarkdownColors) : palette nommée, jetons --md-* de
   C1_Theme (lisibles sur les fonds des blocs, des encadrés et sur chaque surlignage, dans chaque mode) ; en contraste
   élevé, le texte coloré prend la couleur du texte, en gras souligné, et le surlignage a un contour. Aussi pour les
   pastilles du menu « Couleur » de l'éditeur. */
.md_color { font-weight: var(--md-color-weight, inherit); text-decoration: var(--md-color-decoration, none); text-underline-offset: 2px; }
.md_color.is_red { color: var(--md-red); }
.md_color.is_orange { color: var(--md-orange); }
.md_color.is_green { color: var(--md-green); }
.md_color.is_blue { color: var(--md-blue); }
.md_color.is_gray { color: var(--md-gray); }
mark.md_mark {
	padding: 0 2px; border-radius: 3px; color: var(--md-mark-text); outline: var(--md-mark-outline, none); outline-offset: -1px;
	-webkit-box-decoration-break: clone; box-decoration-break: clone;
}
mark.md_mark.is_yellow { background: var(--md-mark-yellow); }
mark.md_mark.is_green { background: var(--md-mark-green); }
mark.md_mark.is_red { background: var(--md-mark-red); }
mark.md_mark.is_blue { background: var(--md-mark-blue); }
/* coloré et surligné : la couleur du texte l'emporte, que le surlignage soit dedans (éditeur) ou autour (rendu) */
.md_color mark.md_mark { color: inherit; }
/* un lien coloré ou surligné prend la couleur choisie (il reste souligné) */
.markdown_body .md_color a, .markdown_body mark.md_mark a { color: inherit; }

/* éditeur visuel (tools/markdown.js, Milkdown) : barre d'outils, surface d'écriture, Markdown brut */
.markdown_editor { position: relative; display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--bg-surface); }
.markdown_editor:focus-within { box-shadow: var(--focus-ring); border-color: var(--primary); }
.form_fieldset > .markdown_editor.form_input { flex: 1 1 0; overflow-wrap: normal; padding: 0; height: auto; }
.markdown_editor textarea.form_input { display: block; flex: none; width: 100%; max-width: none; margin: 0 !important; }
.markdown_editor textarea[hidden], .markdown_editor [hidden] { display: none !important; }
.markdown_toolbar {
	position: sticky; top: calc(-1 * var(--space-6)); z-index: 4;
	display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); padding: var(--space-1);
	border-bottom: 1px solid var(--border); background: var(--bg-subtle); border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.markdown_editor.is_in_dialog .markdown_toolbar { top: 0; }
.markdown_group { display: flex; align-items: center; gap: 2px; padding-right: var(--space-1); border-right: 1px solid var(--border); }
.markdown_group:last-of-type, .markdown_group_end { border-right: 0; }
.markdown_group_end { margin-left: auto; padding-right: 0; }
.markdown_tool {
	display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1); height: var(--control-h-sm); min-width: var(--control-h-sm);
	margin: 0; padding: 0 var(--space-2); border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--text);
	font-size: var(--fs-sm); font-weight: var(--fw-medium); line-height: 1; cursor: pointer; white-space: nowrap;
}
.markdown_tool:hover { background: var(--bg-hover); color: var(--text-strong); }
.markdown_tool:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.markdown_tool[aria-pressed="true"], .markdown_tool[aria-expanded="true"] { background: var(--primary-tint); color: var(--primary-ink); border-color: var(--primary-border); }
.markdown_tool:disabled { color: var(--text-muted); opacity: .55; cursor: default; background: transparent; }
.markdown_tool i { font-size: 15px; }
.markdown_tool .markdown_menu_caret { font-size: 10px; }
.markdown_menu_button.has_text { min-width: 7rem; justify-content: space-between; }
/* menus à pictogramme (tableau, bloc, couleur) : pictogramme et flèche serrés, pour que la barre complète tienne sur une
   ligne dans une page */
.markdown_menu_button:not(.has_text) { gap: 2px; padding: 0 var(--space-1); }
.markdown_menu_wrapper { position: relative; display: inline-flex; }
.markdown_menu {
	position: fixed; z-index: 1000; min-width: 12rem; max-height: 60vh; overflow-y: auto; margin: 0; padding: var(--space-1); list-style: none;
	border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-surface); box-shadow: var(--shadow-md);
}
.markdown_menu li { margin: 0; }
.markdown_menu_item {
	display: block; width: 100%; margin: 0; padding: var(--space-2) var(--space-3); border: 0; border-radius: var(--radius-sm);
	background: transparent; color: var(--text); font-size: var(--fs-base); text-align: left; cursor: pointer;
}
.markdown_menu_item:hover, .markdown_menu_item:focus-visible { outline: none; background: var(--primary-tint); color: var(--primary-ink); }
.markdown_menu_item:disabled { color: var(--text-muted); opacity: .6; cursor: default; background: transparent; }
/* bascules du menu « ⋯ » (Markdown brut, plein écran) : une coche quand elles sont actives */
.markdown_menu:has([role="menuitemcheckbox"]) .markdown_menu_item, .markdown_menu:has([role="menuitemradio"]) .markdown_menu_item { padding-left: calc(var(--space-3) + 1.2em); position: relative; }
.markdown_menu_item[aria-checked="true"]::before { content: "✓"; position: absolute; left: var(--space-3); font-weight: var(--fw-semibold); }
.markdown_menu_glyph { display: inline-block; min-width: 1.2em; font-size: var(--fs-lg); line-height: 1; font-weight: var(--fw-semibold); }
.markdown_menu_group { margin: 0; padding: 0; list-style: none; }
.markdown_menu_group + .markdown_menu_group { margin-top: var(--space-1); padding-top: var(--space-1); border-top: 1px solid var(--border); }
.markdown_menu_heading { display: block; padding: var(--space-1) var(--space-3) 2px; color: var(--text-muted); font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: .04em; }
.markdown_menu_item.has_swatch { display: flex; align-items: center; gap: var(--space-2); }
.markdown_swatch { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 1.6em; height: 1.4em; border: 1px solid var(--border); border-radius: var(--radius-sm); font-weight: var(--fw-semibold); line-height: 1; }
.markdown_swatch.is_none { color: var(--text-muted); background: var(--bg-surface); text-decoration: line-through; }
mark.markdown_swatch { padding: 0; outline: none; }
.markdown_color_glyph { position: relative; display: inline-flex; flex-direction: column; align-items: center; min-width: 1.1em; font-weight: var(--fw-semibold); line-height: 1.1; }
.markdown_color_glyph > mark { padding: 0 2px; border-radius: 2px; background: transparent; color: inherit; outline: none; }
.markdown_color_bar { display: block; width: 100%; height: 3px; margin-top: 1px; border-radius: 1px; background: currentColor; }
.markdown_color_bar.is_red { background: var(--md-red); }
.markdown_color_bar.is_orange { background: var(--md-orange); }
.markdown_color_bar.is_green { background: var(--md-green); }
.markdown_color_bar.is_blue { background: var(--md-blue); }
.markdown_color_bar.is_gray { background: var(--md-gray); }
.markdown_menu_item.is_heading1 { font-size: var(--fs-xl); font-weight: var(--fw-semibold); }
.markdown_menu_item.is_heading2 { font-size: var(--fs-lg); font-weight: var(--fw-semibold); }
.markdown_menu_item.is_heading3 { font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.markdown_menu_item.is_heading4 { font-weight: var(--fw-semibold); }
.markdown_surface { min-height: calc(var(--markdown-rows, 6) * 1.6em + 2 * var(--space-3)); cursor: text; }
.markdown_editor.is_in_dialog .markdown_surface { max-height: 45vh; overflow-y: auto; }
.markdown_editor textarea { width: 100%; min-height: 9rem; margin: 0; padding: var(--space-3); border: 0; border-radius: 0; box-shadow: none; resize: vertical; font-family: var(--font-mono); font-size: var(--fs-sm); line-height: 1.55; background: var(--bg-surface); color: var(--text); }
.markdown_editor textarea:focus { box-shadow: none; outline: none; }
.markdown_status { padding: var(--space-1) var(--space-3); border-top: 1px solid var(--border); color: var(--text-muted); font-size: var(--fs-sm); }
.markdown_status.is_error { color: var(--danger-ink); }
/* plein écran : l'éditeur couvre la fenêtre, la barre reste en haut, le texte défile */
html.markdown_fullscreen_open, html.markdown_fullscreen_open body { overflow: hidden; }
.markdown_editor.is_fullscreen { position: fixed; inset: 0; z-index: 2000; border-radius: 0; border: 0; box-shadow: none; }
/* dans un dialogue : les ancêtres transformés (animation de jquery-confirm) enfermeraient la position fixe */
.jconfirm:has(.markdown_editor.is_fullscreen), .jconfirm :has(.markdown_editor.is_fullscreen) { transform: none !important; perspective: none !important; filter: none !important; }
.markdown_editor.is_fullscreen .markdown_toolbar { position: static; border-radius: 0; }
.markdown_editor.is_fullscreen .markdown_surface, .markdown_editor.is_fullscreen textarea { flex: 1 1 auto; max-height: none; min-height: 0; overflow-y: auto; resize: none; }
.markdown_editor.is_fullscreen .md_editor_content { max-width: 52rem; margin: 0 auto; }
/* zone d'écriture (ProseMirror) */
.md_editor_content { position: relative; min-height: inherit; padding: var(--space-3) var(--space-4); outline: none; white-space: pre-wrap; white-space: break-spaces; word-wrap: break-word; font-variant-ligatures: none; font-feature-settings: "liga" 0; }
.md_editor_content pre { white-space: pre-wrap; }
.md_editor_content li { position: relative; }
.md_editor_content li > p { margin: 0; }
.md_editor_content .ProseMirror-selectednode { outline: 2px solid var(--primary); outline-offset: 1px; }
.md_editor_content li.ProseMirror-selectednode { outline: none; }
.md_editor_content img.ProseMirror-separator { display: inline !important; border: none !important; margin: 0 !important; }
.md_editor_content.ProseMirror-hideselection *::selection { background: transparent; }
.md_editor_content.ProseMirror-hideselection { caret-color: transparent; }
.md_editor_content [draggable][contenteditable=false] { user-select: text; }
.md_editor_content .ProseMirror-gapcursor { display: none; pointer-events: none; position: absolute; }
.md_editor_content .ProseMirror-gapcursor::after { content: ""; display: block; position: absolute; top: -2px; width: 20px; border-top: 1px solid var(--text-strong); animation: md_cursor_blink 1.1s steps(2, start) infinite; }
.md_editor_content.ProseMirror-focused .ProseMirror-gapcursor { display: block; }
@keyframes md_cursor_blink { to { visibility: hidden; } }
.md_editor_content table { display: table; width: 100%; table-layout: fixed; overflow: hidden; }
.md_editor_content .tableWrapper { overflow-x: auto; margin: 0 0 var(--space-3); }
.md_editor_content .tableWrapper table { margin: 0; }
.md_editor_content td, .md_editor_content th { position: relative; box-sizing: border-box; }
.md_editor_content td > p, .md_editor_content th > p { margin: 0; }
.md_editor_content .selectedCell::after { content: ""; position: absolute; inset: 0; background: var(--primary-tint); opacity: .6; pointer-events: none; }
.md_editor_content .column-resize-handle { position: absolute; right: -2px; top: 0; bottom: 0; width: 4px; background: var(--primary); pointer-events: none; }
.md_editor_content li[data-item-type="task"] { list-style: none; }
.md_editor_content li[data-item-type="task"]::before { content: "\2610"; position: absolute; left: calc(-1 * var(--space-5)); color: var(--text-muted); }
.md_editor_content li[data-item-type="task"][data-checked="true"]::before { content: "\2611"; color: var(--primary-ink); }
.md_editor_content span[data-type="html"] { font-family: var(--font-mono); font-size: .92em; color: var(--text-muted); }
.md_editor_content .md_editor_image { display: inline-block; max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.md_editor_image_blocked { padding: 0 var(--space-1); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); color: var(--text-muted); font-size: var(--fs-sm); }
.md_editor_content .ProseMirror-selectednode.md_editor_image { outline: 3px solid var(--primary); }
.md_editor_content .md_editor_directive { white-space: normal; }
.md_editor_directive_head { display: flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-2); white-space: normal; }
.md_editor_directive.is_details > .md_editor_directive_head { margin: 0; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--border); background: var(--bg-subtle); border-radius: var(--radius-md) var(--radius-md) 0 0; }
.md_editor_directive.is_details > .md_editor_directive_body { padding: var(--space-3); }
.md_editor_directive_body { white-space: pre-wrap; white-space: break-spaces; }
.md_editor_directive_body > :last-child { margin-bottom: 0; }
.md_editor_directive_kind { flex: 0 0 auto; width: auto; height: var(--control-h-sm); margin: 0; padding: 0 var(--space-6) 0 var(--space-2); font-size: var(--fs-sm); }
.md_editor_directive_title { flex: 1 1 auto; min-width: 0; height: var(--control-h-sm); margin: 0; padding: 0 var(--space-2); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.md_editor_directive_remove { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: var(--control-h-sm); height: var(--control-h-sm); margin: 0; padding: 0; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); cursor: pointer; }
.md_editor_directive_remove:hover { background: var(--bg-hover); color: var(--text-strong); }
.md_editor_directive_remove:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.markdown_dialog_intro { margin: 0 0 var(--space-3); }
.markdown_dialog_intro .button { margin-top: var(--space-2); }
.markdown_help { width: 100%; }
.markdown_help td { vertical-align: top; }
.markdown_help code { white-space: normal; overflow-wrap: anywhere; }
.markdown_help_note { margin: var(--space-3) 0 0; color: var(--text-muted); font-size: var(--fs-sm); }
@media (max-width: 639px) {
	.markdown_editor textarea, .md_editor_content { font-size: var(--fs-md); }
	/* téléphone : la barre tient sur une ligne et défile en largeur */
	.markdown_toolbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; top: calc(-1 * var(--space-4)); }
	/* d'autres boutons à droite : une ombre le signale */
	.markdown_toolbar.has_more { box-shadow: inset -18px 0 12px -12px var(--border-strong); }
	.markdown_group, .markdown_menu_wrapper { flex: 0 0 auto; }
	.markdown_group_end { margin-left: 0; }
	.markdown_tool { height: var(--control-h); min-width: var(--control-h); }
	.markdown_menu_button.has_text { min-width: 7rem; }
	.md_editor_content { padding: var(--space-3); }
	.md_editor_directive_head { flex-wrap: wrap; }
	.md_editor_directive_title { flex-basis: 100%; order: 3; }
	/* la page défile par le document : le texte défile dans l'éditeur, la barre reste au-dessus */
	.markdown_surface { max-height: 60vh; max-height: 60dvh; overflow-y: auto; overscroll-behavior: contain; }
}

/* ---------------------------------------------------------------------------------------------------------------- */
/* Partage d'une fiche (C1_Sharing::display, tools/sharing.js)                                                       */
/* ---------------------------------------------------------------------------------------------------------------- */

.sharing_component h2 { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.sharing_list { list-style: none; margin: 0 0 var(--space-3); padding: 0; }
.sharing_item { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--border); }
.sharing_item > i { flex: 0 0 auto; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-full); background: var(--primary-tint); color: var(--primary-ink); }
.sharing_name { flex: 1 1 12rem; min-width: 0; display: flex; flex-direction: column; }
.sharing_name small { color: var(--text-muted); font-size: var(--fs-xs); line-height: var(--lh-xs); }
.sharing_name small.sharing_warning { color: var(--warning-ink); }
.sharing_item_level { width: auto; min-width: 9rem; height: var(--control-h-sm); margin: 0; }
.sharing_item .button { margin: 0; }
.sharing_empty { color: var(--text-muted); }
.sharing_form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.sharing_form .ts-wrapper, .sharing_form > select.sharing_recipient { flex: 1 1 16rem; min-width: 0; margin: 0; }
.sharing_form > select.sharing_level { flex: 0 0 auto; width: auto; min-width: 9rem; margin: 0; }
.sharing_form .button { margin: 0; }
.sharing_component details.help_box { margin: var(--space-3) 0 0; padding: 0; border: 0; box-shadow: none; background: none; }
.sharing_received { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--primary-tint); color: var(--primary-ink); font-size: var(--fs-sm); }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Secrets d'une fiche (C1_Secrets::display ; dialogue core/secrets/secret.dlg.php)                                  */
/* ---------------------------------------------------------------------------------------------------------------- */

.secrets_component h2 { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.secrets_list { list-style: none; margin: 0; padding: 0; }
.secrets_item { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--border); }
.secrets_item:last-child { border-bottom: 0; }
.secrets_item > i { flex: 0 0 auto; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-full); background: var(--primary-tint); color: var(--primary-ink); }
.secrets_name { flex: 1 1 14rem; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.secrets_name small { color: var(--text-muted); font-size: var(--fs-xs); line-height: var(--lh-xs); }
.secrets_name small.secrets_state.is_unset { color: var(--warning-ink); }
.secrets_buttons { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.secrets_buttons .button { margin: 0; }
.secrets_warning { margin: var(--space-3) 0 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--warning-tint); color: var(--warning-ink); font-size: var(--fs-sm); }
.secrets_component details.help_box { margin: var(--space-3) 0 0; padding: 0; border: 0; box-shadow: none; background: none; }

/* texte d'une fiche sous sa grille de champs (description, notes, constat) */
.details_text { margin-top: var(--space-3); }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Signatures d'une fiche (C1_Signature::display, tools/signature.js) ; dialogue « Faire signer »                    */
/* ---------------------------------------------------------------------------------------------------------------- */

.signature_component h2 { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.signature_component .button { margin: 0; }
.signature_component > .signature_panel > p:first-child { margin-bottom: var(--space-3); }
.signature_empty { color: var(--text-muted); }
.signature_request { border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-3); background: var(--bg-surface); }
.signature_request_header { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.signature_request_header strong { font-size: var(--fs-md); color: var(--text-strong); }
.signature_progress { margin-left: auto; font-size: var(--fs-sm); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.signature_meta { color: var(--text-muted); font-size: var(--fs-sm); margin: var(--space-1) 0 var(--space-2); }
.signature_signers { list-style: none; margin: 0 0 var(--space-2); padding: 0; }
.signature_signer { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-2) 0; border-top: 1px solid var(--border); }
.signature_signer > i { flex: 0 0 auto; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-full); background: var(--primary-tint); color: var(--primary-ink); }
.signature_signer_name { flex: 1 1 12rem; min-width: 0; display: flex; flex-direction: column; }
.signature_signer_name small { color: var(--text-muted); font-size: var(--fs-xs); line-height: var(--lh-xs); overflow-wrap: anywhere; }
.signature_refusal { padding: 0 0 var(--space-2) 42px; color: var(--danger-ink); font-size: var(--fs-sm); }
.signature_actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--border); }
.signature_code { font-size: var(--fs-sm); color: var(--text-muted); }
.signature_code code { font-family: var(--font-mono); color: var(--text); letter-spacing: .02em; }
.signature_warning { color: var(--warning-ink); font-size: var(--fs-sm); }
.signature_component details.help_box { margin: var(--space-3) 0 0; padding: 0; border: 0; box-shadow: none; background: none; }
.signature_component details.help_box p + p { margin-top: var(--space-2); }
.signature_cancel_reason { width: 100%; margin-top: var(--space-2); }
.signature_signers_editor { display: block; }
.signature_signer_rows { list-style: none; margin: 0; padding: 0; counter-reset: signer; }
.signature_signer_row { display: grid; grid-template-columns: 7.5rem 1fr auto; gap: var(--space-2); align-items: start; padding: var(--space-2); margin-bottom: var(--space-2); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-subtle); counter-increment: signer; }
.signature_signer_kind { font-size: var(--fs-xs); color: var(--text-muted); padding-top: var(--space-2); }
.signature_signer_kind::before { content: counter(signer) ". "; font-weight: var(--fw-semibold); color: var(--text); }
.signature_signer_fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: var(--space-2); min-width: 0; }
.signature_signer_fields input, .signature_signer_fields select, .signature_signer_fields .ts-wrapper { margin: 0; width: 100%; }
.signature_signer_tools { display: flex; gap: var(--space-1); }
.signature_signer_tools .button { margin: 0; }
.signature_signer_add { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.signature_signer_add .button { margin: 0; }
@media (max-width: 799px) {
	.signature_signer_row { grid-template-columns: 1fr auto; }
	.signature_signer_kind { grid-column: 1 / -1; padding-top: 0; }
	.signature_signer_fields { grid-column: 1; }
}

/* ---------------------------------------------------------------------------------------------------------------- */
/* Recherche globale (C1_Search) : champ de la barre du haut, page de résultats du noyau (core/search/index.php)      */
/* ---------------------------------------------------------------------------------------------------------------- */

.top_search { position: relative; display: flex; align-items: center; margin: 0 var(--space-2) 0 0; }
.top_search i { position: absolute; left: var(--space-3); color: var(--text-muted); pointer-events: none; }
.top_search input[type="search"] { width: 14rem; height: var(--control-h); margin: 0; padding-left: calc(var(--space-3) + 20px); border-radius: var(--radius-full); background: var(--bg-subtle); transition: width var(--ease); }
.top_search input[type="search"]:focus { width: 20rem; background: var(--bg-surface); }
@media (max-width: 1023px) { .top_search input[type="search"] { width: 10rem; } .top_search input[type="search"]:focus { width: 14rem; } }

body.app_layout #right_pane.core_page { display: block; padding: var(--space-6) max(var(--space-6), calc((100% - 72rem) / 2)); }   /* pleine largeur (barre de défilement au bord), contenu centré sur 72rem */
@media (max-width: 799px) { body.app_layout #right_pane.core_page { padding: var(--space-4); } }
.search_form { margin-bottom: var(--space-4); }
.search_form .input-group { margin-bottom: 0; }
.search_scope { margin: var(--space-2) 0 0; font-size: var(--fs-sm); color: var(--text-muted); }
.search_group h2 { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.search_group .app_icon { font-size: 26px; }
.search_count { margin-left: auto; padding: 0 var(--space-2); border-radius: var(--radius-full); background: var(--bg-hover); color: var(--text-muted); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.search_results { list-style: none; margin: 0 0 var(--space-3); padding: 0; }
.search_results li { padding: var(--space-2) 0; border-bottom: 1px solid var(--border); }
.search_results li:last-child { border-bottom: 0; }
.search_title { font-weight: var(--fw-semibold); color: var(--primary-ink); overflow-wrap: anywhere; }
.search_excerpt { margin: var(--space-1) 0 0; color: var(--text-muted); font-size: var(--fs-sm); line-height: var(--lh-sm); overflow-wrap: anywhere; }
.search_results mark { padding: 0 1px; border-radius: 3px; background: var(--warning-tint); color: var(--text-strong); }
.search_pages { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.search_pages .button { margin: 0; }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Encadré d'aide repliable (<details class="callout_glb help_box"><summary>…</summary>…</details>)                  */
/* ---------------------------------------------------------------------------------------------------------------- */

details.help_box { padding-top: var(--space-3); padding-bottom: var(--space-3); }
details.help_box > summary { cursor: pointer; font-weight: var(--fw-medium); color: var(--primary-ink); }
details.help_box[open] > summary { margin-bottom: var(--space-3); }
details.help_box p, details.help_box li { font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--text); }
details.help_box ol { margin: 0 0 var(--space-3) var(--space-6); }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Santé de l'instance et migrations de base (DEV > Santé, DEV > Migrations)                                         */
/* ---------------------------------------------------------------------------------------------------------------- */

/* ligne d'information sous le titre d'une fiche ; formulaire en une ligne (liste de choix + bouton) ; ligne archivée */
.details_meta { margin: calc(-1 * var(--space-2)) 0 var(--space-4); color: var(--text-muted); font-size: var(--fs-sm); }
.inline_form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.inline_form > select, .inline_form > .ts-wrapper { flex: 1 1 16rem; min-width: 0; max-width: 32rem; margin: 0; }
.inline_form > .button { margin: 0; }
.tableCSS tr.is_archived { opacity: .6; }
h1.details > .label, .health_category h2 > .label { margin-left: var(--space-2); vertical-align: middle; }
.health_list { list-style: none; margin: 0; padding: 0; }
.health_list li { padding: var(--space-2) 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.health_list li:last-child { border-bottom: 0; }
.health_list .label { margin-right: var(--space-2); }
.dev_migrations td { vertical-align: top; }
.dev_migrations code, .dev_migrations_history code { overflow-wrap: anywhere; }
.dev_migrations_history > summary { cursor: pointer; padding: var(--space-2) 0; }
.dev_migrations_history > summary small { color: var(--text-muted); margin-left: var(--space-2); }
/* téléphone : chaque partie en carte (nom, dernière migration, état), sans colonnes coupées */
@media (max-width: 49.99875em) {
	.dev_migrations thead { display: none; }
	.dev_migrations, .dev_migrations tbody, .dev_migrations tr, .dev_migrations td { display: block; width: 100%; }
	.dev_migrations tr { padding: var(--space-2) 0; border-bottom: 1px solid var(--border); }
	.dev_migrations td { border: 0; padding: var(--space-1) var(--space-2); }
}

/* ---------------------------------------------------------------------------------------------------------------- */
/* Services extérieurs (DEV > Services : catalogue en cartes, fiche) et résultat d'une analyse par l'IA             */
/* ---------------------------------------------------------------------------------------------------------------- */

.service_grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: var(--space-4); margin-bottom: var(--space-4); }
.service_grid .service_card { display: flex; flex-direction: column; margin: 0; min-width: 0; }
.service_card h3 { margin: 0 0 var(--space-2); overflow-wrap: anywhere; }
.service_card p { margin: 0 0 var(--space-2); }
.service_card p small { color: var(--text-muted); }
.service_card_state { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.service_card_actions { margin-top: auto; padding-top: var(--space-2); display: flex; flex-wrap: wrap; gap: var(--space-2); }
.service_card_actions .button { margin: 0; }
.label.service_capability { background: var(--primary-tint); color: var(--primary-ink); }
.service_settings code { overflow-wrap: anywhere; }
.service_usage td:first-child { white-space: nowrap; }
#DEV_try_llm { margin-bottom: var(--space-4); }
.ai_result { border-left: 3px solid var(--primary); padding-left: var(--space-3); margin: var(--space-3) 0; }
.ai_result p { margin: 0 0 var(--space-2); }
.ai_result ul { margin: var(--space-1) 0 var(--space-2) var(--space-5); }
.ai_result_meta { font-size: var(--fs-xs); color: var(--text-muted); }

/* ---------------------------------------------------------------------------------------------------------------- */
/* L'IA dans les écrans (C1_AiActions, C1_PendingAction, tools/ai.js) : remplir un formulaire depuis un document,  */
/* « Demander » au-dessus d'une liste, champs posés par l'IA (surlignés jusqu'à leur modification), cartes de       */
/* validation des écritures proposées                                                                               */
/* ---------------------------------------------------------------------------------------------------------------- */

.ai_button .icon-wand-sparkles, .ai_fill summary .icon-wand-sparkles { color: var(--primary); }
.ai_actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-3); }
.ai_actions .button { margin: 0; }
.ai_actions:not(:has(.button)) { display: none; }
.ai_fill { margin: 0 0 var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); }
.ai_fill summary { cursor: pointer; font-weight: var(--fw-semibold); color: var(--primary-ink); }
.ai_fill[open] summary { margin-bottom: var(--space-2); }
.ai_help { font-size: var(--fs-sm); color: var(--text-muted); margin: 0 0 var(--space-2); }
.ai_fill_inputs { display: grid; grid-template-columns: 1fr; gap: var(--space-2); }
@media (min-width: 50em) { .ai_fill_inputs { grid-template-columns: 1fr 1fr; } }
.ai_fill_inputs label { display: flex; flex-direction: column; gap: var(--space-1); font-size: var(--fs-sm); color: var(--text-muted); min-width: 0; }
.ai_fill_inputs input[type="file"] { max-width: 100%; }
.ai_fill_inputs textarea { width: 100%; }
.ai_fill_run { display: flex; justify-content: flex-end; margin: var(--space-2) 0 0; }
.ai_fill_run .button { margin: 0; }
.ai_status { font-size: var(--fs-sm); color: var(--text-muted); margin: var(--space-1) 0 0; min-height: 1.2em; }
.ai_status:empty { min-height: 0; margin: 0; }
.ai_filter { margin-bottom: var(--space-1); }
.ai_filter .input-group-label { color: var(--primary-ink); background: var(--primary-tint); border-color: var(--primary-border); }
@media (max-width: 49.99em) { .list_filters .ai_filter .input-group-label { width: auto; min-width: 0; padding: 0 var(--space-3); } }
.ai_filter_status { margin-bottom: var(--space-2); }
/* champ posé par l'IA : fond et liseré de l'accent, jusqu'à ce que la personne le modifie */
.ai_filled { background: var(--primary-tint); box-shadow: inset 3px 0 0 var(--primary); border-radius: var(--radius-sm); }
.form_fieldset.ai_filled .form_label { padding-left: var(--space-3); }
.ai_filled input, .ai_filled select, .ai_filled textarea { border-color: var(--primary); }

.ai_pending h2 { font-size: var(--fs-lg); margin: 0 0 var(--space-3); }
.ai_card { border: 1px solid var(--border); border-left: 4px solid var(--warning); border-radius: var(--radius-md); background: var(--bg-surface);
	padding: var(--space-3); margin: 0 0 var(--space-3); min-width: 0; }
.ai_card_header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-2); }
.ai_card_header strong { overflow-wrap: anywhere; }
.ai_card_reason { margin: 0 0 var(--space-2); font-size: var(--fs-sm); }
.ai_card_reason_label { display: inline-block; font-weight: var(--fw-semibold); color: var(--text-muted); margin-right: var(--space-1); }
.tableCSS.ai_card_preview { margin: 0 0 var(--space-2); table-layout: fixed; }
.tableCSS.ai_card_preview th, .tableCSS.ai_card_preview td { padding: var(--space-2) var(--space-3); vertical-align: top; text-align: left; white-space: normal; }
.ai_card_preview thead th:first-child { width: 28%; }
.ai_card_preview thead th:nth-child(2) { width: 30%; }
.ai_card_preview th[scope="row"] { font-weight: var(--fw-semibold); overflow-wrap: anywhere; }
.ai_card_preview td { overflow-wrap: anywhere; }
.ai_card_preview .ai_before { color: var(--text-muted); }
.ai_card_preview .ai_before span { text-decoration: line-through; text-decoration-color: var(--border-strong); }
.ai_card_preview .ai_after { color: var(--text-strong); font-weight: var(--fw-semibold); }
.ai_card_meta, .ai_card_result { font-size: var(--fs-xs); color: var(--text-muted); margin: 0 0 var(--space-2); }
/* écriture faite directement par l'IA (C1_AiDirectWrites) : une ligne « Fait : … » (assistant) */
.ai_done { margin: var(--space-2) 0; padding: var(--space-2) var(--space-3);
	border-left: 3px solid var(--success-border); background: var(--success-tint); color: var(--text); border-radius: var(--radius-sm); }
.ai_done .icon-circle-check { color: var(--success-ink); }
.ai_card_buttons { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: flex-end; margin: 0; }
.ai_card_buttons .button { margin: 0; }
.ai_card_buttons .button.alert { margin-right: auto; }
.ai_card.is_decided { border-left-color: var(--border-strong); }
@media (max-width: 49.99em) {
	.ai_card_preview, .ai_card_preview tbody, .ai_card_preview tr, .ai_card_preview th, .ai_card_preview td { display: block; width: auto; }
	.ai_card_preview thead { display: none; }
	.ai_card_preview tr { padding: var(--space-1) 0; border-bottom: 1px solid var(--border); }
	.ai_card_preview tr:last-child { border-bottom: 0; }
	.tableCSS.ai_card_preview th, .tableCSS.ai_card_preview td { border: 0; padding: 2px var(--space-3); background: transparent; }
	.ai_card_preview .ai_before::before { content: "Avant : "; }
	.ai_card_preview .ai_after::before { content: "Après : "; }
	.ai_card_buttons .button { flex: 1 1 auto; }
}

/* ---------------------------------------------------------------------------------------------------------------- */
/* Frise d'étapes : filtre d'une liste (boutons radio name="…" dans le formulaire data-list) ou étape d'une fiche    */
/* (.stage_steps.is_static, l'étape courante en .is_current)                                                        */
/* ---------------------------------------------------------------------------------------------------------------- */

.stage_steps { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-3); padding: 0; border: 0; min-width: 0; }
.stage_steps input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stage_steps_item, .stage_steps_all {
	position: relative; display: flex !important; align-items: center; gap: var(--space-2); margin: 0 !important;
	padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md);
	background: var(--bg-surface); cursor: pointer;
}
.stage_steps_item { flex: 1 1 12em; min-width: 0; }
.stage_steps_all { flex: 0 0 auto; }
.stage_steps.is_static .stage_steps_item { cursor: default; }
.stage_steps_item:hover, .stage_steps_all:hover { border-color: var(--border-strong); }
.stage_steps_item:has(input:checked), .stage_steps_all:has(input:checked), .stage_steps_item.is_current {
	border-color: var(--primary); background: var(--primary-tint); box-shadow: inset 0 0 0 1px var(--primary);
}
.stage_steps_item:has(input:focus-visible), .stage_steps_all:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.stage_steps_number {
	flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
	border-radius: var(--radius-full); background: var(--gray-100); color: var(--gray-700); font-size: var(--fs-xs); font-weight: var(--fw-semibold);
}
.stage_steps_item.is_current .stage_steps_number, .stage_steps_item:has(input:checked) .stage_steps_number { background: var(--primary); color: var(--primary-on); }
.stage_steps_text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: var(--lh-sm); }
.stage_steps_text strong { font-size: var(--fs-base); color: var(--text-strong); }
.stage_steps_text small { font-size: var(--fs-xs); color: var(--text-muted); }
.stage_steps_count { flex: 0 0 auto; font-size: var(--fs-lg); font-weight: var(--fw-semibold); color: var(--text-strong); }
.stage_steps_all strong { font-weight: var(--fw-semibold); }
@media (max-width: 639px) {
	.stage_steps_item { flex-basis: 100%; }
	.stage_steps_text small { display: none; }
}

/* ---------------------------------------------------------------------------------------------------------------- */
/* Blocs (C1_Blocks) : ce qu'une application montre dans la page d'une autre ; titre et « Modifier » en tête,        */
/* contenu (fiches résumées : liste de définitions .block_fields, tableaux), formulaire de modification sur place     */
/* ---------------------------------------------------------------------------------------------------------------- */

.block { min-width: 0; }
.block_header { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-2); }
.block_title { flex: 1 1 auto; min-width: 0; margin: 0; font-size: var(--fs-lg); }
.block_buttons { flex: 0 0 auto; display: flex; gap: var(--space-2); }
.block_buttons .button { margin: 0; }
.block[aria-busy="true"] .block_body { opacity: .7; }
.block_loading { margin: 0; }
.block_body > :last-child { margin-bottom: 0; }
.block_fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: var(--space-2) var(--space-4); margin: 0; }
.block_fields > div { min-width: 0; }
.block_fields dt { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-label); }
.block_fields dd { margin: 0; overflow-wrap: anywhere; }
.block_more { margin: var(--space-2) 0 0; font-size: var(--fs-sm); }
.block_list { list-style: none; margin: 0; padding: 0; }
.block_list > li { padding: var(--space-2) 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.block_list > li:last-child { border-bottom: 0; }
.block_list > li small { display: block; }
.block_form .block_message { margin: 0 0 var(--space-3); padding: var(--space-2) var(--space-3); }
.block_form .block_message[hidden] { display: none; }
.block_form_buttons { margin: var(--space-3) 0 0; }
.block_form_buttons .button { margin-bottom: 0; }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Fil en direct (serveur de messages, C1_Live : AmanelaLive.subscribe) : messages courts d'une fiche, le plus récent */
/* en bas, zone de saisie sous le fil ; modèle : fil d'un chantier (Z3)                                              */
/* ---------------------------------------------------------------------------------------------------------------- */

.live_badge { vertical-align: middle; font-size: var(--fs-xs); }
.live_badge[hidden] { display: none; }
.live_feed { list-style: none; margin: 0 0 var(--space-3); padding: 0; max-height: 22rem; overflow-y: auto; overscroll-behavior: contain; }
.live_feed > li { padding: var(--space-2) 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.live_feed > li:last-child { border-bottom: 0; }
.live_feed_meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); }
.live_feed_text { display: block; margin-top: var(--space-1); }
.live_feed_form { display: flex; gap: var(--space-2); align-items: flex-end; }
.live_feed_form textarea { flex: 1 1 auto; min-width: 0; margin: 0; resize: vertical; }
.live_feed_form .button { flex: 0 0 auto; margin: 0; }
@media screen and (max-width: 49.9375em) {
	.live_feed_form { flex-direction: column; align-items: stretch; }
}

/* ---------------------------------------------------------------------------------------------------------------- */
/* Contexte épinglé et sélections (C1_Pins, C1_Selections) : raccourcis de la barre du haut (#pins_bar : libellé de */
/* l'épingle, fiche, croix) ; bouton « Travailler sur … » d'une fiche ; cases et barre de la sélection d'une liste   */
/* ---------------------------------------------------------------------------------------------------------------- */

.pins_bar { display: flex; flex: 0 0 auto; align-items: center; gap: var(--space-1); margin: 0 var(--space-2) 0 0; padding: 0; list-style: none; }
.pins_bar[hidden] { display: none; }
.pin_item {
	display: inline-flex; flex: 0 0 auto; align-items: center; min-width: 0; max-width: 16rem; height: 34px;
	border: 1px solid var(--primary-border); border-radius: var(--radius-full); background: var(--primary-tint);
}
.pin_link {
	display: inline-flex; align-items: center; gap: var(--space-1); flex: 1 1 auto; min-width: 0; overflow: hidden; height: 100%; padding: 0 var(--space-1) 0 var(--space-3);
	color: var(--primary-ink); text-decoration: none; line-height: 1.1; border-radius: var(--radius-full) 0 0 var(--radius-full);
}
.pin_link:hover { text-decoration: none; background: var(--bg-hover); }
.pin_link:focus-visible, .pin_remove:focus-visible { outline: var(--focus-outline); outline-offset: 2px; }
.pin_link > i { flex: 0 0 auto; }
.pin_label { flex: 0 0 auto; font-size: var(--fs-xs); font-weight: var(--fw-semibold); white-space: nowrap; }
.pin_label::after { content: " :"; }
.pin_title { flex: 1 1 auto; min-width: 2.5rem; font-size: var(--fs-sm); color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pin_remove {
	display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 28px; height: 28px; margin-right: 2px;
	border: 0; border-radius: var(--radius-full); background: transparent; color: var(--text-muted); cursor: pointer;
}
.pin_remove:hover { background: var(--bg-hover); color: var(--text-strong); }
@media (min-width: 640px) {
	/* barre resserrée (layout.js, fitTopBar) : la fiche seule ; le libellé de l'épingle reste en infobulle et pour les
	   lecteurs d'écran */
	.top-bar.is_compact .pin_item { max-width: 13rem; }
	.top-bar.is_compact .pin_label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.top-bar.is_tight .pin_item { max-width: 10rem; }
}
@media (max-width: 639px) {
	/* téléphone : dans le menu (barre du haut repliée), une ligne par épingle */
	.top-bar-right { flex-wrap: wrap; }
	.pins_bar { flex-direction: column; align-items: stretch; flex: 1 1 100%; width: 100%; margin: 0 0 var(--space-2); }
	.pin_item { width: 100%; max-width: 100%; height: 44px; }
	.pin_link { flex: 1 1 auto; }
	.pin_remove { width: 40px; height: 40px; }
}
.list_selection {
	display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2);
	padding: var(--space-2) var(--space-3); margin-bottom: var(--space-3);
	background: var(--primary-tint); border: 1px solid var(--primary-border); border-radius: var(--radius-md); font-size: var(--fs-sm);
}
.list_selection[hidden] { display: none; }
.list_selection .button { margin: 0; max-width: 100%; white-space: normal; text-align: left; }
.list_selection_count { font-weight: var(--fw-semibold); color: var(--primary-ink); }
.list_selection_hint { flex: 1 1 100%; }
.list_notice {
	padding: var(--space-2) var(--space-3); margin-bottom: var(--space-3); border-radius: var(--radius-md); font-size: var(--fs-sm);
	background: var(--success-tint); color: var(--text-strong); border-left: 4px solid var(--success);
}
.list_notice.is_error { background: var(--danger-tint); border-left-color: var(--danger); }
th.list_select, td.list_select { width: 2.5rem; text-align: center; }
.list_select input[type="checkbox"] { width: 20px; height: 20px; margin: 0; cursor: pointer; }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Étiquettes et champs personnalisés (C1_Tags, C1_CustomFields) : saisie dans un dialogue, filtres des listes,
   affichage dans une fiche, écrans de gestion */
.form_fieldset[hidden] { display: none; }
.tags_choices, .custom_fields_choices { display: inline-flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); align-items: center; }
.tags_choice { display: inline-flex; align-items: center; gap: var(--space-1); margin: 0; cursor: pointer; }
.tags_choice input { margin: 0; }
.tags_filter { margin: 0 0 var(--space-2); }
.tags_filter .color_swatch, .tags_field .color_swatch { margin-right: var(--space-1); }
fieldset.tags_filter { border: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); align-items: center; }
fieldset.tags_filter legend { font-weight: var(--fw-semibold); color: var(--text-label); padding: 0; margin-right: var(--space-2); float: left; }
.tags_line { margin: 0 0 var(--space-2); }
.tags_admin_tag { background: none; border: 0; padding: 0; margin: 0 var(--space-1) var(--space-1) 0; cursor: pointer; }
.tags_admin_tag:focus-visible { outline: var(--focus-outline); outline-offset: 2px; }
.tags_admin_tag.is_obsolete, tr.is_obsolete, .custom_fields_admin_group.is_obsolete { opacity: 0.6; }
.custom_fields_group { margin: var(--space-3) 0 0; padding-top: var(--space-2); border-top: 1px solid var(--border); }
.custom_fields_group[hidden] { display: none; }
.custom_fields_title { margin: 0 0 var(--space-2); font-weight: var(--fw-semibold); color: var(--text-strong); }
.custom_fields_display h2 .button { margin: 0 0 0 var(--space-2); vertical-align: middle; }
.custom_fields_display_group h3 { font-size: var(--fs-md); margin: var(--space-3) 0 var(--space-2); color: var(--text-strong); }
.custom_fields_filter .input-group-field + .input-group-field { border-left: 1px solid var(--border); }
.custom_fields_admin_group { margin-top: var(--space-4); }
.custom_fields_admin_group h3 small { font-weight: normal; margin-left: var(--space-2); }
.custom_fields_choice_line { display: flex; gap: var(--space-2); align-items: center; margin-bottom: var(--space-1); }
.custom_fields_choice_line input[type="text"] { flex: 1 1 auto; margin: 0; }
.custom_fields_choices + textarea, .form_input textarea[name="new_choices"] { width: 100%; }
@media (forced-colors: active) {
	.tags_admin_tag.is_obsolete, tr.is_obsolete, .custom_fields_admin_group.is_obsolete { opacity: 1; text-decoration: line-through; }
}

/* ---------------------------------------------------------------------------------------------------------------- */
/* Accès rapide (C1_QuickAccess, layout/topbar.inc.php, js/quick_access.js) : bouton de la barre du haut, panneau des  */
/* raccourcis de la personne (liste, ajout d'un outil, gestion), fenêtre flottante non modale d'un outil (cadre        */
/* core/quick_access/tool.php). Ordinateur seulement : rien au téléphone.                                           */
/* ---------------------------------------------------------------------------------------------------------------- */

.quick_access_button {
	position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
	width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--radius-md); background: transparent;
	color: var(--text-muted); cursor: pointer; font-size: 18px;
}
.quick_access_button:hover, .quick_access_button[aria-expanded="true"] { background: var(--bg-hover); color: var(--text-strong); }
.quick_access_button:focus-visible { outline: var(--focus-outline); outline-offset: 2px; }

.quick_access_panel {
	position: fixed; z-index: 1000; display: flex; flex-direction: column;
	width: 380px; max-width: calc(100vw - 16px); max-height: min(600px, calc(100vh - 80px));
	background: var(--bg-surface); color: var(--text);
	border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.quick_access_panel[hidden] { display: none; }
.quick_access_head {
	display: flex; align-items: center; gap: var(--space-2);
	padding: var(--space-3) var(--space-2) var(--space-2) var(--space-4); border-bottom: 1px solid var(--border);
}
.quick_access_head h2 { display: flex; align-items: center; gap: var(--space-2); flex: 1 1 auto; margin: 0; font-size: var(--fs-md); line-height: var(--lh-md); font-weight: var(--fw-semibold); }
.quick_access_head h2:focus { outline: none; }
.quick_access_head h2:focus-visible { outline: var(--focus-outline); outline-offset: 2px; border-radius: var(--radius-sm); }
.quick_access_close, .quick_tool_button {
	display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 32px; height: 32px; padding: 0;
	border: 0; border-radius: var(--radius-md); background: transparent; color: var(--text-muted); font-size: 16px; cursor: pointer;
}
.quick_access_close:hover, .quick_tool_button:hover { background: var(--bg-hover); color: var(--text-strong); }
.quick_access_close:focus-visible, .quick_tool_button:focus-visible { outline: var(--focus-outline); outline-offset: 1px; }
.quick_access_body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: var(--space-2) var(--space-2) var(--space-3); }
.quick_access_body[aria-busy="true"] { opacity: .7; }
.quick_access_heading { margin: var(--space-1) var(--space-2) var(--space-2); font-size: var(--fs-sm); line-height: var(--lh-sm); font-weight: var(--fw-semibold); color: var(--text-strong); }
.quick_access_heading:focus { outline: none; }
.quick_access_heading:focus-visible { outline: var(--focus-outline); outline-offset: 2px; }
.quick_access_list, .quick_access_entries, .quick_access_manage { list-style: none; margin: 0; padding: 0; }
.quick_access_link {
	display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: 40px; padding: var(--space-1) var(--space-2);
	border: 0; border-radius: var(--radius-md); background: transparent; color: var(--text); font: inherit; font-size: var(--fs-sm);
	text-align: left; text-decoration: none; cursor: pointer;
}
.quick_access_link > span:not(.app_icon) { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick_access_link:hover { background: var(--bg-hover); color: var(--text-strong); text-decoration: none; }
.quick_access_link:focus-visible { outline: var(--focus-outline); outline-offset: -2px; }
.quick_access_link .icon, .quick_access_row .icon, .quick_access_entry .icon { flex: 0 0 auto; color: var(--primary-ink); }
.quick_access_link .icon::before, .quick_access_row .icon::before, .quick_access_entry .icon::before { width: 22px; height: 22px; }
.quick_access_app.app_icon { font-size: 22px; margin: 0; }
.quick_access_kind { flex: 0 0 auto; font-size: var(--fs-xs); color: var(--text-muted); }
.quick_access_empty, .quick_access_note { margin: var(--space-2); font-size: var(--fs-sm); color: var(--text-muted); }
.quick_access_hint { margin: 0 var(--space-2) var(--space-2); font-size: var(--fs-xs); line-height: var(--lh-xs); }
.quick_access_actions {
	display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);
	margin-top: var(--space-2); padding: var(--space-2) var(--space-2) 0; border-top: 1px solid var(--border);
}
.quick_access_actions .button, .quick_access_actions p { margin: 0; }
.quick_access_entry { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2); border-radius: var(--radius-md); }
.quick_access_entry + .quick_access_entry { border-top: 1px solid var(--border); }
.quick_access_entry_text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; font-size: var(--fs-sm); }
.quick_access_entry_text small { font-size: var(--fs-xs); line-height: var(--lh-xs); color: var(--text-muted); }
.quick_access_entry .button { margin: 0; }
.quick_access_row {
	display: flex; align-items: center; gap: var(--space-1); padding: var(--space-1); border-radius: var(--radius-md); background: var(--bg-surface);
}
.quick_access_row + .quick_access_row { border-top: 1px solid var(--border); }
.quick_access_row .button { margin: 0; }
.quick_access_name { flex: 1 1 auto; min-width: 0; height: 32px; margin: 0; padding: 0 var(--space-2); font-size: var(--fs-sm); }
.quick_access_handle { display: inline-flex; align-items: center; justify-content: center; width: 20px; color: var(--text-muted); cursor: grab; }
.quick_access_manage > li.lib_sortable_ghost { border: 1px dashed var(--primary-border); border-radius: var(--radius-md); background: var(--primary-tint); }

/* fenêtre flottante : au-dessus de la page, sous les dialogues modaux (jquery-confirm) ; déplaçable par sa barre */
.quick_tool {
	position: fixed; z-index: 480; display: flex; flex-direction: column; top: 72px; left: 24px;
	width: min(40rem, calc(100vw - 16px)); max-height: calc(100vh - 16px);
	background: var(--bg-surface); color: var(--text);
	border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.quick_tool[hidden] { display: none; }
.quick_tool.is_small { width: min(26rem, calc(100vw - 16px)); }
.quick_tool.is_large { width: min(64rem, calc(100vw - 16px)); }
.quick_tool_head {
	display: flex; align-items: center; gap: var(--space-1); flex: 0 0 auto; min-height: 44px;
	padding: 0 var(--space-1) 0 var(--space-2); background: var(--bg-subtle); border-bottom: 1px solid var(--border);
	cursor: move; user-select: none; touch-action: none;
}
.quick_tool_grip { display: inline-flex; color: var(--text-muted); }
.quick_tool_head h2 {
	flex: 1 1 auto; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
	font-size: var(--fs-md); line-height: var(--lh-md); font-weight: var(--fw-semibold); color: var(--text-strong);
}
.quick_tool_head h2:focus { outline: none; }
.quick_tool_head h2:focus-visible { outline: var(--focus-outline); outline-offset: 2px; border-radius: var(--radius-sm); }
.quick_tool_frame { display: block; flex: 1 1 auto; width: 100%; height: 320px; max-height: calc(100vh - 140px); border: 0; background: var(--bg-surface); }
.quick_tool.is_minimized .quick_tool_frame { display: none; }
.quick_tool.is_minimized .quick_tool_head { border-bottom: 0; }
.quick_tool.is_dragging .quick_tool_frame { pointer-events: none; }
/* le cadre lui-même (core/quick_access/tool.php) : le contenu du dialogue, sans barre du haut */
body.quick_tool_page { padding: var(--space-3) var(--space-4); background: var(--bg-surface); }
.quick_tool_content > .block { margin: 0; box-shadow: none; border: 0; padding: 0; }
.quick_tool_content > .block .block_title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 49.99em) {
	.quick_access_button, .quick_access_panel, .quick_tool { display: none !important; }
}
@media (forced-colors: active) {
	.quick_access_panel, .quick_tool { border: 1px solid CanvasText; }
	.quick_tool_head { border-bottom: 1px solid CanvasText; }
}

/* ---------------------------------------------------------------------------------------------------------------- */
/* Grille des dialogues jquery-confirm (classes de Bootstrap 3, sans Bootstrap)                                     */
/* ---------------------------------------------------------------------------------------------------------------- */
/* jquery-confirm (useBootstrap: true) range sa boîte dans .jc-bs3-container > .jc-bs3-row > .jconfirm-box-container,
   qui porte des classes de colonnes Bootstrap 3 : openSmall/Medium/LargeDialog (col-xs-12 col-md-4|6|10 avec
   décalage), les tailles nommées (xsmall… xlarge) et la valeur par défaut de $.alert/$.confirm
   (col-xs-10, col-sm-6, col-md-4 avec décalage). Seules ces classes sont reprises, et seulement dans .jconfirm.
   Les marges internes de 15 px sont posées plus haut (« Dialogues jquery-confirm »). */
.jconfirm .jc-bs3-row { margin-left: -15px; margin-right: -15px; }
.jconfirm .jc-bs3-container::before, .jconfirm .jc-bs3-container::after,
.jconfirm .jc-bs3-row::before, .jconfirm .jc-bs3-row::after { content: " "; display: table; }
.jconfirm .jc-bs3-container::after, .jconfirm .jc-bs3-row::after { clear: both; }
.jconfirm .jc-bs3-row > [class*="col-"] { position: relative; min-height: 1px; }
/* téléphone (toutes largeurs) */
.jconfirm .col-xs-10, .jconfirm .col-xs-12 { float: left; }
.jconfirm .col-xs-10 { width: 83.333333%; }
.jconfirm .col-xs-12 { width: 100%; }
.jconfirm .col-xs-offset-1 { margin-left: 8.333333%; }
/* tablette (768 px et plus) */
@media (min-width: 768px) {
	.jconfirm .col-sm-6 { float: left; width: 50%; }
	.jconfirm .col-sm-offset-3 { margin-left: 25%; }
}
/* bureau (992 px et plus) */
@media (min-width: 992px) {
	.jconfirm .col-md-2, .jconfirm .col-md-4, .jconfirm .col-md-6, .jconfirm .col-md-8, .jconfirm .col-md-10,
	.jconfirm .col-md-12 { float: left; }
	.jconfirm .col-md-2 { width: 16.666667%; }
	.jconfirm .col-md-4 { width: 33.333333%; }
	.jconfirm .col-md-6 { width: 50%; }
	.jconfirm .col-md-8 { width: 66.666667%; }
	.jconfirm .col-md-10 { width: 83.333333%; }
	.jconfirm .col-md-12 { width: 100%; }
	.jconfirm .col-md-offset-1 { margin-left: 8.333333%; }
	.jconfirm .col-md-offset-2 { margin-left: 16.666667%; }
	.jconfirm .col-md-offset-3 { margin-left: 25%; }
	.jconfirm .col-md-offset-4 { margin-left: 33.333333%; }
	.jconfirm .col-md-offset-5 { margin-left: 41.666667%; }
}


/* ---------------------------------------------------------------------------------------------------------------- */
/* Lecture d'un document en plusieurs pages (S1_documentation, réutilisable) : fil d'Ariane, boutons d'un titre,      */
/* sommaire, pages voisines, choix d'une image à insérer, comparaison de deux versions d'un texte (lignes ± )         */
/* ---------------------------------------------------------------------------------------------------------------- */

.breadcrumb_nav { margin: 0 0 var(--space-2); font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--text-muted); }
.breadcrumb_nav ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--space-1); margin: 0; padding: 0; list-style: none; }
.breadcrumb_nav li { display: inline-flex; align-items: center; min-width: 0; overflow-wrap: anywhere; }
.breadcrumb_nav li + li::before { content: "›"; margin-right: var(--space-1); color: var(--gray-400); }
.breadcrumb_nav a { color: var(--primary-ink); text-decoration: var(--link-decoration); }
.breadcrumb_nav a:hover { text-decoration: underline; }
.breadcrumb_nav [aria-current="page"] { color: var(--text); }

h1.details .details_buttons, h2 .details_buttons { display: inline-flex; flex-wrap: wrap; gap: var(--space-2); margin-left: auto; font-size: var(--fs-base); font-weight: var(--fw-regular); }
.details_buttons .button { margin: 0; }
h2.toc_title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
h1.details { overflow-wrap: anywhere; }

.toc_list, .toc_list ol { list-style: none; margin: 0; padding: 0; }
.toc_list ol { margin: 0 0 var(--space-1) var(--space-5); border-left: 1px solid var(--border); padding-left: var(--space-2); }
.toc_line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); }
.toc_line:hover { background: var(--bg-hover); }
.toc_line > a { flex: 1 1 12rem; min-width: 0; color: var(--text); text-decoration: var(--link-decoration); overflow-wrap: anywhere; }
.toc_line > a:hover { color: var(--primary-ink); text-decoration: underline; }
.toc_line > a i { color: var(--text-muted); }
.toc_chapter > .toc_line { margin-top: var(--space-2); }
.toc_page.is_current > .toc_line, .toc_chapter.is_current > .toc_line { background: var(--primary-tint); }
.toc_page.is_current > .toc_line > a, .toc_chapter.is_current > .toc_line > a { color: var(--primary-ink); font-weight: var(--fw-semibold); }
.toc_actions { display: inline-flex; gap: 2px; margin-left: auto; }
.toc_actions .button { margin: 0; }
.toc_list.is_compact .toc_line { padding: 3px var(--space-2); font-size: var(--fs-sm); line-height: var(--lh-sm); }
.toc_list.is_compact ol { margin-left: var(--space-3); }
.toc_pane { padding: 0 var(--space-1); }
.toc_box > summary { cursor: pointer; font-weight: var(--fw-medium); color: var(--primary-ink); }
.toc_box[open] > summary { margin-bottom: var(--space-2); }

.page_body { padding: var(--space-5) var(--space-6); }
@media (max-width: 799px) { .page_body { padding: var(--space-4); } .page_body .markdown_body { font-size: var(--fs-md); line-height: 1.65; } }
.page_nav { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: 0 0 var(--space-4); }
.page_nav_link {
	display: flex; flex-direction: column; flex: 1 1 14rem; min-width: 0; padding: var(--space-3) var(--space-4);
	border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-surface); color: var(--text); text-decoration: none;
}
.page_nav_link:hover { border-color: var(--primary); color: var(--primary-ink); text-decoration: none; }
.page_nav_link small { color: var(--text-muted); font-size: var(--fs-xs); }
.page_nav_link span { font-weight: var(--fw-semibold); overflow-wrap: anywhere; }
.page_nav_link.is_next { text-align: right; margin-left: auto; }
/* déplacer une page : qui la verra, qui ne la verra plus (dialogue) */
.move_audience { font-size: var(--fs-sm); line-height: var(--lh-sm); overflow-wrap: anywhere; }
.move_audience p { margin: 0 0 var(--space-1); }

.image_picker { list-style: none; margin: 0; padding: 0; }
.image_picker li { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-1) 0; border-bottom: 1px solid var(--border); }
.image_picker img { flex: 0 0 auto; width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); background: var(--bg-subtle); }
.image_picker_name { flex: 1 1 auto; min-width: 0; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.image_picker .button { margin: 0; }
.page_editor textarea { min-height: 24rem; }

.revisions_actions { white-space: nowrap; }
.revisions_actions .button { margin: 0 2px 2px 0; }
@media (max-width: 639px) { .revisions_actions { white-space: normal; } .revisions_actions .button { display: block; margin: 0 0 var(--space-1); } }
.search_book { display: block; color: var(--text-muted); font-size: var(--fs-xs); }

.diff_view { width: 100%; border-collapse: collapse; table-layout: fixed; font-family: var(--font-mono); font-size: var(--fs-sm); line-height: var(--lh-sm); }
.diff_view th { width: 3.5em; padding: var(--space-1); color: var(--text-muted); font-weight: var(--fw-medium); text-align: right; border-bottom: 1px solid var(--border); }
.diff_view th:last-child { width: auto; }
.diff_view td { padding: 1px var(--space-2); vertical-align: top; }
.diff_view .diff_number { width: 3.5em; color: var(--text-muted); text-align: right; user-select: none; }
.diff_view .diff_text { white-space: pre-wrap; overflow-wrap: anywhere; }
.diff_view .diff_sign { display: inline-block; width: 1.2em; color: var(--text-muted); user-select: none; }
.diff_view tr.is_add td { background: var(--success-tint); }
.diff_view tr.is_add .diff_sign { color: var(--success-ink); font-weight: var(--fw-semibold); }
.diff_view tr.is_del td { background: var(--danger-tint); }
.diff_view tr.is_del .diff_text { text-decoration: line-through; text-decoration-color: var(--danger-ink); }
.diff_view tr.is_del .diff_sign { color: var(--danger-ink); font-weight: var(--fw-semibold); }
.diff_view tr.is_skip td { padding: var(--space-1) var(--space-2); background: var(--bg-subtle); color: var(--text-muted); font-family: var(--font-sans); font-style: italic; text-align: center; }
@media (max-width: 639px) { .diff_view th, .diff_view .diff_number { width: 2.4em; font-size: var(--fs-xs); } }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Configuration globale et couleurs de l'instance (DEV)                                                            */
/* ---------------------------------------------------------------------------------------------------------------- */

.dev_config td { vertical-align: top; }
.dev_config td.dev_config_name { font-weight: var(--fw-semibold); overflow-wrap: anywhere; }
.dev_config td.dev_config_value { white-space: normal; overflow-wrap: anywhere; min-width: 12rem; }
.dev_config .dev_config_edit { margin: 0 var(--space-2) var(--space-1) 0; }
.dev_config textarea { margin-bottom: var(--space-1); }
.dev_colors_field { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.dev_colors_field input[type="color"] { flex: 0 0 auto; width: 44px; height: var(--control-h); padding: 2px; margin: 0; cursor: pointer; }
.dev_colors_field input[type="text"] { flex: 0 1 8rem; width: 8rem; margin: 0; font-family: var(--font-mono); }
.dev_colors_preview { padding: var(--space-4); background: var(--bg-page); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-md); }
.dev_colors_preview .dev_colors_page_text { margin: var(--space-2) 0; color: var(--text); }
.dev_colors_preview .callout_glb h3 { margin-bottom: var(--space-2); }
.dev_colors_preview p { margin-bottom: var(--space-2); }
.dev_colors_sample { display: inline-flex; align-items: center; justify-content: center; min-width: 3rem; height: 28px; padding: 0 var(--space-2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--sample-fg); background: var(--sample-bg); font-weight: var(--fw-semibold); }
.dev_colors_pairs td:first-child { white-space: normal; min-width: 12rem; }
.dev_colors_pairs td.dev_colors_ratio { white-space: nowrap; font-variant-numeric: tabular-nums; }
.dev_colors_pairs td.dev_colors_ratio small { display: block; }
#DEV_colors_messages ul { margin: 0 0 0 var(--space-5); }
#DEV_colors_messages > div { margin-bottom: var(--space-3); }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Administration du noyau (RA1, RA3, RA4) : sections du menu, boutons d'ordre (Monter, Descendre)                  */
/* ---------------------------------------------------------------------------------------------------------------- */

.order_buttons { display: inline-flex; gap: var(--space-1); white-space: nowrap; }
td.order_buttons { display: table-cell; width: 1%; }
td.order_buttons .button + .button { margin-left: var(--space-1); }
.menu_section_head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin: 0 0 var(--space-3); }
.menu_section_head h2 { flex: 1 1 12rem; margin: 0; }
.menu_section_head h2 small { font-size: var(--fs-sm); font-weight: var(--fw-regular); margin-left: var(--space-2); }
.menu_section_head .details_buttons { display: inline-flex; flex-wrap: wrap; gap: var(--space-2); }
.menu_section_head .details_buttons .button { margin: 0; }
.menu_section_table { margin-bottom: 0; }
.menu_section_table th:not(:first-child), .menu_section_table td:not(:first-child) { width: 1%; white-space: nowrap; }
.menu_section > p:last-child { margin-bottom: 0; }
/* applications de l'instance (RA4) : glyphe et référence, couleur réglée dans la liste, aperçu et couleurs déjà prises */
.application_cell { display: inline-flex; align-items: center; gap: var(--space-3); }
.application_cell .app_icon { font-size: 2rem; }
.application_color { display: inline-flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.application_color input[type="color"] { width: 2.5em; height: 1.8em; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; }
.application_color input[type="text"] { width: 7em; margin: 0; }
.application_preview { text-align: center; margin: 0 0 var(--space-4); }
.application_preview .app_icon { font-size: 4rem; }
.application_swatches { display: inline-flex; flex-wrap: wrap; gap: var(--space-1); }
.application_swatches .color_swatch { width: 1.6em; height: 1.6em; padding: 0; margin: 0; border-radius: var(--radius-full); background: var(--tag); cursor: pointer; }
.application_swatches .color_swatch:focus-visible { outline: var(--focus-outline); outline-offset: 2px; }
/* utilisateurs, groupes, unités (RA1) : arbre des unités (retrait selon --level), ligne d'une fiche désactivée */
.unit_tree td.unit_tree_name { padding-left: calc(var(--space-3) + var(--level, 0) * 1.6em); }
.tableCSS tr.is_inactive td { color: var(--text-muted); }
/* configuration globale (DEV) : nom de la variable, valeur longue coupée, JSON en police fixe */
.variables_table code.variable_name { overflow-wrap: anywhere; }
.variables_table td.variable_value { overflow-wrap: anywhere; max-width: 32rem; }
textarea.variable_json { font-family: var(--font-mono, monospace); font-size: var(--fs-sm); }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Textes d'état (à la place d'un style="color:…" : une page n'écrit jamais de couleur, vérificateur U04)            */
/* ---------------------------------------------------------------------------------------------------------------- */

.text_muted { color: var(--text-muted); }
.text_primary { color: var(--primary-ink); }
.text_danger { color: var(--danger-ink); }
.text_warning { color: var(--warning-ink); }
.text_success { color: var(--success-ink); }

/* ---------------------------------------------------------------------------------------------------------------- */
/* Modes d'affichage                                                                                                */
/* ---------------------------------------------------------------------------------------------------------------- */
/* Les couleurs de chaque mode (couleurs de l'instance, sombre, contraste élevé) sont des jetons calculés par le
   serveur (C1_Theme, variables.css.php), y compris le soulignement des liens et l'épaisseur du focus du contraste
   élevé. Ici, ce que les jetons ne font pas. */

/* ---------------------------------------------------------------------------------------------------------------- */
/* Assistant (C1_Assistant, layout/assistant.inc.php, tools/assistant.js) : bouton de la barre du haut, panneau de    */
/* conversation à droite (la page se resserre sur grand écran), plein écran au téléphone ; bulles de la personne et */
/* de l'assistant, cartes de validation des propositions (section IA), état « en cours »                           */
/* ---------------------------------------------------------------------------------------------------------------- */

.assistant_button {
	position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
	width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--radius-md); background: transparent;
	color: var(--text-muted); cursor: pointer;
}
.assistant_button i { font-size: 20px; }
.assistant_button:hover, .assistant_button[aria-expanded="true"] { background: var(--bg-hover); color: var(--text-strong); }
.assistant_button:focus-visible { outline: var(--focus-outline); outline-offset: 2px; }
.title-bar .menu .assistant_button { flex-direction: column; width: auto; min-width: 56px; height: 48px; padding: 0 var(--space-2); color: var(--gray-700); }
.title-bar .menu .assistant_button i { font-size: 22px; }

.assistant_panel {
	position: fixed; z-index: 990; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column;
	width: min(420px, 100vw); background: var(--bg-surface); color: var(--text);
	border-left: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.assistant_panel[hidden] { display: none; }
@media (min-width: 75em) {
	body.assistant_open { padding-right: 420px; }
	body.assistant_open .assistant_panel { box-shadow: none; }
}
body.assistant_fullscreen { overflow: hidden; }
body.assistant_fullscreen .assistant_panel { width: 100vw; border-left: 0; box-shadow: none; }
.assistant_head {
	display: flex; align-items: center; gap: var(--space-1); flex: 0 0 auto;
	min-height: var(--topbar-h); padding: 0 var(--space-2) 0 var(--space-4); border-bottom: 1px solid var(--border);
}
.assistant_head h2 { flex: 1 1 auto; margin: 0; font-size: var(--fs-md); line-height: var(--lh-md); font-weight: var(--fw-semibold); }
.assistant_head h2:focus { outline: none; }
.assistant_tool {
	display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0;
	border: 0; border-radius: var(--radius-md); background: transparent; color: var(--text-muted); cursor: pointer;
}
.assistant_tool:hover, .assistant_tool[aria-expanded="true"] { background: var(--bg-hover); color: var(--text-strong); }
.assistant_tool:focus-visible { outline: var(--focus-outline); outline-offset: 2px; }
.assistant_history { flex: 0 1 auto; max-height: 45%; overflow-y: auto; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--border); background: var(--bg-subtle); }
.assistant_history[hidden] { display: none; }
.assistant_history_title { font-size: var(--fs-sm); line-height: var(--lh-sm); font-weight: var(--fw-semibold); color: var(--text-muted); margin: 0 0 var(--space-2); }
.assistant_history_empty { font-size: var(--fs-sm); color: var(--text-muted); }
.assistant_history_list { list-style: none; margin: 0; padding: 0; }
.assistant_history_item { display: flex; align-items: center; gap: var(--space-1); }
.assistant_history_open {
	flex: 1 1 auto; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: var(--space-2);
	border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit;
}
.assistant_history_open:hover { background: var(--bg-hover); }
.assistant_history_open:focus-visible { outline: var(--focus-outline); outline-offset: -2px; }
.assistant_history_name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--fw-medium); }
.assistant_history_meta { font-size: var(--fs-xs); color: var(--text-muted); }
.assistant_log { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-4); }
.assistant_log:focus-visible { outline: var(--focus-outline); outline-offset: -3px; }
.assistant_welcome { font-size: var(--fs-sm); color: var(--text-muted); }
.assistant_welcome p { margin-bottom: var(--space-2); }
.assistant_welcome ul { margin: 0 0 0 var(--space-5); }
.assistant_welcome[hidden] { display: none; }
.assistant_message { display: flex; flex-direction: column; gap: var(--space-1); max-width: 100%; }
.assistant_message.is_person { align-items: flex-end; }
.assistant_bubble { max-width: 92%; padding: var(--space-2) var(--space-3); border-radius: var(--radius-lg); overflow-wrap: anywhere; }
.assistant_message.is_person .assistant_bubble { background: var(--primary-tint); color: var(--primary-ink); border-bottom-right-radius: var(--radius-sm); }
.assistant_message.is_pending .assistant_bubble { opacity: 0.75; }
.assistant_message.is_assistant .assistant_bubble { max-width: 100%; background: var(--bg-subtle); border: 1px solid var(--border); border-bottom-left-radius: var(--radius-sm); }
.assistant_message.is_failed .assistant_bubble { background: var(--danger-tint); color: var(--danger-ink); border-color: var(--danger-border); }
.assistant_bubble .markdown_body > :last-child { margin-bottom: 0; }
.assistant_page, .assistant_notice, .assistant_credit { font-size: var(--fs-xs); line-height: var(--lh-xs); color: var(--text-muted); max-width: 92%; }
.assistant_notice { color: var(--warning-ink); }
.assistant_cards { margin: var(--space-1) 0 0; }
.assistant_cards .ai_card { margin-bottom: var(--space-2); }
.assistant_status { flex: 0 0 auto; padding: 0 var(--space-4); font-size: var(--fs-sm); color: var(--text-muted); min-height: 0; }
.assistant_status.is_working { padding-block: var(--space-2); }
.assistant_status.is_working::before {
	content: ""; display: inline-block; width: 10px; height: 10px; margin-right: var(--space-2); vertical-align: middle;
	border-radius: var(--radius-full); background: var(--primary); animation: assistant_pulse 1s ease-in-out infinite;
}
@keyframes assistant_pulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .assistant_status.is_working::before { animation: none; } }
.assistant_form { flex: 0 0 auto; display: flex; gap: var(--space-2); align-items: flex-end; padding: var(--space-3) var(--space-4) var(--space-2); border-top: 1px solid var(--border); }
.assistant_form textarea { flex: 1 1 auto; min-height: 44px; max-height: 160px; resize: vertical; margin: 0; }
.assistant_form .button { margin: 0; flex: 0 0 auto; }
.assistant_disclosure { flex: 0 0 auto; padding: 0 var(--space-4) var(--space-3); font-size: var(--fs-xs); line-height: var(--lh-xs); color: var(--text-muted); }
@media (max-width: 49.99em) {
	.assistant_form textarea { font-size: var(--fs-md); }
	.assistant_send { min-height: var(--control-h-touch); }
}

/* tâches d'agents (core/agents/run.php) et automatismes (C1_Automations::display, RA1 > Automatismes) */
.agent_task_title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.agent_task_facts { display: grid; grid-template-columns: minmax(9rem, 13rem) 1fr; gap: var(--space-1) var(--space-3); margin: var(--space-3) 0; font-size: var(--fs-sm); }
.agent_task_facts dt { font-weight: var(--fw-semibold); color: var(--text-label); }
.agent_task_facts dd { margin: 0; overflow-wrap: anywhere; }
.agent_task_problem { color: var(--danger-ink); font-weight: var(--fw-semibold); }
.agent_task_runs { margin-top: var(--space-3); }
@media (max-width: 49.99em) {
	.agent_task_facts { grid-template-columns: 1fr; }
	.agent_task_facts dd { margin-bottom: var(--space-2); }
}
.automation_stop { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.automation_stop p { margin: 0; }
/* abonnements sans compte : leurs événements sont perdus (en tête de l'écran et sur la ligne) */
.automation_lost { border-color: var(--warning-border); background: var(--warning-tint); color: var(--text-strong); }
.automation_lost p { margin: 0; }
.automation_lost_list { margin: var(--space-2) 0 0; padding-left: var(--space-4); }
.automation_lost_text { color: var(--danger-ink); font-size: var(--fs-sm); }
.automation_stop.is_stopped { border-color: var(--danger-border); background: var(--danger-tint); color: var(--danger-ink); }
.automations_table td { vertical-align: top; }
.automations_table .button-group { margin: 0; }
.automations_table .button-group .button { white-space: normal; }
.automation_jobs td { vertical-align: top; }
/* DEV > Intégrations : un bloc par service tiers (connexions, entrées de webhooks) */
.integration_card h2.details { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.integration_heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-2); margin-top: var(--space-4); font-size: var(--fs-md); line-height: var(--lh-md); }
.integration_heading small { font-size: var(--fs-sm); font-weight: var(--fw-regular); }
.integration_actions { white-space: nowrap; }
.integration_handlers { margin: var(--space-2) 0 0; padding-left: var(--space-4); }
.agent_triggers { margin: 0; padding-left: var(--space-4); font-size: var(--fs-sm); }
.agent_triggers li + li { margin-top: var(--space-1); }
.automation_chain { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-1); font-size: var(--fs-sm); }
.automation_chain li { overflow-wrap: anywhere; }
.automation_chain li + li::before { content: "→ "; color: var(--text-muted); }
.automation_chain_event { color: var(--text-muted); }
.recruit_list { margin: 0; padding-left: var(--space-4); }

/* Service Documents (C1_Documents) : éditeur d'un modèle (DEV > Documents > Modèles), aperçu des pages, documents
   produits d'une fiche */
.document_editor_text { width: 100%; font-family: "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--fs-sm);
	line-height: 1.45; tab-size: 4; white-space: pre; overflow-wrap: normal; overflow-x: auto; }
.document_editor_css { margin: var(--space-2) 0 var(--space-3); }
.document_editor_css > summary { cursor: pointer; color: var(--text-label); }
.document_preview { max-height: 80vh; overflow-y: auto; padding: var(--space-2); background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius-md); }
.document_preview img { display: block; width: 100%; height: auto; margin: 0 0 var(--space-3); box-shadow: var(--shadow-sm); }
.document_preview:empty { display: none; }
.documents_produced h3 { font-size: var(--fs-md); margin-bottom: var(--space-2); }

/* Contraste élevé de Windows (couleurs forcées) : le navigateur impose ses couleurs système ; une information portée
   par un fond seul (étape courante, page active, pastille) reçoit un contour, chaque bouton et chaque pastille une
   bordure, le focus un contour épais. */
@media (forced-colors: active) {
	.button, button, body .btn, .label, .notify_badge, .user_avatar, .search_count, .notify_count { border: 1px solid ButtonText; }
	.label { border-color: CanvasText; }
	:focus-visible { outline: 3px solid Highlight; outline-offset: 2px; }
	.stage_steps_item.is_current, .stage_steps_item:has(input:checked), .stage_steps_all:has(input:checked),
	.apps_left_menu_item.active, .toc_page.is_current > .toc_line, .toc_chapter.is_current > .toc_line,
	.pagination > .active > span, .ts-dropdown .active, .markdown_tool[aria-pressed="true"], .markdown_tool[aria-expanded="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
	.markdown_body .md_callout, .md_editor_directive, .markdown_body details.md_details, .markdown_menu { border-color: CanvasText; }
	.markdown_tool:disabled, .markdown_menu_item:disabled { color: GrayText; opacity: 1; }
	.markdown_tool:focus-visible, .markdown_menu_item:focus-visible, .md_editor_directive_remove:focus-visible { outline: 3px solid Highlight; outline-offset: -1px; }
	/* triangles dessinés par des bordures (menus déroulants) : sans cela, un carré */
	.dropdown.menu > li.is-dropdown-submenu-parent > a::after { forced-color-adjust: none; border-color: CanvasText transparent transparent; }
	/* onglets : seul l'onglet actif est souligné */
	#mainmenu_application a, #mainmenu_application a.button { forced-color-adjust: none; color: LinkText; background: Canvas; border-bottom-color: transparent; }
	#mainmenu_application a.active, #mainmenu_application a.active:hover { color: CanvasText; border-bottom: 3px solid Highlight; }
	.notify_dot, .session_dot, .notify_button.has_todo::after { forced-color-adjust: none; background: CanvasText; }
	.color_swatch { forced-color-adjust: none; }
	select, .ts-wrapper.single .ts-control { background-image: none; appearance: auto; -webkit-appearance: auto; padding-right: var(--space-3); }
	.jconfirm .jconfirm-box, .notify_panel, .ts-dropdown, .assistant_panel, .assistant_bubble { border: 1px solid CanvasText; }
	.assistant_status.is_working::before { forced-color-adjust: none; background: CanvasText; }
	.diff_view tr.is_add td:first-child, .diff_view tr.is_del td:first-child { border-left: 3px solid CanvasText; }
	/* texte coloré : gras souligné ; surlignage : couleurs « Mark » du système (rien ne disparaît) */
	.md_color { font-weight: 700; text-decoration: underline; }
	mark.md_mark, mark.md_mark:is(.is_yellow, .is_green, .is_red, .is_blue) { forced-color-adjust: none; background: Mark; color: MarkText; outline: 1px solid MarkText; }
	mark.md_mark *, mark.md_mark .md_color:is(.is_red, .is_orange, .is_green, .is_blue, .is_gray) { color: MarkText; background: transparent; }
	.markdown_color_bar { forced-color-adjust: none; background: CanvasText; }
}
