/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *
 */

body#body{
	color: #002330;
	font-family: Arial, Helvetica, sans-serif;
	padding-bottom: 5em;
}
table:not(.very.basic){
	background-color: white !important;
	/*border-top: solid 6px rgb(8 198 192) !important;*/	
}

nav a{
	font-size:0.9em;
}
#body a, #body a:visited {
 color:#001030;
}

nav.ui.secondary.menu .ui.item{
	padding:0.4em;
}

#body nav.ui.secondary.top.menu {
	position: relative;
	z-index: 1000;
}

#body nav.ui.secondary.top.menu .ui.dropdown .menu {
	z-index: 1001;
}

h1{
	/*font-weight: lighter !important;*/
	font-size: 2rem !important;
	color: #036065;
}
h2{
	color: #036065;
}

.ui.tree.table{
    /*border: 1px solid red;*/
   /* border-collapse:collapse;*/
	/*border-radius: 10px;*/

}
/*
.ui.tree.table tr:first-of-type>th:first-of-type{
	border-radius:10px 0 0 0;
}
.ui.tree.table tr:first-of-type>th:last-of-type{
	border-radius:0 10px 0 0;
}*/


.ui.tree.table>tbody>tr>td { /*, .ui.tree.table>thead>tr>th {*/
 	padding: 0 .78571429em;
}
.ui.tree.sortable.table>thead>tr>th {
 	white-space: normal;
}

.ui.tree.table>tbody>tr.description>td {
 	padding: 0.392857145em .78571429em;
} 
 
/*.ui.tree.table>tbody>tr[data-expandable='true'] {*/
.ui.tree.table>tbody>tr.expandable	{
    cursor:pointer;
    /*font-weight: bold;*/
}
/*
.ui.tree.table>tbody>tr.expanded .sign:after {
    content:"-";
}
.ui.tree.table>tbody>tr.folded .sign:after {
    content:"+";
}
*/

/*
.ui.tree.table>tbody>tr>td:first-child {
    padding: inherit;
}*/

.ui.tree.table>tbody>tr>td>div{
	margin: 0.2em .1em 0.2em .78571429em;
}
.ui.tree.table .field_description>td{
	padding: 0.4em .1em 0.4em 2em;
}
.ui.tree.table>tbody>tr>th{
 	padding: .78571429em .78571429em;
}
.indent{
	color:white
}
body:has(td.field_name:hover) .indent {
    color: #ccc;
}

.ui.compacter.table>tbody>tr>td {
 	padding: 0.1em 0.3em 0.1em 0.6em;
} 

.caret.icon{
	transition: all .3s ease-in;
}
.expanded .caret.icon{
	transform: rotate(0deg);
}
.folded .caret.icon{
	transform: rotate(-90deg);
}

.rotate.icon{
	/*transition: all .2s ease-in;*/
}
.rotate.icon:hover{
	/*transform: rotate(-180deg);*/
}

pre{
	margin:0;
}

*:not(.action.input)>.ui.button{
	border-radius:20px !important;
}
#body .ui.primary.button{
	transition: background-color .2s ease-in;
	background-color:#002330 !important;
	color: white;
}
#body .ui.primary.button:hover{
	background-color:#036065 !important;
}
#body .ui.secondary.button{
	transition: background-color .2s ease-in;
	transition: color .2s ease-in;
	background-color:#fff !important;
	color: #002330 !important;
	border: solid 2px #002330 !important;
}
.ui.secondary.button:hover{
	border-color:#036065 !important;
	color:#036065 !important;
}

#protocols .ui.secondary.tiny.button {
  margin-top: 3px;
  border-width: 1px !important;
  font-weight: normal;
}

#toc ol{
	list-style: none;
	margin: 0;
	padding-left:.2em;
}

.toc_h1{
	text-transform: uppercase;
	font-weight:bold;
	margin:.9em 0;
}
.toc_h2{
	font-variant: small-caps;
	margin:.5em 0 0 0.8em;
}
.toc_h3{
	font-style: italic;
	margin-left: 1.6em;
}
.toc_h4{
	font-size: .9em;
	margin-left: 2.4em;
}
.toc_h5{
	font-size: .9em;
	margin-left: 3em;
}
.toc_h1 a, .toc_h2 a, .toc_h3 a, .toc_h4 a, .toc_h5 a{
	color: #001030;
}
.segment h1, .segment h2, .segment h3, .segment h4, .segment h5{
	scroll-margin-top: 6rem;
}



.field .ui.search.selection.dropdown.large:not(.downward) .menu.transition.visible {
	width: 500px;
	border-radius: 0px 4px 4px 4px;
}

.field .ui.search.selection.dropdown.large.upward .menu.transition.visible {
	width: 500px;
	border-radius: 4px 4px 4px 0px;
}

body code {
  font-family: monospace,monospace;
  font-size: .9em;
  color: #15b;
}

.ui.form .inline.fields .field > .selection.dropdown.larger {
  width: 16em;
}

.ui.form .inline.fields .field > .selection.dropdown.larger20 {
  width: 20em;
}
figcaption{
	font-weight: bold;
	text-align: center;
}
figcaption::before{
	content: "Figure: ";
}
figcaption img, :not(header) img{
	max-width: 100%;
}


.search .shortcuthint {
  position: absolute;
  right: 2.9em;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8em;
  color: rgba(0,0,0,.45);
  background: rgba(0,0,0,.05);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  pointer-events: none;
}/* Frenchsys dashboard */
#frenchsys-dashboard-root,
#frenchsys-reports-root,
#frenchsys-import-root {
  --brand: #1f6bff;
  --brand-dark: #0e4dd6;
  --brand-light: #e8f0ff;
  --fs-row-height: 40px;
  --fs-control: 32px;
  --fs-control-lg: 38px;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-6: 24px;
  --text: #0f172a;
  --muted: #64748b;
  --faint: #8292a9;
  --line: #e2e8f0;
  --soft-line: #f1f5f9;
  --surface: rgba(255, 255, 255, 0.96);
  --shadow-soft: 0 10px 35px rgba(15, 23, 42, 0.07);
  margin-top: 1rem;
  color: var(--text);
}

