/*!
 * FO Énergie — Simulateur grille salariale IEG
 * Design conforme à la charte graphique FNEM :
 *  - couleurs primaires : Imperial Red #EF333F, Celestial Blue #019CDA, Jungle Green #29B193
 *    (secondaire utilisée : Aureolin #FFEB3B, en teinte claire pour surligner la ligne de l'agent) ;
 *  - typographie Hurme Geometric (chargée automatiquement si les fichiers .woff2 sont déposés
 *    dans assets/fonts/, sinon police du site) ;
 *  - logo principal en couleur sur fond blanc, ≥ 70 px, sans cadre ;
 *  - en-tête inspiré du modèle « Communiqué » (coin à bandes bleu / vert / rouge).
 * Toutes les règles sont préfixées .fo-sim : aucun style ne déborde sur le site,
 * et les propriétés sensibles sont redéfinies pour neutraliser les styles globaux d'Avada.
 */
.fo-sim {
  /* Charte FNEM */
  --fo-red: #ef333f;          /* Imperial Red   — RVB 239, 51, 63 */
  --fo-blue: #019cda;         /* Celestial Blue — RVB 1, 156, 218 */
  --fo-green: #29b193;        /* Jungle Green   — RVB 41, 177, 147 */
  --fo-yellow: #ffeb3b;       /* Aureolin (secondaire) */
  /* Neutres et teintes dérivées */
  --fo-ink: #1d1d1b;
  --fo-muted: #5e5e5e;
  --fo-line: #e2e2e2;
  --fo-line-strong: #c9c9c9;
  --fo-soft: #f4f4f4;
  --fo-zebra: #fafafa;
  --fo-red-dark: #d42530;     /* survol uniquement */
  --fo-blue-tint: #e6f5fc;
  --fo-blue-hover: #f0f9fd;
  --fo-green-tint: #e9f7f3;
  --fo-hl: #fff6b8;           /* teinte d'Aureolin */
  --fo-hl-line: #f1dc6a;
  --fo-radius: 6px;
  --fo-font: "Hurme Geometric Sans 1", "Hurme Geometric Sans", "Hurme Geometric", "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --fo-col-nr: 58px;
  --fo-col-ind: 66px;

  display: block;
  max-width: 1120px;
  margin: 0 auto;
  font-family: var(--fo-font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--fo-ink);
  text-align: left;
  -webkit-text-size-adjust: 100%;
}
.fo-sim *,
.fo-sim *::before,
.fo-sim *::after { box-sizing: border-box; }
.fo-sim p,
.fo-sim h2,
.fo-sim h3,
.fo-sim ul,
.fo-sim li { margin: 0; padding: 0; }
.fo-sim h2,
.fo-sim h3 { font-family: var(--fo-font); letter-spacing: normal; text-transform: none; }
.fo-sim img { max-width: 100%; border: 0; box-shadow: none; vertical-align: middle; }
.fo-sim sup { font-size: .65em; line-height: 0; vertical-align: super; }
.fo-sim abbr[title] { text-decoration: none; border: 0; cursor: inherit; }
.fo-sim .fo-sim-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.fo-sim .fo-sim-nowrap { white-space: nowrap; }
.fo-sim .fo-sim-loading,
.fo-sim .fo-sim-noscript { padding: 24px; text-align: center; color: var(--fo-muted); background: var(--fo-soft); border-radius: var(--fo-radius); }

.fo-sim__inner { display: flex; flex-direction: column; gap: 32px; }

/* Cartes ---------------------------------------------------------------- */
.fo-sim .fo-sim-card {
  background: #fff;
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-radius);
  box-shadow: 0 12px 32px -22px rgba(29, 29, 27, .45);
  overflow: hidden;
}