#frenchsys-dashboard-root,
#frenchsys-dashboard-root *,
#frenchsys-reports-root,
#frenchsys-reports-root *,
#frenchsys-import-root,
#frenchsys-import-root * {
  box-sizing: border-box;
}

#frenchsys-dashboard-root button:not(:disabled),
#frenchsys-dashboard-root [role="button"]:not([aria-disabled="true"]),
#frenchsys-dashboard-root a[href],
#frenchsys-reports-root button:not(:disabled),
#frenchsys-reports-root [role="button"]:not([aria-disabled="true"]),
#frenchsys-reports-root a[href] {
  cursor: pointer;
}

#frenchsys-dashboard-root button:disabled,
#frenchsys-dashboard-root [aria-disabled="true"],
#frenchsys-reports-root button:disabled,
#frenchsys-reports-root [aria-disabled="true"] {
  cursor: default;
}

.fs-primary-button,
.fs-secondary-button,
.fs-ghost-button,
.fs-pill-button,
.fs-add-button,
.fs-warning-button,
.fs-icon-button,
.fs-row-action,
.fs-pagination button {
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0.52rem 0.82rem;
  color: #334155;
  background: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.fs-primary-button {
  color: #ffffff;
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 8px 18px rgba(31, 107, 255, 0.18);
}

.fs-primary-button:hover {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
  box-shadow: 0 10px 22px rgba(31, 107, 255, 0.24);
}

/* Contour : l'export garde seul le bleu plein */
.fs-add-button {
  color: var(--brand);
  border-color: rgba(31, 107, 255, 0.45);
  background: #ffffff;
}

.fs-add-button:hover {
  border-color: var(--brand);
  background: var(--brand-light);
}

.fs-secondary-button:hover,
.fs-icon-button:hover,
.fs-pill-button:hover,
.fs-pagination button:hover:not(:disabled) {
  border-color: rgba(31, 107, 255, 0.5);
  color: var(--brand);
  background: rgba(31, 107, 255, 0.06);
}

.fs-ghost-button:hover {
  border-color: rgba(148, 163, 184, 0.28);
  color: #334155;
  background: #f8fafc;
}

.fs-ghost-button {
  color: var(--muted);
  border-style: dashed;
  background: transparent;
}

.fs-pill-button {
  padding: 0.42rem 0.7rem;
  color: var(--brand);
  border-color: rgba(31, 107, 255, 0.18);
  border-radius: 999px;
  background: rgba(31, 107, 255, 0.08);
}

.fs-warning-button {
  border-color: #fbbf24;
  color: #92400e;
  background: #fffbeb;
}

.fs-warning-button:hover:not(:disabled):not(.is-disabled) {
  border-color: #f59e0b;
  color: #78350f;
  background: #fef3c7;
}

.fs-warning-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.fs-warning-button.is-active {
  border-color: #f59e0b;
  color: #78350f;
  background: #fef3c7;
}

.fs-warnings-menu {
  min-width: 280px;
}

.fs-warnings-menu .fs-filter-option span {
  flex: 1;
}

.fs-filter-values .fs-filter-option span {
  flex: 1;
}

.fs-warning-count,
.fs-value-count {
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.fs-warning-button.is-disabled {
  border-color: var(--line);
  color: var(--faint);
  background: #f8fafc;
  cursor: default;
}

.fs-primary-button:disabled,
.fs-secondary-button:disabled,
.fs-ghost-button:disabled,
.fs-pill-button:disabled,
.fs-add-button:disabled,
.fs-icon-button:disabled,
.fs-pagination button:disabled {
  cursor: default;
  opacity: 0.58;
}

.fs-icon-button.active {
  border-color: rgba(31, 107, 255, 0.45);
  color: var(--brand);
  background: var(--brand-light);
}

.fs-dashboard-shell {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.fs-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-4);
  align-items: start;
}

.fs-workspace {
  padding: var(--sp-4) var(--sp-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.fs-filter-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 10px;
  padding: 0.38rem 0.2rem;
  color: #334155;
  background: transparent;
}

.fs-filter-option:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.08);
}

.fs-filter-option input {
  margin: 0;
}

.fs-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.fs-workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.fs-workspace-tools {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}

.fs-workspace-tools > button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.fs-workspace-settings {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: var(--fs-control-lg);
  min-height: var(--fs-control-lg);
  padding: 0;
  border-color: transparent;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  line-height: 1;
}

.fs-workspace-settings svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fs-workspace-tools .fs-ghost-button,
.fs-workspace-tools .fs-primary-button,
.fs-workspace-tools .fs-workspace-settings {
  height: var(--fs-control-lg);
}

.fs-workspace-tools .fs-ghost-button,
.fs-workspace-tools .fs-primary-button {
  border-radius: 999px;
}

.fs-workspace-tools .fs-ghost-button {
  border-color: transparent;
  color: var(--muted);
  background: transparent;
}

.fs-workspace-tools .fs-ghost-button:hover {
  border-color: rgba(148, 163, 184, 0.18);
  color: #334155;
  background: #f8fafc;
}

.fs-workspace-tools .fs-ghost-button.active {
  color: var(--brand);
  background: var(--brand-light);
}

.fs-external-icon {
  width: 12px;
  height: 12px;
  margin-left: 2px;
  vertical-align: -1px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.7;
}

.fs-workspace-tools .fs-primary-button {
  box-shadow: none;
}

.fs-workspace-tools .fs-workspace-settings {
  margin-left: 0;
}

.fs-workspace-settings:hover {
  border-color: rgba(148, 163, 184, 0.24);
  color: #334155;
  background: #f8fafc;
}

.fs-workspace-settings.active {
  border-color: rgba(31, 107, 255, 0.18);
  color: var(--brand);
  background: rgba(31, 107, 255, 0.08);
}

.fs-tabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: var(--fs-control-lg);
  border: 0;
  border-radius: 999px;
  padding: 0 0.9rem;
  color: var(--muted);
  background: transparent;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.fs-tabs button:hover:not(:disabled):not(.active) {
  color: #334155;
  background: #f8fafc;
}

.fs-tabs button.active {
  color: var(--text);
  background: rgba(31, 107, 255, 0.08);
}

.fs-tabs button.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand);
}

.fs-tabs button:disabled {
  cursor: default;
  opacity: 0.55;
}

.fs-toolbar {
  margin-bottom: var(--sp-4);
  padding: 0 0 var(--sp-4);
  border-bottom: 1px solid var(--soft-line);
  background: transparent;
}

.fs-toolbar-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.fs-toolbar-row + .fs-toolbar-row {
  margin-top: var(--sp-2);
}

/* Tout ce qui vit dans la barre d'outils partage une hauteur */
.fs-toolbar-row .fs-add-button,
.fs-toolbar-row .fs-warning-button,
.fs-toolbar-row .fs-selection-pill,
.fs-pagination button {
  display: inline-flex;
  align-items: center;
  height: var(--fs-control);
  padding-top: 0;
  padding-bottom: 0;
}

.fs-toolbar-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.fs-search {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  height: var(--fs-control);
  width: min(520px, 42vw);
  min-width: 280px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  padding: 0 var(--sp-2) 0 var(--sp-3);
  background: #fbfdff;
}

.fs-search span {
  color: var(--faint);
  font-size: 1rem;
}

.fs-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #334155;
  background: transparent;
  font-size: 0.88rem;
}

.fs-filter-sets {
  display: grid;
  gap: var(--sp-2);
  width: 100%;
}

.fs-filter-sets select,
.fs-settings-field select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.48rem 0.7rem;
  color: #334155;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fs-filter-sets select:hover,
.fs-settings-field select:hover {
  border-color: rgba(31, 107, 255, 0.42);
}

.fs-filter-sets .fs-secondary-button,
.fs-filter-sets .fs-ghost-button {
  justify-content: center;
}

.fs-count {
  color: #475569;
  font-size: 0.88rem;
  font-weight: 700;
}

.fs-pagination {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-left: auto;
}

.fs-settings-panel {
  margin-top: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.fs-settings-panel.is-hidden {
  display: none;
}

.fs-settings-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--sp-3);
}

.fs-settings-field {
  display: grid;
  gap: var(--sp-2);
}

.fs-settings-field label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.fs-settings-field select {
  height: var(--fs-control-lg);
}

.fs-settings-field.is-disabled label {
  color: var(--faint);
}

.fs-settings-field select:disabled {
  color: var(--faint);
  background: var(--soft-line);
  cursor: not-allowed;
}

/* Piste grise, segment actif en relief */
.fs-segmented {
  display: flex;
  align-items: center;
  gap: 2px;
  height: var(--fs-control-lg);
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #eef2f7;
}

.fs-segmented button {
  flex: 1;
  height: 100%;
  border: 0;
  border-radius: 7px;
  padding: 0 0.6rem;
  color: var(--muted);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.fs-segmented button:hover:not(.active) {
  color: #334155;
}

.fs-segmented button.active {
  color: var(--brand);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.14);
}

.fs-state-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  min-height: 220px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(248, 250, 252, 0.88);
}

.fs-state-message p {
  margin: 0;
  font-weight: 700;
}

.fs-state-error {
  color: #991b1b;
  background: #fef2f2;
}

.fs-create-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(4px);
}

.fs-create-form {
  display: grid;
  gap: var(--sp-3);
  width: min(1440px, calc(100vw - 3rem));
  max-height: calc(100vh - 4rem);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.fs-create-sections {
  display: grid;
  gap: var(--sp-4);
}

.fs-create-section {
  display: grid;
  gap: var(--sp-2);
  border-top: 1px solid var(--soft-line);
  padding-top: 0.85rem;
}

.fs-create-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.fs-create-section h4 {
  margin: 0;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fs-create-form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
}

.fs-create-form-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
}

.fs-draft-tag {
  margin-left: var(--sp-2);
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 0.7rem;
  font-weight: 700;
}

.fs-create-source {
  margin: var(--sp-1) 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

/* Quatre colonnes : un scheme (compliant, date, reference large) tient sur une ligne */
.fs-create-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-3);
}

.fs-create-field {
  display: grid;
  gap: var(--sp-1);
}

.fs-create-field-wide {
  grid-column: span 2;
}

.fs-create-field span,
.fs-create-label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.fs-create-field-shell {
  position: relative;
}

.fs-create-field input,
.fs-create-field select {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.58rem 0.7rem;
  color: #334155;
  background: #ffffff;
}

.fs-create-field input:focus,
.fs-create-field select:focus {
  border-color: rgba(31, 107, 255, 0.5);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(31, 107, 255, 0.08);
}

.fs-create-suggestions {
  position: absolute;
  z-index: 1300;
  top: calc(100% + 0.35rem);
  right: 0;
  left: 0;
  display: none;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.3rem;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
}

.fs-create-field-shell.is-suggesting .fs-create-suggestions:not(:empty) {
  display: grid;
  gap: 0.15rem;
}