/* En-tête (modèle « Communiqué ») */
.fo-sim .fo-sim-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 26px;
  padding: 30px 32px 28px;
  background: #fff;
  border-bottom: 1px solid var(--fo-line);
}
.fo-sim .fo-sim-corner {
  position: absolute;
  top: 0;
  right: 0;
  width: 190px;
  height: auto;
  pointer-events: none;
}
.fo-sim .fo-sim-corner__blue { fill: var(--fo-blue); }
.fo-sim .fo-sim-corner__green { fill: var(--fo-green); }
.fo-sim .fo-sim-corner__red { fill: var(--fo-red); }
.fo-sim .fo-sim-logo {
  flex: 0 0 auto;
  width: 84px;   /* charte : jamais moins de 70 px */
  height: 84px;
  margin: 4px 6px 0 0; /* zone de protection */
  object-fit: contain;
  background: transparent;
}
/* Espacements par gap (Avada remet à zéro les marges des titres/paragraphes) */
.fo-sim .fo-sim-head__text {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding-right: 150px; /* laisse respirer le coin à bandes */
}
.fo-sim .fo-sim-title {
  margin: 0;
  font-family: var(--fo-font); /* .post-content h2 d'Avada est chargé après nous */
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--fo-ink);
}
.fo-sim .fo-sim-title__years { color: var(--fo-red); white-space: nowrap; }
.fo-sim .fo-sim-subtitle { font-size: 17px; color: var(--fo-muted); }
.fo-sim .fo-sim-lead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0;
  font-size: 19px;      /* texte « large » : contraste AA du bleu charte respecté */
  font-weight: 700;
  line-height: 1.3;
  color: var(--fo-blue);
}
.fo-sim .fo-sim-head__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