.fs-create-suggestion-option {
  width: 100%;
  border: 0;
  border-radius: 9px;
  padding: 0.5rem 0.6rem;
  color: #334155;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.fs-create-suggestion-option:hover,
.fs-create-suggestion-option:focus {
  color: var(--text);
  background: #eff6ff;
  outline: 0;
}

.fs-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2);
}

.fs-create-error {
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  color: #991b1b;
  background: #fef2f2;
  font-weight: 700;
}

.fs-loader {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(31, 107, 255, 0.18);
  border-top-color: var(--brand);
  border-radius: 999px;
  animation: fs-spin 0.8s linear infinite;
}

/* Arrondi porte par le parent : sinon la barre de defilement deborde du coin */
#fs-table-region {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  overflow: hidden;
}

.fs-refreshing {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  overflow: hidden;
  background: var(--soft-line);
  z-index: 60;
}

.fs-refreshing::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28%;
  background: var(--brand);
  animation: fs-refreshing 0.9s ease-in-out infinite;
}

@keyframes fs-refreshing {
  from { transform: translateX(-100%); }
  to { transform: translateX(460%); }
}

.fs-table-wrap {
  overflow: auto;
  background: #ffffff;
}

.fs-table {
  /* Colonnes fluides : la table remplit l'espace disponible ; sa largeur mini
     (somme des colonnes) est posee en ligne par le rendu. */
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.fs-table th,
.fs-table td {
  border-bottom: 1px solid var(--soft-line);
  padding: 0.52rem 0.7rem;
}

.fs-table thead th {
  position: sticky;
  top: 0;
  z-index: 30;
  color: #334155;
  background: #f8fafc;
  white-space: nowrap;
  cursor: pointer;
}

.fs-table .fs-column-groups th {
  top: 0;
  z-index: 32;
  height: 24px;
  border-bottom: 0;
  color: var(--muted);
  background: #f8fafc;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding-left: 2px;
  padding-right: 2px;
  /* Compense le letter-spacing de fin, sinon le texte penche a gauche */
  text-indent: 0.1em;
  text-align: center;
  text-transform: uppercase;
  cursor: default;
  overflow: hidden;
}

.fs-table .fs-column-groups th > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fs-table .fs-column-headings th {
  top: 24px;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
}

.fs-table th.fs-group-start,
.fs-table td.fs-group-start {
  border-left: 1px solid #d8e0ec;
}

.fs-table td {
  position: relative;
  height: var(--fs-row-height);
  max-height: var(--fs-row-height);
  vertical-align: middle;
}

.fs-table tbody tr:not(.fs-spacer-row) {
  height: var(--fs-row-height);
  max-height: var(--fs-row-height);
}

.fs-table tr:hover td {
  background: rgba(248, 250, 252, 0.95);
}

.fs-sticky-left,
.fs-table td.fs-sticky-left {
  position: sticky;
  z-index: 10;
  background: #ffffff !important;
}

.fs-table thead .fs-sticky-left {
  z-index: 40;
  background: #f8fafc !important;
}

.fs-table .fs-column-groups .fs-sticky-left {
  background: #f8fafc !important;
}

.fs-table tr:hover .fs-sticky-left {
  background: #f8fafc !important;
}

.fs-sticky-left {
  left: 0;
  text-align: right;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.fs-row-warning td,
.fs-row-warning .fs-sticky-left {
  background: #fff7ed !important;
}

.fs-row-warning.fs-dup-band-1 td,
.fs-row-warning.fs-dup-band-1 .fs-sticky-left {
  background: #ffedd5 !important;
}

.fs-dup-start td {
  border-top: 2px solid #fdba74;
}

.fs-dup-count {
  margin-left: 2px;
  color: #c2410c;
  font-family: var(--font-sans, inherit);
  font-size: 0.7rem;
  font-weight: 700;
}

.fs-table td.fs-cell-variant::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  border-top: 8px solid #f59e0b;
  border-left: 8px solid transparent;
  pointer-events: none;
}

.fs-cell-value {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
  max-height: 2.4em;
  line-height: 1.2;
}

.fs-density-compact .fs-cell-value {
  -webkit-line-clamp: 1;
  max-height: 1.2em;
}

.fs-cell-itp,
.fs-cell-ert {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.fs-inline-input {
  width: 100%;
  border: 1px solid rgba(31, 107, 255, 0.45);
  border-radius: 8px;
  padding: 0.3rem 0.45rem;
}

.fs-warning-icon {
  color: #d97706;
  margin: 0 !important;
}

.fs-help {
  color: var(--muted);
  margin: 0 !important;
}

.fs-actions {
  display: flex;
  justify-content: center;
  gap: 0.3rem;
}

.fs-row-action {
  padding: 0.4rem 0.58rem;
  font-size: 0.74rem;
}

.fs-row-action:hover {
  border-color: rgba(31, 107, 255, 0.42);
  color: var(--brand);
  background: rgba(31, 107, 255, 0.06);
}

.fs-row-action-danger:hover {
  border-color: rgba(220, 38, 38, 0.3);
  color: #b91c1c;
  background: #fef2f2;
}

.fs-active-cell {
  outline: 2px solid rgba(31, 107, 255, 0.38);
  outline-offset: -2px;
  background: rgba(31, 107, 255, 0.05) !important;
}

.fs-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.fs-empty {
  padding: var(--sp-6) var(--sp-4);
  color: var(--muted);
  text-align: left;
}

/* Fige le texte : centre sur 80 colonnes, il tomberait hors ecran */
.fs-empty span {
  position: sticky;
  left: var(--sp-4);
}

.fs-report-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fs-report-list .item {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--soft-line);
  padding: 0.45rem 0;
}

@keyframes fs-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1100px) {
  /* Un 1fr nu ne descend pas sous min-content : le cadre cesserait de défiler */
  .fs-dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .fs-search {
    width: min(100%, 620px);
  }

  .fs-create-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .fs-toolbar-row,
  .fs-filter-sets {
    align-items: stretch;
    flex-direction: column;
  }

  .fs-toolbar-meta {
    width: 100%;
  }

  .fs-workspace-head {
    align-items: stretch;
    flex-direction: column;
  }

  .fs-workspace-tools {
    width: 100%;
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .fs-workspace {
    border-radius: 16px;
    padding: var(--sp-4);
  }

  .fs-search {
    width: 100%;
    min-width: 0;
  }

  .fs-settings-grid {
    grid-template-columns: 1fr;
  }

  .fs-create-modal {
    align-items: stretch;
    padding: 1rem;
  }

  .fs-create-form {
    width: 100%;
    max-height: calc(100vh - 2rem);
  }

  .fs-create-grid {
    grid-template-columns: 1fr;
  }

  .fs-create-field-wide {
    grid-column: span 1;
  }

  .fs-create-actions {
    flex-direction: column-reverse;
  }

  .fs-pagination {
    margin-left: 0;
  }
}

/* Frenchsys dashboard - fiche laterale (master-detail, phase 1) */
.fs-master-detail {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
}

.fs-master-detail #fs-table-region {
  flex: 1;
  min-width: 0;
}

/* Meme hauteur que le tableau, les 2px sont la bordure de #fs-table-region */
.fs-detail-panel {
  flex: 0 0 360px;
  height: calc(var(--fs-table-height, 720px) + 2px);
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

.fs-detail-empty {
  padding: var(--sp-6) var(--sp-4);
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.fs-detail-head {
  padding: var(--sp-4) var(--sp-4) var(--sp-3);
  border-bottom: 1px solid var(--line);
}

.fs-detail-warnings {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #b54708;
  font-size: 0.74rem;
  font-weight: 600;
  margin-bottom: var(--sp-2);
}

.fs-detail-head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.fs-detail-itp {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.fs-detail-itp > div {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 10px;
}

.fs-detail-itp b {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.fs-detail-pill,
.fs-status-pill {
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.66rem;
  font-weight: 600;
  background: var(--soft-line);
  color: #475569;
}

.fs-detail-pill.is-ok,
.fs-status-pill.is-ok { background: #ecfdf3; color: #15803d; }
.fs-detail-pill.is-err,
.fs-status-pill.is-err { background: #fef2f2; color: #b91c1c; }

.fs-table td .fs-status-pill {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.fs-detail-body {
  padding: var(--sp-1) var(--sp-4) var(--sp-4);
}

.fs-detail-sect {
  padding-top: var(--sp-4);
}

.fs-detail-sect h3 {
  margin: 0 0 8px;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fs-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2) var(--sp-4);
}

.fs-detail-field .fs-detail-label {
  display: block;
  font-size: 0.66rem;
  color: var(--muted);
  margin-bottom: 1px;
}

.fs-detail-field .fs-detail-value {
  font-size: 0.82rem;
  color: var(--text);
  overflow-wrap: anywhere;
}

.fs-detail-field .fs-detail-value.is-na {
  color: var(--faint);
  font-style: italic;
}

@media (max-width: 1240px) {
  .fs-detail-panel {
    display: none;
  }

  /* Sous ce seuil la fiche s'ouvre en volet par-dessus le tableau */
  .fs-detail-panel.is-drawer {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    /* Au niveau de la modale de creation : le menu du site est a 1000 */
    z-index: 1200;
    width: min(440px, 92vw);
    height: auto;
    border-radius: 0;
    box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
  }

  .fs-detail-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1190;
    background: rgba(15, 23, 42, 0.32);
  }
}

.fs-detail-drawer-bar {
  display: flex;
  justify-content: flex-end;
  padding: var(--sp-2) var(--sp-3) 0;
}

/* Fiche laterale - separations, sections vides, transition de selection */
.fs-detail-sect + .fs-detail-sect {
  margin-top: var(--sp-4);
  border-top: 1px solid var(--soft-line);
}

.fs-detail-sect.is-empty {
  padding-top: var(--sp-3);
}

.fs-detail-sect.is-empty h3 {
  margin-bottom: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
}

.fs-detail-sect.is-empty h3 span {
  margin-left: auto;
  font-size: 0.66rem;
  font-weight: 400;
  color: var(--faint);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
}

@keyframes fs-detail-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.fs-detail-panel.is-fresh .fs-detail-head,
.fs-detail-panel.is-fresh .fs-detail-body {
  animation: fs-detail-enter 0.16s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .fs-detail-panel.is-fresh .fs-detail-head,
  .fs-detail-panel.is-fresh .fs-detail-body,
  .fs-refreshing::after {
    animation: none;
  }

  .fs-refreshing::after {
    width: 100%;
  }
}

/* Fiche laterale - edition par section */
.fs-detail-sect h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
}

.fs-detail-edit-link {
  border: 0;
  background: none;
  padding: 2px 4px;
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}

/* Reste atteignable au clavier meme sans survol */
.fs-detail-sect:hover .fs-detail-edit-link,
.fs-detail-edit-link:focus-visible {
  opacity: 1;
}

.fs-detail-sect.is-editing {
  background: #f8fafc;
  border-radius: 10px;
  margin: var(--sp-4) calc(-1 * var(--sp-3)) 0;
  padding: var(--sp-3) var(--sp-3) var(--sp-4);
}

.fs-detail-field.is-editing .fs-detail-label {
  display: block;
  font-size: 0.66rem;
  color: var(--muted);
  margin-bottom: 3px;
}

.fs-detail-input {
  width: 100%;
  border: 1px solid #bcd2ff;
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 0.82rem;
  font-family: inherit;
  color: var(--text);
  background: #ffffff;
}

.fs-detail-input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.fs-date-input {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.fs-date-input input[type='text'] {
  flex: 1;
  min-width: 0;
}

.fs-date-input:has(.fs-date-calendar) input[type='text'] {
  padding-right: 2rem;
}

.fs-date-calendar {
  position: absolute;
  right: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.fs-date-calendar:hover {
  background: #f1f5f9;
  color: var(--text);
}

.fs-date-calendar svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
}

/* Present pour showPicker, invisible et hors du parcours clavier */
.fs-date-input .fs-date-native {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.fs-detail-new-value {
  display: block;
  margin-top: 3px;
  font-size: 0.66rem;
  color: #b54708;
}

.fs-detail-new-value[hidden] {
  display: none;
}

.fs-detail-error {
  margin: 10px 0 0;
  padding: 7px 10px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b42318;
  font-size: 0.74rem;
}

.fs-detail-editbar {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.fs-detail-editbar button {
  padding: 0.42rem 0.75rem;
  font-size: 0.82rem;
}

/* Barre de filtres en chips (remplace le panneau lateral) */
.fs-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  padding-bottom: var(--sp-3);
  margin-bottom: var(--sp-3);
  border-bottom: 1px solid var(--soft-line);
}

.fs-chip-wrap {
  position: relative;
}

.fs-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: var(--fs-control);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 0.75rem;
  background: #ffffff;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  max-width: 320px;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.fs-chip > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fs-chip:hover {
  border-color: rgba(31, 107, 255, 0.45);
}

.fs-chip.is-active {
  border-color: #bcd2ff;
  background: var(--brand-light);
  color: var(--brand);
}

.fs-chip-caret {
  font-size: 0.74rem;
  opacity: 0.65;
}

.fs-chip-reset {
  color: #b54708;
  border-color: #f3d9b8;
  background: #fffaeb;
}

.fs-chip-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 5px);
  left: 0;
  min-width: 232px;
  max-height: 320px;
  overflow-y: auto;
  padding: var(--sp-2);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

.fs-chip-menu-wide {
  min-width: 290px;
}

.fs-chip-menu .fs-filter-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.4rem;
  border-radius: 7px;
  font-size: 0.82rem;
  cursor: pointer;
}

.fs-chip-menu .fs-filter-option:hover {
  background: #f8fafc;
}

.fs-chip-empty {
  margin: 0;
  padding: 0.5rem;
  color: var(--muted);
  font-size: 0.74rem;
}

.fs-chip-menu .fs-filter-sets {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.fs-chip-menu .fs-filter-sets select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  font-size: 0.82rem;
  font-family: inherit;
}

/* Le dashboard Solutions est un outil pleine largeur : on elargit le conteneur
   Fomantic uniquement sur les pages qui l'hebergent. */
.ui.wide.container:has(#frenchsys-dashboard-root) {
  width: auto;
  max-width: calc(100% - 1rem);
  margin-left: auto;
  margin-right: auto;
}

/* Fiche latérale : actions de ligne en icônes discrètes */
.fs-detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.fs-detail-actions {
  display: flex;
  gap: 2px;
  flex: none;
}

.fs-detail-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  opacity: 0.65;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.fs-detail-action:hover,
.fs-detail-action:focus-visible {
  opacity: 1;
  background: var(--soft-line);
  color: var(--text);
}

/* Le crayon distingue « Dupliquer et modifier » de la copie immediate */
.fs-detail-action .fs-icon-pencil {
  stroke: var(--brand);
}

.fs-detail-action.is-danger:hover,
.fs-detail-action.is-danger:focus-visible {
  background: #fef2f2;
  color: #b42318;
}

.fs-detail-action svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Liste resserrée : densité typographique (dernier levier pour éviter le défilement) */
.fs-table th,
.fs-table td {
  padding: 0.5rem 0.55rem;
}

.fs-table td .fs-cell-value,
.fs-table td .fs-cell-itp,
.fs-table td .fs-cell-ert {
  font-size: 0.78rem;
}

.fs-table td .fs-mono {
  font-size: 0.74rem;
  letter-spacing: -0.01em;
}

/* Fiche latérale : comparaison des doublons */
.fs-detail-count {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fff7ed;
  color: #b54708;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0;
}

.fs-detail-hint {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.74rem;
}

.fs-duplicate-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fs-duplicate-row {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  padding: 7px 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.fs-duplicate-row:hover,
.fs-duplicate-row:focus-visible {
  border-color: rgba(31, 107, 255, 0.45);
  background: var(--brand-light);
}

.fs-duplicate-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.fs-duplicate-meta {
  font-size: 0.74rem;
  color: var(--muted);
}

/* Colonnes d'identité figées uniquement lorsque la table déborde */
.fs-table-wrap.is-overflowing .fs-sticky-col {
  position: sticky;
  left: var(--fs-col-left);
  z-index: 12;
  background: #ffffff;
}

.fs-table-wrap.is-overflowing thead .fs-sticky-col {
  z-index: 41;
  background: #f8fafc;
}

.fs-table-wrap.is-overflowing tr:hover .fs-sticky-col {
  background: #f8fafc;
}

.fs-table-wrap.is-overflowing .fs-row-warning .fs-sticky-col {
  background: #fff7ed;
}

.fs-table-wrap.is-overflowing .fs-row-warning.fs-dup-band-1 .fs-sticky-col {
  background: #ffedd5;
}

/* Ombre et non bordure : elle doublerait celle de la colonne suivante */
.fs-table-wrap.is-overflowing .fs-sticky-edge {
  box-shadow: 1px 0 0 #d8e0ec;
}

/* Sélecteur de colonnes */
.fs-columns-menu {
  min-width: 360px;
  max-height: 420px;
}

.fs-columns-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 2px 6px 8px;
  border-bottom: 1px solid var(--soft-line);
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.74rem;
}

.fs-values-head {
  position: sticky;
  top: calc(-1 * var(--sp-2));
  z-index: 1;
  padding-top: var(--sp-2);
  background: #ffffff;
}

.fs-columns-query {
  width: 100%;
  border: 1px solid var(--soft-line);
  border-radius: 6px;
  padding: 5px 8px;
  font: inherit;
  font-size: 0.74rem;
  color: var(--text);
}

.fs-columns-query:focus {
  outline: none;
  border-color: var(--brand);
}

.fs-columns-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  white-space: nowrap;
}

.fs-columns-buttons {
  display: flex;
  align-items: center;
  gap: 2px;
}

.fs-columns-link {
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
}

.fs-columns-link:disabled {
  color: var(--faint);
  cursor: default;
}

.fs-columns-empty {
  margin: 0;
  padding: 10px 6px;
  color: var(--muted);
  font-size: 0.74rem;
}

.fs-columns-group + .fs-columns-group {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--soft-line);
}

.fs-columns-group-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 2px;
  padding: 0.2rem 0.4rem;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.fs-columns-group-title:hover {
  background: #f8fafc;
}

.fs-columns-group-title input:disabled + span {
  color: var(--faint);
}

.fs-columns-group-count {
  margin-left: auto;
  color: var(--faint);
  font-weight: 600;
  letter-spacing: 0;
}

.fs-columns-menu .fs-filter-option input:disabled + span {
  color: var(--faint);
}

/* Sélection de lignes par le numéro */
.fs-table tbody td[data-action='select-row'] {
  cursor: pointer;
  user-select: none;
}

.fs-table tbody tr:hover td[data-action='select-row'] {
  color: var(--brand);
}

.fs-table tr.is-selected td {
  background: var(--brand-light) !important;
}

.fs-table tr.is-selected td.fs-sticky-left {
  background: #dbe7ff !important;
  color: var(--brand);
}

.fs-selection-pill {
  border: 1px solid rgba(31, 107, 255, 0.35);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  color: var(--brand);
  background: var(--brand-light);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

/* Bouton scindé : une seule pilule, l'action par défaut et le menu des portées */
.fs-split {
  display: inline-flex;
  align-items: stretch;
  height: var(--fs-control-lg);
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 6px 16px rgba(31, 107, 255, 0.22);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.fs-split:hover,
.fs-split.is-open {
  background: var(--brand-dark);
  box-shadow: 0 8px 20px rgba(31, 107, 255, 0.3);
}

.fs-split-main,
.fs-split-caret {
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.fs-split-main {
  padding: 0 1rem 0 1.15rem;
  border-radius: 999px 0 0 999px;
}

.fs-split-caret {
  display: inline-flex;
  align-items: center;
  padding: 0 0.7rem 0 0.55rem;
  border-radius: 0 999px 999px 0;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.28);
  transition: background 0.15s ease;
}

.fs-split-caret:hover,
.fs-split.is-open .fs-split-caret {
  background: rgba(255, 255, 255, 0.14);
}

.fs-split-caret svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.15s ease;
}

.fs-split.is-open .fs-split-caret svg {
  transform: rotate(180deg);
}

.fs-split-main:focus-visible,
.fs-split-caret:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: -4px;
}

.fs-export-menu {
  left: auto;
  right: 0;
  min-width: 300px;
  display: grid;
  gap: 2px;
}

.fs-export-option {
  border: 0;
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  background: none;
  color: var(--text);
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
}

.fs-export-option:hover:not(:disabled) {
  background: var(--brand-light);
}

.fs-export-option:disabled {
  color: var(--faint);
  cursor: default;
}

.fs-export-note {
  margin: 0;
  padding: 0.45rem 0.6rem;
  color: var(--muted);
  font-size: 0.74rem;
}

/* Format et type de fichier : deux rangees de choix sous les portees */
.fs-export-group {
  display: grid;
  grid-template-columns: 62px 1fr 1fr;
  align-items: center;
  gap: 2px;
  margin-top: var(--sp-1);
  padding-top: var(--sp-1);
  border-top: 1px solid var(--soft-line);
}

.fs-export-group > span {
  padding-left: 0.6rem;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fs-export-choice {
  border: 0;
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  background: none;
  color: var(--text);
  font-size: 0.78rem;
  text-align: center;
  cursor: pointer;
}

.fs-export-choice:hover {
  background: var(--soft-line);
}

.fs-export-choice.is-on {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 700;
}

/* Synthèse d'une sélection : prend la place de la fiche */
.fs-detail-edit-link.is-visible {
  opacity: 1;
}

.fs-detail-count.is-neutral {
  background: var(--soft-line);
  color: var(--muted);
}

.fs-detail-pill.is-warn {
  background: #fff7ed;
  color: #b54708;
}

.fs-summary-row-link {
  margin-top: var(--sp-3);
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.fs-summary-row-link:hover {
  text-decoration: underline;
}

.fs-summary-list {
  display: grid;
  gap: var(--sp-3);
}

.fs-summary-field {
  display: grid;
  gap: 3px;
}

.fs-summary-field .fs-detail-label {
  display: block;
  font-size: 0.66rem;
  color: var(--muted);
}

.fs-summary-field .fs-detail-value {
  font-size: 0.82rem;
  color: var(--text);
}

.fs-summary-field .fs-detail-value.is-na {
  color: var(--faint);
  font-style: italic;
}

.fs-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--text);
  background: linear-gradient(90deg, var(--brand-light) var(--p), transparent var(--p));
}

.fs-summary-bar span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fs-summary-bar b {
  flex: 0 0 auto;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

.fs-summary-note {
  font-size: 0.7rem;
  color: var(--faint);
}

/* Édition en masse depuis la synthèse */
.fs-bulk-form {
  display: grid;
  gap: var(--sp-2);
}

.fs-bulk-form .fs-detail-editbar {
  margin-top: 0;
}

.fs-bulk-done {
  margin: var(--sp-2) 0 0;
  color: #15803d;
  font-size: 0.74rem;
  font-weight: 600;
}

.fs-summary-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.fs-field [hidden] {
  display: none !important;
}

.fs-toolbar-notice {
  color: #15803d;
  font-size: 0.74rem;
  font-weight: 700;
}

.fs-workspace-tools a.fs-ghost-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* Page d'import */
.fs-import {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--sp-4) var(--sp-4) var(--sp-6);
  color: var(--text);
}

.fs-import-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}