/* Boutons */
.fo-sim .fo-sim-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  margin: 0;
  padding: 10px 20px;
  font-family: var(--fo-font);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
  color: #fff;
  background: var(--fo-red);
  border: 2px solid var(--fo-red);
  border-radius: var(--fo-radius);
  box-shadow: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
  -webkit-appearance: none;
  appearance: none;
}
.fo-sim .fo-sim-btn:hover { background: var(--fo-red-dark); border-color: var(--fo-red-dark); color: #fff; }
.fo-sim .fo-sim-btn:active { transform: translateY(1px); }
.fo-sim .fo-sim-btn[disabled],
.fo-sim .fo-sim-btn[aria-busy="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.fo-sim .fo-sim-btn--ghost { color: var(--fo-ink); background: #fff; border-color: var(--fo-ink); min-height: 42px; padding: 8px 16px; font-size: 15px; }
.fo-sim .fo-sim-btn--ghost:hover { color: #fff; background: var(--fo-ink); border-color: var(--fo-ink); }
.fo-sim .fo-sim-ico { width: 18px; height: 18px; flex: 0 0 auto; }
.fo-sim .fo-sim-btn:focus-visible,
.fo-sim .fo-sim-select:focus-visible,
.fo-sim .fo-sim-seg__btn:focus-visible,
.fo-sim .fo-sim-table-wrap:focus-visible { outline: 3px solid var(--fo-blue); outline-offset: 2px; }

/* Formulaire */
.fo-sim .fo-sim-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 28px;
  padding: 26px 32px 28px;
}
.fo-sim .fo-sim-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.fo-sim .fo-sim-label {
  display: block;
  margin: 0;
  font-family: var(--fo-font);
  font-size: 15px;
  font-weight: 700;
  color: var(--fo-ink);
}
.fo-sim select.fo-sim-select {
  display: block;
  width: 100%;
  height: 50px;
  min-height: 50px;
  margin: 0;
  padding: 0 46px 0 14px;
  font-family: var(--fo-font);
  font-size: 16px; /* 16 px : pas de zoom automatique sur iOS */
  font-weight: 600;
  line-height: 48px;
  color: var(--fo-ink);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23ef333f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 14px 9px;
  border: 1.5px solid var(--fo-line-strong);
  border-radius: var(--fo-radius);
  box-shadow: none;
  text-indent: 0;
  text-overflow: ellipsis;
  vertical-align: middle;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.fo-sim select.fo-sim-select:hover { border-color: var(--fo-ink); }
.fo-sim select.fo-sim-select:focus { border-color: var(--fo-blue); box-shadow: 0 0 0 3px rgba(1, 156, 218, .25); outline: none; }
.fo-sim .fo-sim-hint { font-size: 13px; color: var(--fo-muted); }

/* Résultats */
.fo-sim .fo-sim-results {
  padding: 26px 32px 30px;
  background: var(--fo-soft);
  border-top: 1px solid var(--fo-line);
}
.fo-sim .fo-sim-results__title {
  margin: 0 0 18px;
  font-family: var(--fo-font);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
  color: var(--fo-ink);
}
.fo-sim .fo-sim-results__main,
.fo-sim .fo-sim-results__gains { display: grid; gap: 16px; }
.fo-sim .fo-sim-results__main { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
.fo-sim .fo-sim-results__gains { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fo-sim .fo-sim-res {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 18px 14px 16px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--fo-line);
  border-top: 5px solid var(--fo-line-strong);
  border-radius: var(--fo-radius);
}
.fo-sim .fo-sim-res--b { border-top-color: var(--fo-blue); box-shadow: 0 12px 26px -18px rgba(1, 156, 218, .7); }
.fo-sim .fo-sim-res--gm,
.fo-sim .fo-sim-res--ga { border-top-color: var(--fo-green); }
.fo-sim .fo-sim-res--ga { background: var(--fo-green-tint); }
.fo-sim .fo-sim-res--ev { border-top-color: var(--fo-blue); }
.fo-sim .fo-sim-res__label { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--fo-muted); }
.fo-sim .fo-sim-res__value {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--fo-ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fo-sim .fo-sim-res__value--big { font-size: 36px; }
.fo-sim .fo-sim-res--b .fo-sim-res__value { color: var(--fo-blue); } /* 36 px gras : contraste AA « grand texte » */
.fo-sim .fo-sim-res__sub { font-size: 14px; color: var(--fo-muted); }
.fo-sim .fo-sim-results.is-pulse .fo-sim-res__value { animation: fo-sim-pulse .6s ease; }
@keyframes fo-sim-pulse { 0% { opacity: .35; } 100% { opacity: 1; } }

.fo-sim .fo-sim-note { padding: 14px 32px 18px; font-size: 13.5px; color: var(--fo-muted); background: #fff; border-top: 1px solid var(--fo-line); }
.fo-sim .fo-sim-note strong { color: var(--fo-ink); box-shadow: inset 0 -3px 0 rgba(239, 51, 63, .55); }
.fo-sim .fo-sim-error { margin: 0 32px 18px; padding: 10px 14px; font-size: 14px; color: #8a1720; background: #fde8ea; border-radius: var(--fo-radius); }
.fo-sim .fo-sim-error[hidden] { display: none; }

/* Grille complète ------------------------------------------------------- */
.fo-sim .fo-sim-grid-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 26px 32px 20px;
  text-align: center;
  background: #fff;
  border-bottom: 1px solid var(--fo-line);
}
.fo-sim .fo-sim-grid-title {
  margin: 0;
  font-family: var(--fo-font);
  font-size: 25px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--fo-ink);
}
.fo-sim .fo-sim-grid-title__nc { font-size: 19px; font-weight: 700; color: var(--fo-red); white-space: nowrap; }
/* Grille 2027 : « (applicable avec effet rétroactif au …) » sous l'intitulé, même taille que la mention non contractuelle */
.fo-sim .fo-sim-grid-title__precision { font-size: 19px; font-weight: 400; color: var(--fo-ink); }
.fo-sim .fo-sim-grid-phrase { font-size: 19px; font-weight: 700; line-height: 1.35; color: var(--fo-blue); }
.fo-sim .fo-sim-grid-notes { list-style: none; font-size: 13.5px; color: var(--fo-muted); }
.fo-sim .fo-sim-grid-notes li { margin: 2px 0 0; list-style: none; }
.fo-sim .fo-sim-grid-notes li::before { content: none; }
.fo-sim .fo-sim-grid-notes .fo-sim-grid-notes__idx { font-weight: 700; color: var(--fo-ink); }
.fo-sim .fo-sim-grid-notes .fo-sim-grid-notes__idx[hidden] { display: none; }

.fo-sim .fo-sim-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 18px 32px 0;
}
.fo-sim .fo-sim-snb {
  padding: 9px 14px;
  font-size: 15px;
  color: var(--fo-ink);
  background: var(--fo-soft);
  border-left: 4px solid var(--fo-blue);
  border-radius: 0 var(--fo-radius) var(--fo-radius) 0;
}
.fo-sim .fo-sim-snb strong { font-weight: 800; white-space: nowrap; }
.fo-sim .fo-sim-toolbar__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fo-sim .fo-sim-seg {
  display: inline-flex;
  padding: 3px;
  background: var(--fo-soft);
  border: 1px solid var(--fo-line);
  border-radius: calc(var(--fo-radius) + 3px);
}
.fo-sim .fo-sim-seg__btn {
  min-width: 70px;
  min-height: 36px;
  margin: 0;
  padding: 6px 14px;
  font-family: var(--fo-font);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--fo-ink);
  background: transparent;
  border: 0;
  border-radius: var(--fo-radius);
  box-shadow: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.fo-sim .fo-sim-seg__btn:hover { background: #fff; }
.fo-sim .fo-sim-seg__btn[aria-pressed="true"] { color: #fff; background: var(--fo-ink); }
.fo-sim .fo-sim-seg__btn[disabled] { opacity: .45; cursor: not-allowed; }

.fo-sim .fo-sim-selection { min-height: 22px; padding: 14px 32px 10px; font-size: 14.5px; color: var(--fo-muted); }
.fo-sim .fo-sim-selection strong { color: var(--fo-ink); font-weight: 800; }
.fo-sim .fo-sim-selection .fo-sim-selection__value { white-space: nowrap; box-shadow: inset 0 -3px 0 rgba(239, 51, 63, .55); }

.fo-sim .fo-sim-table-wrap {
  position: relative;
  max-height: min(68vh, 640px);
  margin: 0 32px;
  overflow: auto;
  border: 1px solid var(--fo-line-strong);
  border-radius: var(--fo-radius);
  -webkit-overflow-scrolling: touch;
  background: #fff;
}
.fo-sim table.fo-sim-table {
  width: 100%;
  min-width: 920px;
  margin: 0;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  font-family: var(--fo-font);
  font-size: 14px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  background: #fff;
}
.fo-sim .fo-sim-table th,
.fo-sim .fo-sim-table td {
  height: auto;
  margin: 0;
  padding: 6px 9px;
  font-family: var(--fo-font);
  font-size: inherit;
  line-height: inherit;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
  color: var(--fo-ink);
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--fo-line);
  border-right: 1px solid var(--fo-line);
  box-shadow: none;
}
.fo-sim .fo-sim-table tbody tr:nth-child(even) > * { background: var(--fo-zebra); }

/* En-tête figé */
.fo-sim .fo-sim-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 9px 6px 8px;
  font-weight: 800;
  text-align: center;
  color: var(--fo-ink);
  background: var(--fo-soft);
  border-bottom: 2px solid var(--fo-ink);
  border-right: 1px solid var(--fo-line);
}
.fo-sim .fo-sim-table thead th.is-col { background: var(--fo-blue-tint); box-shadow: inset 0 -4px 0 var(--fo-blue); }
.fo-sim .fo-sim-th-main { display: block; font-size: 14px; }
.fo-sim .fo-sim-th-sub { display: block; font-size: 12px; font-weight: 600; color: var(--fo-muted); }

/* Colonnes NR + Indice figées */
.fo-sim .fo-sim-table .fo-sim-c-nr {
  position: sticky;
  left: 0;
  z-index: 2;
  width: var(--fo-col-nr);
  min-width: var(--fo-col-nr);
  max-width: var(--fo-col-nr);
  font-weight: 800;
  text-align: center;
}
.fo-sim .fo-sim-table .fo-sim-c-ind {
  position: sticky;
  left: var(--fo-col-nr);
  z-index: 2;
  width: var(--fo-col-ind);
  min-width: var(--fo-col-ind);
  max-width: var(--fo-col-ind);
  color: var(--fo-muted);
  box-shadow: 6px 0 8px -6px rgba(29, 29, 27, .28);
  border-right-color: var(--fo-line-strong);
}
.fo-sim .fo-sim-table thead .fo-sim-c-nr,
.fo-sim .fo-sim-table thead .fo-sim-c-ind { z-index: 4; color: var(--fo-ink); }
.fo-sim .fo-sim-table .fo-sim-c-val { min-width: 84px; }
.fo-sim .fo-sim-table .fo-sim-c-ecart { min-width: 66px; color: var(--fo-muted); font-size: 13px; }
.fo-sim .fo-sim-table thead .fo-sim-c-ecart { color: var(--fo-ink); font-size: inherit; background: #ececec; }
.fo-sim .fo-sim-table .fo-sim-c-ecart--first { border-left: 2px solid var(--fo-line-strong); }

/* Interactions */
.fo-sim .fo-sim-table tbody [data-nr] { cursor: pointer; }
.fo-sim .fo-sim-table tbody tr:hover > * { background: var(--fo-blue-hover); }
.fo-sim .fo-sim-table tbody td.fo-sim-c-val:hover { background: var(--fo-blue-tint); box-shadow: inset 0 0 0 2px var(--fo-blue); }
.fo-sim .fo-sim-table tbody tr.is-row > * { background: var(--fo-hl); font-weight: 700; border-bottom-color: var(--fo-hl-line); }
.fo-sim .fo-sim-table tbody tr.is-row > .fo-sim-c-nr { box-shadow: inset 4px 0 0 var(--fo-red); }
.fo-sim .fo-sim-table tbody tr.is-row > td.is-cell {
  color: #fff;
  background: var(--fo-red);
  font-weight: 800;
  box-shadow: none;
}
.fo-sim .fo-sim-table tbody tr.is-flash > *:not(.is-cell) { animation: fo-sim-flash 1.4s ease; }
@keyframes fo-sim-flash { 0%, 35% { background: var(--fo-yellow); } 100% { background: var(--fo-hl); } }

/* Séparateur « Niveaux cadres » */
.fo-sim .fo-sim-table tbody tr.fo-sim-sep > th {
  padding: 7px 0;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: left;
  color: var(--fo-ink);
  background: var(--fo-blue-tint);
  border-top: 2px solid var(--fo-blue);
  border-bottom: 1px solid var(--fo-line);
  cursor: default;
}
.fo-sim .fo-sim-table tbody tr.fo-sim-sep > th > span { position: sticky; left: 0; display: inline-block; padding: 0 12px; }
.fo-sim .fo-sim-table tbody tr.fo-sim-sep:hover > th { background: var(--fo-blue-tint); }

/* Pied : évolution liée à l'ancienneté */
.fo-sim .fo-sim-table tfoot th,
.fo-sim .fo-sim-table tfoot td { font-size: 13px; font-weight: 700; color: var(--fo-ink); background: var(--fo-soft); border-bottom-color: var(--fo-line-strong); }
.fo-sim .fo-sim-table tfoot tr:first-child > * { border-top: 2px solid var(--fo-ink); }
.fo-sim .fo-sim-table tfoot .fo-sim-foot-label {
  max-width: none;
  white-space: normal;
  text-align: left;
  font-size: 12.5px;
  line-height: 1.25;
  width: calc(var(--fo-col-nr) + var(--fo-col-ind));
  min-width: calc(var(--fo-col-nr) + var(--fo-col-ind));
  box-shadow: 6px 0 8px -6px rgba(29, 29, 27, .28);
}
.fo-sim .fo-sim-table tfoot .fo-sim-foot-sub { font-weight: 600; color: var(--fo-muted); font-size: 12px; }

.fo-sim .fo-sim-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 12px 32px 24px;
  font-size: 13px;
  color: var(--fo-muted);
}
.fo-sim .fo-sim-legend__row,
.fo-sim .fo-sim-legend__cell { display: inline-block; width: 22px; height: 14px; border-radius: 3px; vertical-align: middle; }
.fo-sim .fo-sim-legend__row { background: var(--fo-hl); border: 1px solid var(--fo-hl-line); }
.fo-sim .fo-sim-legend__cell { margin-left: 10px; background: var(--fo-red); }

/* Groupes fonctionnels (GF) et plages ------------------------------------ */
.fo-sim .fo-sim-gf { --fo-gf-n1: #cdebf8; --fo-gf-n2: #8fd3f0; --fo-gf-n3: #4dbae6; } /* nuances de Celestial Blue */
.fo-sim .fo-sim-gf-intro { font-size: 14.5px; color: var(--fo-muted); }
.fo-sim .fo-sim-gf-summary { min-height: 1.4em; font-size: 19px; font-weight: 700; line-height: 1.35; color: var(--fo-ink); }
.fo-sim .fo-sim-gf-summary strong { font-weight: 800; box-shadow: inset 0 -3px 0 rgba(239, 51, 63, .55); }
.fo-sim .fo-sim-gf-body { padding: 18px 32px 6px; }
.fo-sim .fo-sim-gf-subtitle {
  margin: 18px 0 6px;
  font-family: var(--fo-font);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--fo-ink);
}
.fo-sim .fo-sim-gf-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.fo-sim .fo-sim-gf-scroll:focus-visible { outline: 3px solid var(--fo-blue); outline-offset: 2px; }
.fo-sim .fo-sim-gf-chart {
  position: relative;
  display: grid;
  grid-template-columns: 64px 26px 26px 26px minmax(470px, 1fr);
  column-gap: 6px;
  row-gap: 4px;
  min-width: 650px;
  padding-right: 18px; /* place pour l'étiquette du dernier niveau de l'axe */
}
.fo-sim .fo-sim-gf-chart--simple { row-gap: 6px; }
.fo-sim .fo-sim-gf-h {
  align-self: end;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--fo-muted);
}
.fo-sim .fo-sim-gf-h--label { grid-column: 1; position: sticky; left: 0; z-index: 2; text-align: right; padding-right: 8px; }
.fo-sim .fo-sim-gf-h--plages { grid-column: 2 / 5; text-align: center; }
.fo-sim .fo-sim-gf-h--axis { grid-column: 1; position: sticky; left: 0; z-index: 2; align-self: start; padding: 5px 8px 0 0; text-align: right; }
.fo-sim .fo-sim-gf-label {
  grid-column: 1;
  position: sticky;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--fo-muted);
  background: #fff;
  white-space: nowrap;
}
/* Fond blanc sous la colonne GF figée (masque les plages lors du défilement horizontal) */
.fo-sim .fo-sim-gf-mask { grid-column: 1; position: sticky; left: 0; z-index: 1; background: #fff; margin-right: -6px; }
.fo-sim .fo-sim-gf-label.is-on { color: var(--fo-ink); font-weight: 800; box-shadow: inset -3px 0 0 var(--fo-red); }
.fo-sim .fo-sim-gf-plage {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--fo-ink);
  background: var(--fo-soft);
  border: 1px solid var(--fo-line-strong);
  border-radius: 4px;
}
.fo-sim .fo-sim-gf-track { grid-column: 5; position: relative; z-index: 1; }
.fo-sim .fo-sim-gf-bar {
  position: absolute;
  top: 2px;
  bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  color: var(--fo-ink);
  white-space: nowrap;
  border-radius: 4px;
  transition: opacity .2s ease, box-shadow .2s ease;
}
.fo-sim .fo-sim-gf-n1 { background: var(--fo-gf-n1); }
.fo-sim .fo-sim-gf-n2 { background: var(--fo-gf-n2); }
.fo-sim .fo-sim-gf-n3 { background: var(--fo-gf-n3); }
/* Plage commençant avant le premier NR affiché (ex. GF 3 : NR 30 à 160) : bord gauche droit */
.fo-sim .fo-sim-gf-bar--coupe { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.fo-sim .fo-sim-gf-bar.is-dim { opacity: .38; }
.fo-sim .fo-sim-gf-bar.is-on { box-shadow: inset 0 0 0 2px var(--fo-ink); }
.fo-sim .fo-sim-gf-gridlayer,
.fo-sim .fo-sim-gf-layer,
.fo-sim .fo-sim-gf-axis { grid-column: 5; position: relative; pointer-events: none; }
.fo-sim .fo-sim-gf-gridlayer { z-index: 0; }
.fo-sim .fo-sim-gf-gridline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--fo-line); }
.fo-sim .fo-sim-gf-layer { z-index: 3; }
.fo-sim .fo-sim-gf-marker { position: absolute; top: 26px; bottom: 0; width: 2px; margin-left: -1px; background: var(--fo-red); }
.fo-sim .fo-sim-gf-marker[hidden] { display: none; }
.fo-sim .fo-sim-gf-marker__label {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
  color: #fff;
  white-space: nowrap;
  background: var(--fo-red);
  border-radius: 4px;
}
.fo-sim .fo-sim-gf-axis { border-top: 2px solid var(--fo-ink); }
.fo-sim .fo-sim-gf-tick {
  position: absolute;
  top: 4px;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 600;
  color: var(--fo-muted);
  white-space: nowrap;
}
.fo-sim .fo-sim-gf-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 16px 0 20px;
  font-size: 13px;
  color: var(--fo-muted);
}
.fo-sim .fo-sim-gf-swatch { display: inline-block; width: 22px; height: 14px; margin-left: 4px; border-radius: 3px; vertical-align: middle; }
.fo-sim .fo-sim-gf-swatch--marker { width: 3px; height: 16px; margin-left: 2px; background: var(--fo-red); border-radius: 0; }
.fo-sim .fo-sim-gf-legend__sep { color: var(--fo-line-strong); }