.fs-import-head h1 {
  margin: 0 0 var(--sp-1);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.fs-import-kicker {
  margin: 0 0 var(--sp-1);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fs-import-lede {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 60ch;
}

.fs-import-head-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex: 0 0 auto;
}

.fs-import-head-actions .fs-status-pill {
  font-size: 0.74rem;
}

.fs-status-pill.is-wait {
  background: #fff7ed;
  color: #b54708;
}

.fs-flash {
  margin: 0 0 var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: 8px;
  font-size: 0.82rem;
}

.fs-flash.is-alert {
  background: #fff7ed;
  color: #b54708;
}

.fs-import-form {
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.fs-import-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-3);
}

.fs-field {
  display: grid;
  gap: var(--sp-1);
}

.fs-field > span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.fs-field input[type="text"],
.fs-field input[type="file"] {
  height: var(--fs-control-lg);
  padding: 0 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 0.88rem;
  color: var(--text);
  background: #ffffff;
}

.fs-field input[type="file"] {
  padding-top: 0.45rem;
}

.fs-kinds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-3);
  margin: var(--sp-4) 0 0;
  padding: 0;
  border: 0;
}

.fs-kinds legend {
  margin-bottom: var(--sp-2);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.fs-kind {
  display: flex;
  column-gap: var(--sp-2);
  align-items: center;
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.fs-kind:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-light);
}