/* Avertissement éditeurs (shortcode mal renseigné) */
.fo-sim-admin-warning {
  max-width: 1120px;
  margin: 0 auto 16px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.5;
  color: #5c3c00;
  background: #fff6b8;
  border: 1px solid #f1dc6a;
  border-left: 5px solid #ffb700;
  border-radius: 6px;
}
.fo-sim-admin-warning ul { margin: 6px 0 0 18px; }

/* Tablette --------------------------------------------------------------- */
@media (max-width: 860px) {
  .fo-sim .fo-sim-results__gains { grid-template-columns: 1fr; }
  .fo-sim .fo-sim-head__text { padding-right: 90px; }
  .fo-sim .fo-sim-corner { width: 130px; }
}

/* Mobile ----------------------------------------------------------------- */
@media (max-width: 640px) {
  .fo-sim { --fo-col-nr: 46px; --fo-col-ind: 58px; font-size: 15px; }
  .fo-sim__inner { gap: 22px; }
  .fo-sim .fo-sim-head { flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 26px 16px 22px; }
  .fo-sim .fo-sim-corner { width: 96px; }
  .fo-sim .fo-sim-logo { width: 76px; height: 76px; margin: 0; }
  .fo-sim .fo-sim-head__text { align-items: center; align-self: stretch; width: 100%; padding-right: 0; }
  .fo-sim .fo-sim-title { font-size: 23px; }
  .fo-sim .fo-sim-subtitle { font-size: 15.5px; }
  .fo-sim .fo-sim-lead { justify-content: center; font-size: 19px; }
  .fo-sim .fo-sim-head__actions { width: 100%; }
  .fo-sim .fo-sim-btn--pdf { width: 100%; white-space: normal; }
  .fo-sim .fo-sim-form { grid-template-columns: 1fr; gap: 16px; padding: 20px 16px; }
  .fo-sim .fo-sim-results { padding: 20px 16px 22px; }
  .fo-sim .fo-sim-results__main { grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
  .fo-sim .fo-sim-results__gains { gap: 12px; }
  .fo-sim .fo-sim-res { padding: 14px 10px; }
  .fo-sim .fo-sim-res__value--big { font-size: 32px; }
  .fo-sim .fo-sim-res__value { font-size: 24px; }
  .fo-sim .fo-sim-note { padding: 12px 16px 16px; }
  .fo-sim .fo-sim-error { margin: 0 16px 16px; }
  .fo-sim .fo-sim-grid-head { padding: 20px 16px 16px; }
  .fo-sim .fo-sim-grid-title { font-size: 20px; }
  .fo-sim .fo-sim-grid-title__nc { font-size: 19px; }
  .fo-sim .fo-sim-grid-title__precision { font-size: 19px; }
  .fo-sim .fo-sim-grid-phrase { font-size: 19px; }
  .fo-sim .fo-sim-toolbar { padding: 14px 16px 0; }
  .fo-sim .fo-sim-snb { width: 100%; text-align: center; }
  .fo-sim .fo-sim-toolbar__actions { width: 100%; }
  .fo-sim .fo-sim-toolbar__actions > * { flex: 1 1 auto; }
  .fo-sim .fo-sim-seg { justify-content: center; }
  .fo-sim .fo-sim-seg__btn { flex: 1 1 0; }
  .fo-sim .fo-sim-selection { padding: 12px 16px 10px; font-size: 13.5px; }
  .fo-sim .fo-sim-table-wrap { margin: 0 12px; max-height: 70vh; }
  .fo-sim table.fo-sim-table { font-size: 13.5px; min-width: 860px; }
  .fo-sim .fo-sim-table th,
  .fo-sim .fo-sim-table td { padding: 6px 7px; }
  .fo-sim .fo-sim-table .fo-sim-c-val { min-width: 78px; }
  .fo-sim .fo-sim-legend { padding: 12px 16px 18px; }
  .fo-sim .fo-sim-gf-body { padding: 14px 12px 4px; }
  .fo-sim .fo-sim-gf-summary { font-size: 19px; }
  .fo-sim .fo-sim-gf-chart { grid-template-columns: 52px 22px 22px 22px minmax(520px, 1fr); column-gap: 4px; min-width: 660px; }
  .fo-sim .fo-sim-gf-label { font-size: 12.5px; padding-right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .fo-sim *, .fo-sim *::before, .fo-sim *::after { animation: none !important; transition: none !important; }
}

@media print {
  .fo-sim .fo-sim-btn,
  .fo-sim .fo-sim-toolbar__actions { display: none !important; }
  .fo-sim .fo-sim-table-wrap { max-height: none; overflow: visible; }
  .fo-sim .fo-sim-card { box-shadow: none; }
}