.fs-kind input {
  margin: 0;
}

.fs-kind b {
  font-size: 0.88rem;
}

.fs-import-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--sp-4);
}

.fs-import-runs,
.fs-import-section {
  margin-top: var(--sp-6);
}

.fs-import-runs h2,
.fs-import-section h2 {
  margin: 0 0 var(--sp-2);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fs-import-empty,
.fs-import-hint {
  margin: var(--sp-1) 0 0;
  color: var(--faint);
  font-size: 0.82rem;
}

.fs-import-table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.fs-import-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.fs-import-table th,
.fs-import-table td {
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--soft-line);
  text-align: left;
  vertical-align: top;
}

.fs-import-table th {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #f8fafc;
}

.fs-import-table tr:last-child td {
  border-bottom: 0;
}

.fs-import-table a {
  color: var(--brand);
  font-weight: 600;
}

.fs-verdict {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: 12px;
  font-size: 0.88rem;
}

.fs-verdict p {
  margin: 0;
}

.fs-verdict.is-ok { background: #ecfdf3; color: #15803d; }
.fs-verdict.is-ko { background: #fef2f2; color: #b91c1c; }
.fs-verdict.is-wait { background: #f8fafc; color: var(--muted); }

.fs-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.fs-facts > div {
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.fs-facts b {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.fs-facts span {
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.fs-facts .is-err span { color: #b91c1c; }
.fs-facts .is-warn span { color: #b54708; }

.fs-anomalies h2 .fs-detail-count {
  vertical-align: middle;
}

.fs-flash.is-breaker {
  background: #fef2f2;
  color: #b91c1c;
}

.fs-import-table-narrow {
  max-width: 520px;
  margin-bottom: var(--sp-3);
}

.fs-import-table td.fs-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.fs-decision {
  margin-top: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.fs-apply {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
}

.fs-revert {
  margin-top: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.fs-apply-options {
  display: grid;
  gap: var(--sp-2);
}

.fs-apply-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.fs-apply-option {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.85rem;
  cursor: pointer;
}

.fs-apply-option input {
  margin: 0;
}


.fs-danger-button {
  height: var(--fs-control-lg);
  padding: 0 1rem;
  border: 1px solid rgba(220, 38, 38, 0.45);
  border-radius: 999px;
  background: #ffffff;
  color: #b91c1c;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.fs-danger-button:hover {
  border-color: #b91c1c;
  background: #fef2f2;
}

.fs-card-title {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
}

.fs-help-title {
  margin-left: 0.35rem !important;
  color: var(--faint) !important;
  font-size: 0.8em !important;
  vertical-align: middle;
  cursor: help;
}

.fs-help-title:hover {
  color: var(--brand) !important;
}

.fs-revert .fs-flash {
  margin: 0;
}

.fs-flash.is-info {
  background: var(--brand-light);
  color: var(--brand-dark);
}

.fs-reject {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-top: 1px solid var(--soft-line);
}

.fs-reject-reason {
  height: var(--fs-control-lg);
  min-width: 280px;
  padding: 0 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 0.85rem;
}

.fs-primary-button:disabled {
  cursor: not-allowed;
}

.fs-badge {
  display: inline-block;
  min-width: 18px;
  margin-left: 0.35rem;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--brand);
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

/* Historique d'une ligne dans la fiche */
.fs-history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-2);
}

.fs-history-entry {
  padding-top: var(--sp-2);
  border-top: 1px solid var(--soft-line);
}

.fs-history-head {
  margin-bottom: var(--sp-1);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
}

.fs-history-field {
  display: grid;
  gap: 1px;
  padding: 2px 0;
  font-size: 0.78rem;
}

.fs-history-before {
  color: var(--faint);
  text-decoration: line-through;
}

.fs-history-after {
  color: var(--text);
  font-weight: 600;
}
