/* /var/www/alessio-site/public/assets/css/excedent2.css
 *
 * Excedent II (/jeux/excedent2.html) : jeu plein ecran pour tablette.
 * Idee visuelle : un bureau sombre (barre du haut, fond) sur lequel est pose
 * un dossier de papier (onglets, postes, ecrans). Trois encres : rouge pour les
 * Depenses, vert pour les Revenus, bleu pour l'Humeur ; l'encre active arrive
 * par --hue sur .x2-game[data-tab]. Charte et composants : docs/EXCEDENT2.md.
 *
 * Compatibilite : Safari iPad 15+ (pas de color-mix, :has ni imbrication CSS).
 */

@font-face{
  font-family: "X2 Display"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/assets/fonts/excedent2/fraunces-latin.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: "X2 Display"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/assets/fonts/excedent2/fraunces-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face{
  font-family: "X2 Text"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/assets/fonts/excedent2/plex-latin.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: "X2 Text"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/assets/fonts/excedent2/plex-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root{
  /* Le bureau */
  --x2-desk:        #0d1422;
  --x2-desk-2:      #141d30;
  --x2-desk-3:      #1b2640;
  --x2-desk-line:   rgba(255,255,255,.10);
  --x2-on-desk:     #eef1f7;
  --x2-on-desk-2:   #b3bccd;
  --x2-on-desk-3:   #8792a8;

  /* Le papier */
  --x2-paper:       #f5f1e7;
  --x2-paper-2:     #ece6d7;
  --x2-paper-3:     #ddd5c2;
  --x2-card:        #fffdf8;
  --x2-ink:         #172030;
  --x2-ink-2:       #48536a;
  --x2-ink-3:       #667085;
  --x2-rule:        rgba(23,32,48,.13);
  --x2-rule-2:      rgba(23,32,48,.22);

  /* Les trois encres */
  --x2-dep:         #b5382a;  --x2-dep-soft: #f6dfd8;  --x2-dep-deep: #8c2418;
  --x2-rev:         #1b7a53;  --x2-rev-soft: #d8eee2;  --x2-rev-deep: #0f5a3b;
  --x2-hum:         #2f5bd0;  --x2-hum-soft: #dee6fa;  --x2-hum-deep: #1e42a4;

  /* Accents */
  --x2-gold:        #e6b450;
  --x2-gold-deep:   #a8730c;
  --x2-star:        #dc9a17;
  --x2-good:        #1b7a53;
  --x2-bad:         #b5382a;

  /* Lisere du pays (remplace par les couleurs du drapeau) */
  --x2-c1: #000091; --x2-c2: #ffffff; --x2-c3: #e1000f;

  --x2-hue: var(--x2-dep); --x2-hue-soft: var(--x2-dep-soft); --x2-hue-deep: var(--x2-dep-deep);

  --x2-font-display: "X2 Display", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --x2-font-text: "X2 Text", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --x2-r-sm: 10px; --x2-r: 14px; --x2-r-lg: 20px;
  --x2-tap: 46px;
  --x2-shadow-card: 0 1px 0 rgba(23,32,48,.05), 0 10px 22px -16px rgba(23,32,48,.45);
  --x2-shadow-pop: 0 30px 80px -20px rgba(0,0,0,.65), 0 2px 0 rgba(255,255,255,.06) inset;
}

*, *::before, *::after{ box-sizing: border-box; }
html, body{ height: 100%; margin: 0; }
html{ -webkit-text-size-adjust: 100%; }
body.x2-body{
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--x2-desk);
  color: var(--x2-on-desk);
  font-family: var(--x2-font-text);
  font-size: 16px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none; -webkit-user-select: none;
  touch-action: manipulation;
}
button{ font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
button:disabled{ cursor: default; }
h1, h2, h3, p, ul, ol, dl, dd{ margin: 0; padding: 0; }
ul, ol{ list-style: none; }
a{ color: inherit; }
[hidden]{ display: none !important; }
:focus{ outline: none; }
:focus-visible{ outline: 3px solid var(--x2-gold); outline-offset: 2px; border-radius: 6px; }
.x2-sr{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.x2-num{ font-variant-numeric: tabular-nums; }

.x2-ico{ width: 1.25em; height: 1.25em; flex: none; display: block; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------
 * Cadre de l'appli
 * ------------------------------------------------------------- */
.x2-app{
  position: fixed; inset: 0;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background:
    radial-gradient(1100px 520px at 8% -12%, rgba(62,96,214,.26), transparent 62%),
    radial-gradient(900px 520px at 104% 112%, rgba(214,58,46,.16), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.016) 0 1px, transparent 1px 8px),
    var(--x2-desk);
}
#x2-root{ position: absolute; inset: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }

/* Ecran d'attente (visible tant que le script n'a pas dessine) */
.x2-boot{
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px;
  color: var(--x2-on-desk-2); font-size: .95rem;
}
.x2-app[data-view="picker"] .x2-boot,
.x2-app[data-view="game"] .x2-boot{ display: none; }

/* Marque */
.x2-brand{ display: inline-flex; align-items: baseline; gap: .28em; font-family: var(--x2-font-display); font-weight: 600; letter-spacing: -.01em; color: var(--x2-on-desk); line-height: 1; }
.x2-brand-name{ font-size: 2.1rem; }
.x2-brand-num{
  font-size: 1.05rem; font-weight: 700; letter-spacing: .04em;
  padding: .22em .5em .2em; border-radius: 6px;
  color: var(--x2-desk); background: var(--x2-gold);
  transform: translateY(-.42em);
}

/* Drapeau : l'image recouvre le code du pays, qui reste lisible si elle manque */
.x2-flag{
  position: relative; flex: none; display: inline-grid; place-items: center; overflow: hidden;
  width: 36px; height: 27px; border-radius: 5px;
  background: var(--x2-paper-3); color: var(--x2-ink-2);
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  box-shadow: 0 0 0 1px rgba(23,32,48,.16);
}
.x2-flag::before{ content: attr(data-code); }
.x2-flag img{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.x2-flag-lg{ width: 92px; height: 69px; border-radius: 10px; font-size: 20px; box-shadow: 0 0 0 1px rgba(23,32,48,.16), 0 12px 24px -14px rgba(23,32,48,.6); }
.x2-flag-round{ width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.22); }

/* Lisere aux couleurs du pays */
.x2-ribbon{ display: flex; height: 5px; border-radius: 3px; overflow: hidden; }
.x2-ribbon i{ flex: 1; }
.x2-ribbon i:nth-child(1){ background: var(--x2-c1); }
.x2-ribbon i:nth-child(2){ background: var(--x2-c2); }
.x2-ribbon i:nth-child(3){ background: var(--x2-c3); }

/* Boutons */
.x2-btn{
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 52px; padding: 0 1.5em; border-radius: var(--x2-r);
  font-weight: 600; font-size: 1.02rem; letter-spacing: .005em;
  transition: transform .08s ease, background-color .15s ease, box-shadow .15s ease;
}
a.x2-btn{ text-decoration: none; }
.x2-btn:active:not(:disabled){ transform: translateY(1px) scale(.99); }
.x2-btn-primary{ background: var(--x2-ink); color: var(--x2-paper); box-shadow: 0 14px 26px -16px rgba(23,32,48,.9); }
.x2-btn-quiet{ background: transparent; color: var(--x2-ink); box-shadow: inset 0 0 0 1.5px var(--x2-rule-2); }
.x2-btn-danger{ background: var(--x2-bad); color: #fff; }
.x2-btn:disabled{ background: var(--x2-paper-2); color: var(--x2-ink-3); box-shadow: inset 0 0 0 1.5px var(--x2-rule); }
.x2-btn-sm{ min-height: var(--x2-tap); padding: 0 1.1em; font-size: .95rem; border-radius: 12px; }

.x2-ghost{
  display: inline-flex; align-items: center; gap: .5em; min-height: var(--x2-tap); padding: 0 1em;
  border-radius: 12px; text-decoration: none; font-weight: 500; font-size: .95rem;
  color: var(--x2-on-desk-2); background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--x2-desk-line);
}
.x2-ghost:active{ background: rgba(255,255,255,.1); }

.x2-pill{
  display: inline-flex; align-items: center; gap: .4em; padding: .28em .7em; border-radius: 999px;
  font-size: .74rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
  background: var(--x2-paper-2); color: var(--x2-ink-2);
}
.x2-pill .x2-ico{ width: 1.05em; height: 1.05em; stroke-width: 2; }
.x2-pill-open{ background: var(--x2-rev-soft); color: var(--x2-rev-deep); }

.x2-kicker{ font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--x2-ink-3); }

/* ---------------------------------------------------------------
 * Choix du pays
 * ------------------------------------------------------------- */
.x2-picker{ position: absolute; inset: 0; display: flex; flex-direction: column; padding: 18px 22px 22px; gap: 16px; }
.x2-picker-top{ display: flex; align-items: center; gap: 22px; flex: none; }
.x2-picker-lead{ color: var(--x2-on-desk-2); font-size: 1.05rem; padding-left: 22px; border-left: 1px solid var(--x2-desk-line); }
.x2-picker-top .x2-ghost{ margin-left: auto; }
.x2-picker-top .x2-ghost + .x2-ghost{ margin-left: 0; }
.x2-picker-main{ flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 16px; }

.x2-reg{ min-height: 0; display: flex; flex-direction: column; background: var(--x2-paper); color: var(--x2-ink); border-radius: var(--x2-r-lg); overflow: hidden; }
.x2-reg-tools{ flex: none; padding: 14px 14px 10px; display: grid; gap: 10px; border-bottom: 1px solid var(--x2-rule); }
.x2-search{ display: flex; align-items: center; gap: 10px; height: var(--x2-tap); padding: 0 14px; border-radius: 12px; background: var(--x2-card); box-shadow: inset 0 0 0 1.5px var(--x2-rule); color: var(--x2-ink-3); }
.x2-search:focus-within{ box-shadow: inset 0 0 0 2px var(--x2-ink); color: var(--x2-ink); }
.x2-search input{
  flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none;
  font: inherit; font-size: 1rem; color: var(--x2-ink); user-select: text; -webkit-user-select: text;
  -webkit-appearance: none; appearance: none;
}
.x2-search input::placeholder{ color: var(--x2-ink-3); opacity: 1; }
.x2-search input::-webkit-search-cancel-button{ -webkit-appearance: none; }
.x2-chips{ display: flex; flex-wrap: wrap; gap: 6px; }
.x2-chip{ flex: none; height: 36px; padding: 0 .72em; border-radius: 999px; font-size: .84rem; font-weight: 500; color: var(--x2-ink-2); box-shadow: inset 0 0 0 1.5px var(--x2-rule); white-space: nowrap; }
.x2-chip[aria-pressed="true"]{ background: var(--x2-ink); color: var(--x2-paper); box-shadow: none; }

.x2-reg-list{ flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 4px 8px 12px; }
.x2-reg-head{ position: sticky; top: 0; z-index: 1; padding: 12px 8px 6px; background: var(--x2-paper); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--x2-ink-3); }
.x2-reg-empty{ padding: 28px 12px; text-align: center; color: var(--x2-ink-3); }
.x2-row{
  width: 100%; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; column-gap: 10px;      /* 4e colonne : pastille de difficulte (02/12) */
  min-height: 54px; padding: 7px 10px; border-radius: 12px; color: var(--x2-ink);
}
.x2-row-txt{ min-width: 0; display: grid; }
.x2-row-name{ font-weight: 600; font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x2-row-cap{ font-size: .8rem; color: var(--x2-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x2-row-state{ color: var(--x2-ink-3); display: inline-flex; }
.x2-row-state .x2-ico{ width: 1.05em; height: 1.05em; }
.x2-row:not(.is-open) .x2-row-name{ font-weight: 500; color: var(--x2-ink-2); }
.x2-row:not(.is-open) .x2-flag{ filter: saturate(.55); opacity: .85; }
.x2-row.is-on{ background: var(--x2-card); box-shadow: inset 0 0 0 1.5px var(--x2-ink), var(--x2-shadow-card); }
.x2-row.is-on .x2-flag{ filter: none; opacity: 1; }
.x2-row:active{ background: var(--x2-paper-2); }

.x2-fiche{
  position: relative; min-height: 0; overflow: hidden; display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); grid-template-rows: auto 1fr auto auto;
  grid-template-areas: "head map" "facts map" "cta map" "src src";
  column-gap: 28px; row-gap: 16px;
  padding: 30px 32px 20px; background: var(--x2-paper); color: var(--x2-ink); border-radius: var(--x2-r-lg);
}
.x2-fiche > .x2-ribbon{ position: absolute; left: 0; right: 0; top: 0; height: 6px; border-radius: 0; }
.x2-fiche-head{ grid-area: head; display: grid; gap: 14px; justify-items: start; align-content: start; }
.x2-fiche-id{ display: flex; align-items: center; gap: 18px; }
.x2-fiche-name{ font-family: var(--x2-font-display); font-weight: 600; font-size: clamp(2.2rem, 4.4vw, 3.5rem); line-height: 1; letter-spacing: -.02em; }
.x2-fiche-map{ grid-area: map; min-height: 0; display: grid; place-items: center; position: relative; }
.x2-fiche-map svg{ width: 100%; height: 100%; max-height: 100%; overflow: visible; }
.x2-map-land{ fill: var(--x2-paper-3); stroke: var(--x2-ink); stroke-width: 1.4; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.x2-map-cap{ fill: var(--x2-c3); stroke: var(--x2-paper); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.x2-map-halo{ fill: none; stroke: var(--x2-c3); stroke-width: 1.5; opacity: .45; vector-effect: non-scaling-stroke; }
.x2-fiche-map-none{ color: var(--x2-ink-3); font-size: .9rem; }

.x2-facts{ grid-area: facts; align-self: end; margin-bottom: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--x2-rule-2); }
.x2-fact{ padding: 18px 4px 18px 0; border-bottom: 1px solid var(--x2-rule); min-width: 0; }
.x2-fact:nth-child(odd){ padding-right: 18px; border-right: 1px solid var(--x2-rule); }
.x2-fact:nth-child(even){ padding-left: 18px; }
.x2-fact dt{ display: flex; align-items: center; gap: .5em; font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--x2-ink-3); }
.x2-fact dt .x2-ico{ width: 1.3em; height: 1.3em; }
.x2-fact dd{ margin-top: 5px; font-size: clamp(1.15rem, 2.15vw, 1.7rem); font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x2-fact dd small{ font-size: .58em; font-weight: 500; color: var(--x2-ink-2); letter-spacing: 0; margin-left: .15em; }
.x2-fact dd.is-none{ color: var(--x2-ink-3); font-weight: 500; }
.x2-fact dd.is-long{ font-size: clamp(1rem, 1.75vw, 1.35rem); padding-top: .2em; }

.x2-fiche-cta{ grid-area: cta; display: grid; gap: 10px; justify-items: start; }
.x2-fiche-cta .x2-btn{ min-width: 280px; }
.x2-fiche-cta-row{ display: flex; flex-wrap: wrap; gap: 10px; }
.x2-fiche-note{ font-size: .9rem; color: var(--x2-ink-2); }
/* Part de chiffres officiels d'un pays (autres que la France, 30/11) */
/* historique des parties (02/12) : chiffres cles, colonnes des scores, liste, detail d'une partie et ses courbes */
.x2-modal-card.is-history{ width: min(820px, 100%); }
.x2-hist-kpis, .x2-hist-stats{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 4px 0 14px; }
.x2-hist-stat{ display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border-radius: var(--x2-r-sm); background: var(--x2-card); box-shadow: inset 0 0 0 1px var(--x2-rule); }
.x2-hist-stat > span:last-child{ display: grid; min-width: 0; }
.x2-hist-stat small{ font-size: .68rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--x2-ink-3); }
.x2-hist-stat b{ font-size: 1.12rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x2-hist-stat em{ font-style: normal; font-size: .76rem; color: var(--x2-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x2-hist-bars{ display: flex; align-items: flex-end; gap: 6px; height: 150px; margin: 0 0 14px; padding: 10px 12px 8px; border-radius: var(--x2-r-sm); background: var(--x2-paper-2); overflow-x: auto; }
.x2-hist-bar{ appearance: none; -webkit-appearance: none; border: 0; background: transparent; font: inherit; color: inherit; cursor: pointer; flex: 1 0 34px; max-width: 64px; height: 100%; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 4px; padding: 0; }
.x2-hist-bar b{ font-size: .7rem; font-weight: 600; color: var(--x2-ink-2); }
.x2-hist-bar i{ align-self: end; width: 70%; min-height: 4px; border-radius: 6px 6px 2px 2px; background: var(--x2-hue-deep, var(--x2-ink)); }
.x2-hist-bar.is-live i{ background: var(--x2-good); }
.x2-hist-bar img, .x2-hist-bar .x2-flag{ width: 24px; height: auto; }
.x2-hist-list{ display: grid; }
.x2-hist-row{ appearance: none; -webkit-appearance: none; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; column-gap: 12px; min-height: 56px; padding: 6px 12px; }
.x2-hist-row + .x2-hist-row{ border-top: 1px solid var(--x2-rule); }
.x2-hist-row:active{ background: var(--x2-paper-2); }
.x2-hist-row > .x2-ico{ width: 1.1em; height: 1.1em; color: var(--x2-ink-3); }
.x2-hist-main{ display: grid; min-width: 0; }
.x2-hist-main b{ font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x2-hist-main small, .x2-hist-pts small{ font-size: .78rem; color: var(--x2-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x2-hist-pts{ display: grid; justify-items: end; }
.x2-hist-pts b{ font-size: 1.05rem; font-weight: 600; }
.x2-hist-nav{ display: flex; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.x2-hist-hero{ display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; margin: 0 0 14px; }
.x2-hist-hero h3{ font-family: var(--x2-font-display); font-size: 1.7rem; font-weight: 600; line-height: 1.1; margin: 0; }
.x2-hist-hero p{ margin: 2px 0 0; font-size: .88rem; color: var(--x2-ink-2); }
.x2-hist-score{ display: grid; justify-items: end; gap: 2px; }
.x2-hist-score small{ font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--x2-ink-3); }
.x2-hist-score b{ font-family: var(--x2-font-display); font-size: 2.2rem; font-weight: 600; line-height: 1; }
.x2-hist-tabs{ margin: 2px 0 8px; }
.x2-hist-chart{ margin: 0; padding: 10px 12px 8px; border-radius: var(--x2-r-sm); background: var(--x2-card); box-shadow: inset 0 0 0 1px var(--x2-rule); }
.x2-hist-chart svg{ display: block; width: 100%; height: auto; }
.x2-hist-line{ fill: none; stroke: var(--x2-ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.x2-hist-area{ fill: var(--x2-ink); opacity: .08; }
.x2-hist-dot{ fill: var(--x2-ink); stroke: var(--x2-card); stroke-width: 2; }
.x2-hist-dot.is-hi{ fill: var(--x2-good); }
.x2-hist-dot.is-lo{ fill: var(--x2-bad); }
.x2-hist-axis{ font-size: 12px; fill: var(--x2-ink-3); font-family: var(--x2-font-text); }
.x2-hist-chart figcaption{ display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px; font-size: .82rem; color: var(--x2-ink-2); }
.x2-hist-empty{ display: flex; align-items: flex-start; gap: .6em; margin: 8px 0; color: var(--x2-ink-2); }
.x2-hist-empty .x2-ico{ flex: none; width: 1.2em; height: 1.2em; margin-top: .1em; }
@media (max-width: 860px){ .x2-hist-kpis, .x2-hist-stats{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* parties en cours : acces rapide en tete de la liste des pays, choix de celle a remplacer (02/12) */
.x2-row.is-game{ grid-template-columns: auto 1fr auto; background: var(--x2-paper-2); }
.x2-pill-go{ display: inline-flex; align-items: center; gap: .35em; background: var(--x2-ink); color: var(--x2-paper); border-color: var(--x2-ink); }
.x2-pill-go .x2-ico{ width: 1em; height: 1em; }
.x2-gamerow{ gap: 12px; }
.x2-gamerow .x2-btn{ flex: none; }
/* niveau de difficulte du pays (02/12) : pastille de la liste, jauge de la fiche */
.x2-diff-chip{ flex: none; display: inline-flex; align-items: baseline; gap: 1px; min-width: 2.5em; justify-content: center; padding: 2px 7px; border-radius: 999px; font-weight: 700; font-size: .82rem; font-variant-numeric: tabular-nums; border: 1px solid currentColor; }
.x2-diff-chip small{ font-size: .68em; font-weight: 600; opacity: .75; }
.x2-diff-chip.is-easy, .x2-fiche-diff.is-easy b, .x2-fiche-diff.is-easy .x2-diff-bar i.is-on{ color: var(--x2-good); }
.x2-diff-chip.is-mid, .x2-fiche-diff.is-mid b, .x2-fiche-diff.is-mid .x2-diff-bar i.is-on{ color: var(--x2-gold-deep); }
.x2-diff-chip.is-hard, .x2-fiche-diff.is-hard b, .x2-fiche-diff.is-hard .x2-diff-bar i.is-on{ color: var(--x2-bad); }
.x2-fiche-diff{ width: 100%; display: grid; gap: 3px; }
.x2-fiche-diff-head{ display: flex; align-items: center; gap: 10px; margin: 0; font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--x2-ink-3); }
.x2-fiche-diff-head b{ font-size: 1.05rem; letter-spacing: 0; text-transform: none; }
.x2-diff-bar{ flex: 1; display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; max-width: 220px; }
.x2-diff-bar i{ height: 7px; border-radius: 4px; background: var(--x2-rule-2); color: var(--x2-rule-2); }
.x2-diff-bar i.is-on{ background: currentColor; }
.x2-fiche-diff-why{ margin: 0; font-size: .8rem; line-height: 1.35; color: var(--x2-ink-2); }
@media (max-height: 700px){ .x2-fiche-diff-why{ display: none; } }
.x2-fiche-quality{ display: flex; align-items: flex-start; gap: .5em; margin: 8px 0 0; font-size: .82rem; line-height: 1.35; color: var(--x2-ink-2); }
.x2-fiche-quality .x2-ico{ flex: none; width: 1.2em; height: 1.2em; margin-top: .1em; color: var(--x2-ink-3); }
.x2-fiche-quality b{ color: var(--x2-ink); }
.x2-fiche-src{ grid-area: src; padding-top: 12px; border-top: 1px solid var(--x2-rule); font-size: .8rem; color: var(--x2-ink-3); }

/* ---------------------------------------------------------------
 * Partie : barre du haut
 * ------------------------------------------------------------- */
.x2-game{ position: absolute; inset: 0; display: flex; flex-direction: column; }
.x2-game[data-tab="depenses"]{ --x2-hue: var(--x2-dep); --x2-hue-soft: var(--x2-dep-soft); --x2-hue-deep: var(--x2-dep-deep); }
.x2-game[data-tab="revenus"]{ --x2-hue: var(--x2-rev); --x2-hue-soft: var(--x2-rev-soft); --x2-hue-deep: var(--x2-rev-deep); }
.x2-game[data-tab="humeur"]{ --x2-hue: var(--x2-hum); --x2-hue-soft: var(--x2-hum-soft); --x2-hue-deep: var(--x2-hum-deep); }

.x2-hud{ flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 16px 12px; }
.x2-hud-left{ display: flex; align-items: center; gap: 8px; min-width: 0; }
.x2-hud-right{ display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; }
.x2-hud-mid{ display: flex; align-items: stretch; justify-content: center; gap: 8px; min-width: 0; }

.x2-id{ display: inline-flex; align-items: center; gap: 10px; padding-right: 8px; min-width: 0; }
.x2-id-name{ font-family: var(--x2-font-display); font-weight: 600; font-size: 1.18rem; letter-spacing: -.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.x2-iconbtn{
  position: relative; flex: none; display: inline-grid; place-items: center; width: var(--x2-tap); height: var(--x2-tap);
  border-radius: 13px; color: var(--x2-on-desk); background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--x2-desk-line);
  font-size: 1.15rem; transition: background-color .15s ease, transform .08s ease;
}
.x2-iconbtn:active{ background: rgba(255,255,255,.14); transform: scale(.96); }
.x2-iconbtn .x2-soon-dot{ position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--x2-gold); box-shadow: 0 0 0 2px var(--x2-desk-2); }

.x2-stat{
  display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  padding: 7px 16px 7px 12px; border-radius: 14px; background: rgba(255,255,255,.055); box-shadow: inset 0 0 0 1px var(--x2-desk-line);
  white-space: nowrap;
}
.x2-stat-ico{ grid-row: 1 / 3; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.07); color: var(--x2-gold); font-size: 1.05rem; }
.x2-stat small{ font-size: .66rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--x2-on-desk-3); line-height: 1.2; white-space: nowrap; }
.x2-stat small .x2-stat-sub{ margin-left: .35em; font-size: 1.22em; font-weight: 600; letter-spacing: 0; text-transform: none; }
.x2-stat-val{ display: flex; align-items: baseline; gap: .45em; line-height: 1.15; }
.x2-stat b{ font-size: 1.18rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.005em; }
.x2-stat-sub{ font-size: .86rem; font-weight: 500; color: var(--x2-on-desk-2); font-variant-numeric: tabular-nums; }
.x2-stat-sub.is-pos{ color: #6fd3a3; }
.x2-stat-sub.is-neg{ color: #f29385; }
.x2-stat-main{ cursor: pointer; transition: background-color .15s ease; background: rgba(230,180,80,.09); box-shadow: inset 0 0 0 1px rgba(230,180,80,.3); padding-right: 18px; }
.x2-stat-main b{ font-size: 1.32rem; }
.x2-stat-main:active{ background: rgba(230,180,80,.18); }
/* Score relatif (100 au depart pour tous les pays) : bouton de la barre du haut, detail dans une fenetre. */
.x2-stat-score{ cursor: pointer; transition: background-color .15s ease; }
.x2-stat-score:active{ background: rgba(255,255,255,.1); }
.x2-score-big{ display: flex; align-items: baseline; gap: 12px; margin: 2px 0 14px; }
.x2-score-big b{ font-family: var(--x2-font-display); font-size: 2.6rem; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.x2-score-big span{ font-size: .92rem; color: var(--x2-ink-2); }
/* Compte a lire (finances publiques de depart) : la derniere ligne est le poste lui-meme. */
.x2-ledger-row.is-rest{ background: var(--x2-paper); box-shadow: inset 0 0 0 1px var(--x2-rule); border-radius: 0 0 16px 16px; }
.x2-ledger-row.is-rest .x2-statrow-label{ font-weight: 600; }
.x2-ledger-row.is-rest .x2-rowval b{ font-size: 1.12rem; }
.x2-stat .is-none{ color: var(--x2-on-desk-2); font-weight: 500; }

.x2-date{ display: grid; justify-items: end; gap: 1px; min-width: 132px; }
.x2-date small{ font-size: .66rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--x2-on-desk-3); line-height: 1.2; }
.x2-date b{ font-size: 1.18rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.2; }
.x2-day{ display: block; width: 100%; height: 3px; margin-top: 4px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; }
.x2-day i{ display: block; height: 100%; width: 100%; transform-origin: left center; transform: scaleX(0); background: var(--x2-gold); border-radius: 2px; }
.x2-game.is-paused .x2-day i{ background: var(--x2-on-desk-3); }

.x2-speed{ display: flex; padding: 4px; gap: 3px; border-radius: 15px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--x2-desk-line); }
.x2-speed button{
  min-width: 46px; height: 42px; padding: 0 8px; border-radius: 11px; display: inline-grid; place-items: center;
  font-weight: 600; font-size: 1rem; color: var(--x2-on-desk-2); font-variant-numeric: tabular-nums;
  transition: background-color .15s ease, color .15s ease;
}
.x2-speed button .x2-ico{ width: 1.2em; height: 1.2em; stroke-width: 2; }
.x2-speed button:active{ background: rgba(255,255,255,.12); }
.x2-speed button[aria-pressed="true"]{ background: var(--x2-paper); color: var(--x2-ink); box-shadow: 0 6px 14px -8px rgba(0,0,0,.8); }
.x2-speed button[data-speed="0"][aria-pressed="true"]{ background: var(--x2-gold); color: #2a1d02; }

/* ---------------------------------------------------------------
 * Partie : le dossier (onglets + feuille)
 * ------------------------------------------------------------- */
.x2-work{ flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 14px 14px; }
.x2-tabs{ flex: none; display: flex; align-items: flex-end; gap: 6px; padding: 0 0 0 20px; }
.x2-tab{
  position: relative; display: flex; align-items: center; gap: 11px; min-width: 196px; height: 56px; padding: 0 20px 2px 14px;
  border-radius: 16px 16px 0 0; color: var(--x2-on-desk);
  background: rgba(255,255,255,.07); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), inset 0 0 0 1px rgba(255,255,255,.05);
  transition: background-color .15s ease, color .15s ease, height .15s ease;
}
.x2-tab::before{ content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 4px; border-radius: 0 0 4px 4px; background: var(--tab-hue); opacity: .85; }
.x2-tab[data-tab="depenses"]{ --tab-hue: var(--x2-dep); --tab-soft: var(--x2-dep-soft); --tab-light: #f0907f; }
.x2-tab[data-tab="revenus"]{ --tab-hue: var(--x2-rev); --tab-soft: var(--x2-rev-soft); --tab-light: #63cf9c; }
.x2-tab[data-tab="humeur"]{ --tab-hue: var(--x2-hum); --tab-soft: var(--x2-hum-soft); --tab-light: #8eaaf5; }
.x2-tab-ico{ display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-size: 1.1rem; background: rgba(255,255,255,.08); color: var(--tab-light); }
.x2-tab-txt{ display: grid; line-height: 1.15; }
.x2-tab-txt b{ font-family: var(--x2-font-display); font-weight: 600; font-size: 1.18rem; letter-spacing: -.005em; }
.x2-tab-txt small{ font-size: .78rem; font-variant-numeric: tabular-nums; color: var(--x2-on-desk-2); }
.x2-tab:active{ background: rgba(255,255,255,.12); }
.x2-tab[aria-selected="true"]{ height: 62px; background: var(--x2-paper); color: var(--x2-ink); box-shadow: none; }
.x2-tab[aria-selected="true"]::before{ opacity: 1; height: 5px; }
.x2-tab[aria-selected="true"] .x2-tab-ico{ background: var(--tab-hue); color: #fff; }
.x2-tab[aria-selected="true"] .x2-tab-txt small{ color: var(--x2-ink-3); }
.x2-tabs-end{ margin-left: auto; align-self: center; padding: 0 8px 6px 12px; display: flex; align-items: center; justify-content: flex-end; gap: 14px; min-width: 0; overflow: hidden; color: var(--x2-on-desk-3); font-size: .8rem; }
.x2-save-dot{ display: inline-flex; align-items: center; gap: .45em; white-space: nowrap; }
.x2-save-dot .x2-ico{ width: 1.15em; height: 1.15em; }
.x2-paused{ display: none; align-items: center; gap: .5em; height: 30px; padding: 0 .85em 0 .7em; border-radius: 999px; font-weight: 600; font-size: .8rem; white-space: nowrap; color: var(--x2-gold); background: rgba(230,180,80,.1); box-shadow: inset 0 0 0 1px rgba(230,180,80,.32); }
.x2-paused .x2-ico{ width: 1.1em; height: 1.1em; stroke-width: 2.2; }
.x2-game.is-paused .x2-paused{ display: inline-flex; }
.x2-game.is-first .x2-save-dot{ display: none; }

.x2-sheet{ flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--x2-paper); color: var(--x2-ink); border-radius: var(--x2-r-lg); overflow: hidden; box-shadow: 0 30px 60px -30px rgba(0,0,0,.7); }
.x2-sheet-head{ flex: none; display: flex; align-items: flex-end; gap: 20px; padding: 20px 26px 14px; }
.x2-h1{ font-family: var(--x2-font-display); font-weight: 600; font-size: 2rem; line-height: 1.05; letter-spacing: -.02em; }
.x2-lead{ margin-top: 5px; color: var(--x2-ink-2); font-size: .95rem; }
.x2-lead b{ font-weight: 600; color: var(--x2-ink); }
.x2-total{ margin-left: auto; text-align: right; display: grid; gap: 1px; white-space: nowrap; }
.x2-total small{ font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--x2-ink-3); }
.x2-total b{ font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; color: var(--x2-hue-deep); }
.x2-total .x2-unit{ font-size: .9rem; font-weight: 500; color: var(--x2-ink-2); }
.x2-total b .x2-unit{ font-size: .6em; }
.x2-total b.is-none, .x2-total b .is-none{ color: var(--x2-ink-3); font-weight: 500; }
.x2-num.is-neg, .x2-total b.is-neg{ color: var(--x2-bad); }
/* total de l'Humeur : un bouton qui ouvre le detail du calcul (02/12) */
.x2-total-btn{ appearance: none; -webkit-appearance: none; background: transparent; border: 0; font: inherit; line-height: inherit; color: inherit; cursor: pointer; padding: 0 10px; margin: 0 -10px 0 auto; border-radius: 12px; }
.x2-total-btn:active{ background: var(--x2-rule); }
.x2-modal-body > .x2-score-big:first-child{ margin-top: 12px; }
.x2-total-btn small{ display: flex; align-items: center; justify-content: flex-end; gap: .45em; }
.x2-total-btn small .x2-ico{ width: 1em; height: 1em; flex: none; color: var(--x2-hue-deep); }      /* pas plus haute que le texte : l'en-tete garde sa hauteur */
.x2-screen-head .x2-total{ display: block; }
.x2-screen-head .x2-total small{ display: block; }

.x2-sheet-body{ flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 4px 26px 24px; }

/* Grille des postes : toujours 5 colonnes en paysage, les rangees se partagent la hauteur.
   --rows est pose par le script (4 pour 20 postes, 3 pour 15). */
.x2-grid{
  --rows: 4; --row-min: 98px; --row-max: 150px;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px;
  grid-template-rows: repeat(var(--rows), minmax(var(--row-min), 1fr));
  height: 100%;
  min-height: calc(var(--rows) * var(--row-min) + (var(--rows) - 1) * 12px);
  max-height: calc(var(--rows) * var(--row-max) + (var(--rows) - 1) * 12px);
}
/* Postes fixes (ce que le jeu ne regle pas) : une ligne fine sous la grille, pas une tuile. */
.x2-sheet-body.has-fixed{ display: flex; flex-direction: column; }
.x2-sheet-body.has-fixed .x2-grid{ flex: 1 1 auto; height: auto; }
.x2-fixedrow{ flex: none; display: flex; align-items: center; gap: 10px; margin-top: 10px; min-height: 40px; padding: 5px 14px 5px 7px; border-radius: 13px; background: var(--x2-paper-2); box-shadow: inset 0 0 0 1px var(--x2-rule); color: var(--x2-ink); text-align: left; }
.x2-fixedrow:active{ box-shadow: inset 0 0 0 1.5px var(--x2-hue); }
.x2-fixedrow .x2-badge{ width: 30px; height: 30px; border-radius: 9px; font-size: 1rem; }
.x2-fixedrow-txt{ flex: 1; display: flex; align-items: baseline; gap: .7em; min-width: 0; white-space: nowrap; overflow: hidden; }
.x2-fixedrow-txt b{ font-weight: 600; font-size: .95rem; }
.x2-fixedrow-txt small{ font-size: .8rem; color: var(--x2-ink-3); overflow: hidden; text-overflow: ellipsis; }
.x2-fixedrow > b{ font-size: 1rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.x2-fixedrow > small{ font-size: .78rem; color: var(--x2-ink-3); white-space: nowrap; }
.x2-fixedrow .x2-tile-go{ margin-left: 8px; }
/* Manifestations (onglet Humeur) : bandeau calme, ou en alerte quand l'humeur est sous son niveau de depart. */
.x2-protest{ cursor: default; }
.x2-protest:active{ box-shadow: inset 0 0 0 1px var(--x2-rule); }
.x2-protest.is-low{ background: #f8e3dc; box-shadow: inset 0 0 0 1px rgba(180,60,40,.28); }
.x2-protest.is-low .x2-badge{ background: var(--x2-bad); color: #fff; }
.x2-protest > b.is-neg{ color: var(--x2-bad); }
.x2-tab.is-alert .x2-tab-txt small{ color: #f29385; }
.x2-tab.is-alert .x2-tab-ico::after{ content: ''; position: absolute; top: -2px; right: -2px; width: 9px; height: 9px; border-radius: 50%; background: #e05a44; box-shadow: 0 0 0 2px var(--x2-desk, #151c2c); }
.x2-tab-ico{ position: relative; }
/* Fin de partie : pouvoir perdu */
.x2-over-head{ display: flex; align-items: center; gap: 16px; margin: 2px 0 14px; }
.x2-over-head .x2-badge{ background: var(--x2-bad); box-shadow: none; }
.x2-over-head p{ font-size: 1.02rem; line-height: 1.4; }
.x2-game.is-over .x2-paused{ color: #f29385; background: rgba(224,90,68,.12); box-shadow: inset 0 0 0 1px rgba(224,90,68,.35); }
.x2-game.is-over .x2-speed button:not([data-speed="0"]){ opacity: .4; }
.x2-tile{
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas: "badge name" "foot foot"; column-gap: 11px; row-gap: 8px; align-items: center; min-width: 0; min-height: 0;
  padding: 12px 13px 10px; border-radius: 16px; background: var(--x2-card); color: var(--x2-ink);
  box-shadow: inset 0 0 0 1px var(--x2-rule), var(--x2-shadow-card);
  transition: transform .08s ease, box-shadow .15s ease;
}
.x2-tile:active{ transform: translateY(1px) scale(.992); box-shadow: inset 0 0 0 1.5px var(--x2-hue); }
.x2-badge{ flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; font-size: 1.32rem; background: var(--x2-hue-soft); color: var(--x2-hue-deep); }
.x2-badge.is-solid{ background: var(--x2-hue); color: #fff; box-shadow: 0 10px 16px -10px var(--x2-hue); }
.x2-badge-lg{ width: 56px; height: 56px; border-radius: 17px; font-size: 1.75rem; }
.x2-tile > .x2-badge{ grid-area: badge; }
.x2-tile-name{ grid-area: name; font-weight: 600; font-size: .98rem; line-height: 1.2; letter-spacing: -.005em; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.x2-tile-name.is-long{ font-size: .88rem; letter-spacing: -.012em; }
.x2-tile-foot{ grid-area: foot; display: flex; align-items: baseline; gap: .4em; padding-top: 7px; border-top: 1px solid var(--x2-rule); font-variant-numeric: tabular-nums; min-width: 0; }
.x2-tile-foot b{ font-size: 1rem; font-weight: 600; }
.x2-tile-foot small{ font-size: .78rem; color: var(--x2-ink-3); }
.x2-tile-foot .is-none{ color: var(--x2-ink-3); font-weight: 500; }
.x2-tile-go{ margin-left: auto; align-self: center; display: inline-flex; align-items: center; gap: .2em; font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--x2-hue-deep); white-space: nowrap; }
.x2-tile-go .x2-ico{ width: 1.3em; height: 1.3em; stroke-width: 2.2; }

/* Jauge d'humeur : cinq crans */
.x2-mood{ display: inline-flex; align-items: center; gap: 4px; align-self: center; }
.x2-mood i{ width: 13px; height: 6px; border-radius: 3px; background: var(--x2-paper-3); }
.x2-mood i.is-on{ background: var(--x2-hue); }
.x2-tile-foot .x2-mood{ margin-left: auto; }
.x2-tile-foot .x2-mood + .x2-tile-go{ margin-left: 10px; }

/* ---------------------------------------------------------------
 * Ecran d'un poste
 * ------------------------------------------------------------- */
.x2-screen-head{ flex: none; display: flex; align-items: center; gap: 16px; padding: 16px 26px 14px 16px; border-bottom: 1px solid var(--x2-rule); }
.x2-back{ flex: none; display: inline-flex; align-items: center; gap: .5em; height: var(--x2-tap); padding: 0 1em 0 .75em; border-radius: 12px; font-weight: 600; font-size: .95rem; color: var(--x2-ink-2); box-shadow: inset 0 0 0 1.5px var(--x2-rule-2); }
.x2-back:active{ background: var(--x2-paper-2); }
.x2-back .x2-ico{ stroke-width: 2.1; }
.x2-screen-title{ min-width: 0; }
.x2-screen-title .x2-h1{ font-size: 1.75rem; }

.x2-screen-body{ flex: 1; min-height: 0; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.x2-subs{ display: flex; flex-direction: column; gap: 8px; padding: 16px 12px 16px 16px; border-right: 1px solid var(--x2-rule); background: var(--x2-paper-2); overflow-y: auto; }
.x2-sub{ display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 12px; min-height: 68px; padding: 10px 12px; border-radius: 14px; color: var(--x2-ink-2); }
.x2-sub-txt{ display: grid; min-width: 0; }
.x2-sub b{ font-weight: 600; font-size: 1.02rem; color: var(--x2-ink); }
.x2-sub small{ font-size: .8rem; color: var(--x2-ink-3); line-height: 1.25; }
.x2-sub .x2-badge{ background: var(--x2-paper-3); color: var(--x2-ink-2); }
.x2-sub:active{ background: var(--x2-paper-3); }
.x2-sub[aria-selected="true"]{ background: var(--x2-card); box-shadow: inset 0 0 0 1.5px var(--x2-hue), var(--x2-shadow-card); }
.x2-sub[aria-selected="true"] .x2-badge{ background: var(--x2-hue); color: #fff; }

.x2-pane{ min-width: 0; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 18px 26px 26px 22px; }
.x2-pane-cols{ display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.x2-pane-col{ display: grid; gap: 20px; min-width: 0; }
.x2-pane-one{ display: grid; gap: 20px; max-width: 860px; }
.x2-pane-one.is-wide{ max-width: none; }

.x2-block-head{ display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 10px; }
.x2-block-head h2{ font-family: var(--x2-font-display); font-weight: 600; font-size: 1.28rem; letter-spacing: -.01em; }
.x2-block-head p{ font-size: .88rem; color: var(--x2-ink-2); }
.x2-box{ background: var(--x2-card); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--x2-rule), var(--x2-shadow-card); }

/* Notes en etoiles */
.x2-starrow{ display: grid; grid-template-columns: minmax(0, 1fr) auto auto minmax(108px, auto); align-items: center; column-gap: 14px; min-height: 68px; padding: 8px 18px 8px 14px; }
.x2-starrow + .x2-starrow{ border-top: 1px solid var(--x2-rule); }
.x2-starrow-label{ display: flex; align-items: center; gap: 12px; min-width: 0; }
.x2-row-ico{ flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--x2-hue-soft); color: var(--x2-hue-deep); font-size: 1.05rem; }
.x2-starrow-txt{ display: grid; min-width: 0; }
.x2-starrow-txt b{ font-weight: 600; font-size: 1.02rem; line-height: 1.2; }
.x2-starrow-txt small{ font-size: .8rem; color: var(--x2-ink-3); font-variant-numeric: tabular-nums; }
.x2-stars{ display: inline-flex; }
.x2-star{ position: relative; display: grid; place-items: center; width: 44px; height: 48px; color: var(--x2-rule-2); }
.x2-star-box{ position: relative; width: 30px; height: 30px; pointer-events: none; transition: transform .1s ease; }
.x2-star svg{ display: block; width: 30px; height: 30px; fill: transparent; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.x2-star-on{ position: absolute; left: 0; top: 0; bottom: 0; width: 0; overflow: hidden; color: var(--x2-gold-deep); }
.x2-star-on svg{ fill: var(--x2-star); }
.x2-star.is-half .x2-star-on{ width: 50%; }
.x2-star.is-full .x2-star-on{ width: 100%; }
.x2-star.is-full, .x2-star.is-half{ color: var(--x2-gold-deep); }
.x2-star button{ position: absolute; top: 0; bottom: 0; width: 50%; border-radius: 8px; }
.x2-star .x2-star-l{ left: 0; }
.x2-star .x2-star-r{ right: 0; }
.x2-star button:focus-visible{ outline-offset: -2px; }
.x2-star:active .x2-star-box{ transform: scale(.88); }
.x2-halfstep{ display: inline-flex; gap: 4px; }
.x2-halfstep button{ display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; color: var(--x2-ink); background: var(--x2-paper); box-shadow: inset 0 0 0 1px var(--x2-rule); }
.x2-halfstep button .x2-ico{ stroke-width: 2.2; }
.x2-halfstep button:active:not(:disabled){ background: var(--x2-paper-3); }
.x2-halfstep button:disabled{ color: var(--x2-rule-2); }
.x2-rowval{ justify-self: end; display: inline-flex; align-items: baseline; gap: .35em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.x2-rowval b{ font-size: 1.04rem; font-weight: 600; }
.x2-rowval small{ font-size: .8rem; color: var(--x2-ink-3); }
.x2-rowval .is-none{ color: var(--x2-ink-3); font-weight: 500; }

.x2-boxfoot{ display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 18px; border-top: 1px solid var(--x2-rule-2); background: var(--x2-paper); border-radius: 0 0 16px 16px; box-shadow: inset 0 0 0 1px var(--x2-rule); font-size: .92rem; color: var(--x2-ink-2); }
.x2-boxfoot b{ color: var(--x2-ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Reglages a boutons − / + */
.x2-group + .x2-group{ border-top: 1px solid var(--x2-rule-2); }
.x2-group-label{ padding: 11px 18px 0; font-size: .7rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--x2-ink-3); }
.x2-param{ display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 12px; min-height: 54px; padding: 4px 12px 4px 18px; }
.x2-param + .x2-param{ border-top: 1px solid var(--x2-rule); }
.x2-param-ico{ display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--x2-hue-soft); color: var(--x2-hue-deep); font-size: 1.02rem; }
.x2-param-label{ font-weight: 500; font-size: .98rem; line-height: 1.25; min-width: 0; }
.x2-param-label small, .x2-statrow-label small{ display: block; margin-top: 1px; font-size: .76rem; font-weight: 400; line-height: 1.25; color: var(--x2-ink-3); }
/* Reglage paye a des beneficiaires (Politique sociale) : son cout par jour sous le libelle. */
.x2-param-paid > b{ display: block; font-weight: 500; }
.x2-param-paid small b{ font-weight: 600; color: var(--x2-ink-2); }
/* Age de la retraite : limite sans plainte, en rouge quand elle est depassee (02/12). */
.x2-ret-hint.is-bad{ color: var(--x2-bad); font-weight: 600; }
.x2-sources{ display: flex; align-items: flex-start; gap: .45em; margin-top: 8px; padding: 0 4px; font-size: .78rem; line-height: 1.35; color: var(--x2-ink-3); }
.x2-sources .x2-ico{ width: 1.15em; height: 1.15em; margin-top: .05em; }
/* Boutons a appui long (+ / −) : le navigateur ne prend pas le geste pour un defilement, pas de menu ni de selection au doigt. */
[data-hold]{ touch-action: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
[data-hold] > *{ pointer-events: none; }
.x2-stepper{ display: inline-grid; grid-template-columns: 44px minmax(86px, auto) 44px; align-items: center; height: 46px; border-radius: 13px; background: var(--x2-paper); box-shadow: inset 0 0 0 1px var(--x2-rule); }
.x2-stepper button{ display: grid; place-items: center; width: 44px; height: 46px; border-radius: 12px; color: var(--x2-ink); font-size: 1.05rem; }
.x2-stepper button .x2-ico{ stroke-width: 2.2; }
.x2-stepper button:active:not(:disabled){ background: var(--x2-paper-3); }
.x2-stepper button:disabled{ color: var(--x2-rule-2); }
.x2-stepper output{ display: inline-flex; align-items: baseline; justify-content: center; gap: .3em; padding: 0 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.x2-stepper output b{ font-size: 1.04rem; font-weight: 600; }
.x2-stepper output small{ font-size: .78rem; color: var(--x2-ink-3); }
.x2-stepper.is-none output b{ color: var(--x2-ink-3); font-weight: 500; }
.x2-stepper.is-fixed button{ opacity: .45; }

/* Chiffres en lecture seule */
.x2-statrow{ display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 12px; min-height: 54px; padding: 6px 18px; }
.x2-statrow + .x2-statrow{ border-top: 1px solid var(--x2-rule); }
/* Sports › Resultats : place mondiale et tendance vers la cible. */
.x2-placerow{ grid-template-columns: auto minmax(0, 1fr) auto 62px 58px; }
.x2-place-evo{ justify-self: end; }
.x2-placerow .x2-rowval{ justify-content: flex-end; text-align: right; }
.x2-place-trend span{ display: inline-flex; align-items: center; gap: .35em; font-size: .8rem; font-weight: 600; white-space: nowrap; color: var(--x2-ink-3); }
.x2-place-trend .x2-ico{ width: 1.15em; height: 1.15em; flex: none; }
.x2-place-trend .is-up{ color: var(--x2-good); }
.x2-place-trend .is-down{ color: var(--x2-bad); }
.x2-statrow-ico{ display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--x2-paper-2); color: var(--x2-ink-2); font-size: 1.02rem; }
.x2-statrow-label{ font-weight: 500; font-size: .98rem; line-height: 1.25; min-width: 0; }

/* Commentaires */
.x2-comment{ display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 12px; min-height: 52px; padding: 8px 18px; }
.x2-comment + .x2-comment{ border-top: 1px solid var(--x2-rule); }
.x2-comment-n{ display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: .8rem; font-weight: 600; background: var(--x2-paper-2); color: var(--x2-ink-2); font-variant-numeric: tabular-nums; }
.x2-comment p{ font-size: .95rem; line-height: 1.35; }
.x2-comment.is-none p{ color: var(--x2-ink-3); font-style: italic; }
.x2-comment.is-good .x2-comment-n{ background: var(--x2-rev-soft); color: var(--x2-rev-deep); }
.x2-comment.is-bad .x2-comment-n{ background: var(--x2-dep-soft); color: var(--x2-dep-deep); }

/* Etat vide (poste ou rubrique a venir) */
.x2-empty{ display: grid; justify-items: center; align-content: center; gap: 10px; min-height: 100%; padding: 30px 20px; text-align: center; color: var(--x2-ink-2); }
.x2-empty .x2-badge-lg{ margin-bottom: 6px; }
.x2-empty h2{ font-family: var(--x2-font-display); font-weight: 600; font-size: 1.5rem; color: var(--x2-ink); letter-spacing: -.01em; }
.x2-empty p{ max-width: 44ch; font-size: .98rem; }
.x2-pane .x2-empty{ min-height: 320px; background: var(--x2-paper-2); border-radius: 16px; box-shadow: inset 0 0 0 1.5px var(--x2-rule); }

/* Deux blocs cote a cote (half) : place mondiale, jauge... */
.x2-pane-pair{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.x2-pane-pair > .x2-block{ display: flex; flex-direction: column; min-width: 0; }
.x2-pane-pair > .x2-block > .x2-box{ flex: 1; }
.x2-kpi-box{ display: grid; gap: 12px; align-content: start; padding: 16px 18px; }
.x2-kpi-top{ display: flex; align-items: center; gap: 14px; }
.x2-kpi-ico{ flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--x2-hue-soft); color: var(--x2-hue-deep); font-size: 1.45rem; }
.x2-kpi-main{ display: flex; align-items: baseline; gap: .45em; }
.x2-kpi-main b{ font-family: var(--x2-font-display); font-size: 2.3rem; font-weight: 600; line-height: 1; letter-spacing: -.02em; color: var(--x2-ink); }
.x2-kpi-main b.is-none{ color: var(--x2-ink-3); }
.x2-kpi-main small{ font-size: .95rem; color: var(--x2-ink-2); }
.x2-kpi-note{ font-size: .86rem; color: var(--x2-ink-2); line-height: 1.35; }
.x2-kpi-note b{ color: var(--x2-ink); font-weight: 600; }
.x2-kpi-box .x2-btn{ justify-self: start; }
.x2-meter{ height: 12px; border-radius: 999px; background: var(--x2-paper-2); box-shadow: inset 0 0 0 1px var(--x2-rule); overflow: hidden; }
.x2-meter-scale{ display: flex; justify-content: space-between; margin-top: -4px; font-size: .74rem; color: var(--x2-ink-3); }
.x2-meter i{ display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--x2-hue), var(--x2-hue-deep)); transition: width .3s ease; }

/* Fiche « Sources et définitions » (Parametres) : seul endroit ou s'affichent les textes de source */
.x2-modal-card.is-sources{ width: min(720px, 100%); }
.x2-src-list{ display: grid; }
.x2-src-list li{ display: grid; gap: 2px; padding: 9px 0; border-top: 1px solid var(--x2-rule); }
.x2-src-list li:first-child{ border-top: 0; }
.x2-src-list b{ font-weight: 600; font-size: .95rem; font-variant-numeric: tabular-nums; }
.x2-src-list span{ font-size: .86rem; line-height: 1.4; color: var(--x2-ink-2); }
.x2-src-list a{ color: var(--x2-hum-deep); font-weight: 600; }
.x2-src-list li.is-author span{ font-style: italic; }

/* Fenetre du classement mondial */
.x2-modal-card.is-ranking{ width: min(640px, 100%); }
.x2-rank-head{ padding: 14px 0 10px; display: grid; gap: 6px; border-bottom: 1px solid var(--x2-rule); }
.x2-rank-head p:first-child{ font-size: 1rem; color: var(--x2-ink-2); }
.x2-rank-head p:first-child b{ font-family: var(--x2-font-display); font-size: 1.5rem; color: var(--x2-ink); }
.x2-rank-src{ font-size: .8rem; line-height: 1.4; color: var(--x2-ink-3); }
.x2-rank-list{ padding: 6px 0 4px; }
.x2-rank-row{ display: grid; grid-template-columns: 44px auto minmax(0, 1fr) auto 62px; align-items: center; column-gap: 12px; min-height: 46px; padding: 4px 10px; border-radius: 10px; }
.x2-rank-row + .x2-rank-row{ border-top: 1px solid var(--x2-rule); }
/* pays conquis (monde vivant, 02/12) : score a zero, conquerant et meilleur score */
.x2-rank-row.is-lost .x2-rank-name, .x2-rank-row.is-lost .x2-rank-score{ color: var(--x2-ink-3); }
.x2-rank-name small.x2-rank-lost{ white-space: normal; }
.x2-rank-row.is-me{ background: var(--x2-hue-soft); box-shadow: inset 0 0 0 1.5px var(--x2-hue); border-top-color: transparent; }
.x2-rank-row.is-me + .x2-rank-row{ border-top-color: transparent; }
.x2-rank-n{ text-align: right; font-weight: 600; color: var(--x2-ink-2); }
.x2-rank-name{ display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x2-rank-name em{ font-style: normal; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--x2-hue); color: #fff; }
.x2-rank-name small{ font-size: .7rem; padding: 1px 7px; border-radius: 999px; background: var(--x2-paper-2); color: var(--x2-ink-3); box-shadow: inset 0 0 0 1px var(--x2-rule); }
.x2-rank-score{ font-weight: 600; }
.x2-rank-row .x2-flag{ width: 30px; height: 22px; border-radius: 4px; font-size: 9px; }

/* Boutique d'un ecran (armement...) : categories, solde, cartes */
.x2-shop-bar{ display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 14px; }
.x2-wallet{ margin-left: auto; display: inline-flex; align-items: center; gap: .55em; padding: 6px 14px 6px 10px; border-radius: 12px; background: var(--x2-card); box-shadow: inset 0 0 0 1px var(--x2-rule); font-size: .82rem; color: var(--x2-ink-2); white-space: nowrap; }
.x2-wallet .x2-ico{ color: var(--x2-gold-deep); }
.x2-wallet b{ font-size: 1.02rem; font-weight: 600; color: var(--x2-ink); }
.x2-segs{ display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--x2-paper-2); box-shadow: inset 0 0 0 1px var(--x2-rule); }
.x2-seg{ display: inline-flex; align-items: center; gap: .5em; min-height: 42px; padding: 0 16px 0 12px; border-radius: 11px; font-weight: 600; font-size: .95rem; color: var(--x2-ink-2); }
.x2-seg small{ display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; font-size: .72rem; background: var(--x2-paper-3); color: var(--x2-ink-2); }
.x2-seg[aria-selected="true"]{ background: var(--x2-card); color: var(--x2-ink); box-shadow: var(--x2-shadow-card), inset 0 0 0 1px var(--x2-rule); }
.x2-seg[aria-selected="true"] .x2-ico{ color: var(--x2-hue-deep); }
.x2-seg[aria-selected="true"] small{ background: var(--x2-hue); color: #fff; }
.x2-buy-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; }
.x2-buy{ display: flex; flex-direction: column; min-width: 0; border-radius: 16px; background: var(--x2-card); box-shadow: inset 0 0 0 1px var(--x2-rule), var(--x2-shadow-card); overflow: hidden; }
/* L'image recouvre son cadre, marges comprises (padding herite) : elle ne peut pas le deborder. */
.x2-art{ position: relative; display: block; }
.x2-art img{ position: absolute; left: 0; top: 0; width: 100%; height: 100%; padding: inherit; object-fit: contain; }
.x2-buy-art{ height: 104px; padding: 8px 14px 2px; background: radial-gradient(ellipse 70% 80% at 50% 62%, var(--x2-paper-2), transparent 72%); }
.x2-buy-body{ flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 2px 14px 14px; }
.x2-buy h3{ font-size: 1rem; font-weight: 600; line-height: 1.2; letter-spacing: -.005em; }
.x2-buy-price{ display: flex; align-items: baseline; gap: .4em; margin-top: -4px; }
.x2-buy-price b{ font-size: 1.22rem; font-weight: 600; letter-spacing: -.01em; color: var(--x2-hue-deep); }
.x2-buy-price small{ font-size: .78rem; color: var(--x2-ink-3); }
.x2-buy-facts{ display: grid; border-top: 1px solid var(--x2-rule); }
.x2-buy-facts > div{ display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 27px; border-bottom: 1px solid var(--x2-rule); min-width: 0; }
.x2-buy-facts dt{ display: flex; align-items: center; gap: .4em; font-size: .8rem; color: var(--x2-ink-2); white-space: nowrap; }
.x2-buy-facts dt .x2-ico{ width: 1.1em; height: 1.1em; flex: none; color: var(--x2-ink-3); }
.x2-buy-facts dd{ font-size: .9rem; font-weight: 600; text-align: right; }   /* 01/12 : plus de nowrap, une valeur longue (« 2,1 millions de m² / an ») passe a la ligne entre deux mots au lieu de deborder ; les nombres restent entiers (espaces insecables) */
.x2-buy-facts dd.is-none{ color: var(--x2-ink-3); font-weight: 500; }
.x2-buy-go{ margin-top: auto; width: 100%; }
.x2-buy-facts + .x2-buy-go{ margin-top: auto; }   /* boutons alignes en bas des cartes d'une meme rangee */
/* Evenements (Culture) : memes cartes que la boutique ; pastille « En cours » et cadre colore pendant l'evenement. */
.x2-event{ position: relative; }
.x2-event-on{ position: absolute; top: 9px; right: 9px; display: none; align-items: center; gap: .3em; height: 24px; padding: 0 9px 0 7px; border-radius: 999px; font-size: .72rem; font-weight: 600; background: var(--x2-hue); color: #fff; box-shadow: var(--x2-shadow-card); }
.x2-event-on .x2-ico{ width: 1em; height: 1em; }
.x2-event.is-running .x2-event-on{ display: inline-flex; }
.x2-event.is-running{ box-shadow: inset 0 0 0 2px var(--x2-hue), var(--x2-shadow-card); }
.x2-event-gain{ color: var(--x2-good); }
.x2-event-gain.is-none{ color: var(--x2-ink-3); }
.x2-events .x2-shop-bar{ justify-content: flex-end; }
/* Renseignement › Operations antiterroristes : carte payee une fois ; « Eliminé » pour de bon */
.x2-ops .x2-op-tally{ margin-left: 0; }
.x2-ops .x2-op-tally .x2-ico{ color: var(--x2-bad); }
.x2-opcard{ position: relative; }
.x2-opcard-done{ position: absolute; top: 9px; right: 9px; display: none; align-items: center; gap: .3em; height: 24px; padding: 0 9px 0 7px; border-radius: 999px; font-size: .72rem; font-weight: 600; background: var(--x2-good); color: #fff; box-shadow: var(--x2-shadow-card); }
.x2-opcard-done .x2-ico{ width: 1em; height: 1em; }
.x2-opcard.is-done .x2-opcard-done{ display: inline-flex; }
.x2-opcard.is-done .x2-buy-art img{ filter: grayscale(1); opacity: .55; }
.x2-opcard-state{ font-weight: 600; color: var(--x2-bad); }
.x2-opcard-state.is-done{ color: var(--x2-good); }
/* Affaires etrangeres : ambassade a gauche, regle des relations et ambassades construites a droite */
.x2-emb{ display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: 12px; align-items: start; }
.x2-emb-side{ gap: 8px; }
.x2-rel-rule dt{ white-space: normal; }
.x2-rel-up{ color: var(--x2-good); }
.x2-rel-down{ color: var(--x2-bad); }
.x2-emb-h{ margin: 4px 0 0; font-size: .86rem; font-weight: 600; color: var(--x2-ink-2); }
.x2-embassies .x2-op-tally{ margin-left: 0; }
.x2-emb-list{ max-height: 168px; }
.x2-emb-list small b{ color: var(--x2-ink); }
@media (max-width: 1100px){ .x2-emb{ grid-template-columns: 1fr; } }
/* Organisations internationales */
.x2-orgs .x2-org-chip{ margin-left: 0; }
.x2-orgs .x2-org-chip .x2-ico{ color: var(--x2-ink-3); }
.x2-org h3 small{ display: block; margin-top: 2px; font-size: .74rem; font-weight: 400; color: var(--x2-ink-3); }
.x2-org dd small{ font-size: .74rem; font-weight: 400; color: var(--x2-ink-3); }
.x2-org.is-locked{ opacity: .72; }
.x2-org-foot{ margin-top: 12px; }
/* Choix du pays d'une ambassade : relations a droite, pays trop bas grises */
.x2-choose-note{ margin-bottom: 10px; }
.x2-choose-row:disabled{ opacity: .5; cursor: default; background: none; }
.x2-rel-val{ min-width: 2.2em; text-align: right; font-weight: 600; color: var(--x2-ink-2); }
.x2-rel-val.is-up{ color: var(--x2-good); }
/* Ideologies : alerte de la tuile tant qu'aucune n'est choisie, cartes d'effets, choix des postes (conservatisme) */
.x2-tile-alert{ position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: .3em; height: 22px; padding: 0 8px 0 6px; border-radius: 999px; font-size: .68rem; font-weight: 700; background: var(--x2-gold); color: var(--x2-ink); box-shadow: var(--x2-shadow-card); animation: x2-alert-pulse 2.4s ease-in-out infinite; }
.x2-tile-alert .x2-ico{ width: 1.05em; height: 1.05em; }
@keyframes x2-alert-pulse{ 50%{ transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce){ .x2-tile-alert{ animation: none; } }
.x2-ideo-alert, .x2-ideo-now{ display: flex; align-items: center; flex-wrap: wrap; gap: .5em .7em; margin-bottom: 14px; padding: 10px 14px; border-radius: 12px; font-size: .9rem; }
.x2-ideo-alert{ background: color-mix(in srgb, var(--x2-gold) 26%, var(--x2-card)); box-shadow: inset 0 0 0 1.5px var(--x2-gold); font-weight: 600; }
.x2-ideo-now{ background: var(--x2-card); box-shadow: inset 0 0 0 1px var(--x2-rule); }
.x2-ideo-now small{ margin-left: auto; color: var(--x2-ink-3); }
.x2-ideo-fx{ display: grid; border-top: 1px solid var(--x2-rule); }
.x2-ideo-fx li{ display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 4px 0; border-bottom: 1px solid var(--x2-rule); font-size: .82rem; color: var(--x2-ink-2); }
.x2-ideo-fx li span{ flex: 1; min-width: 0; line-height: 1.25; }
.x2-ideo-fx li b{ font-size: .88rem; white-space: nowrap; }
.x2-ideo-fx li.is-good b{ color: var(--x2-good); }
.x2-ideo-fx li.is-bad b{ color: var(--x2-bad); }
.x2-ideo-fx li small{ display: inline-flex; align-items: center; gap: .2em; font-size: .68rem; color: var(--x2-ink-3); white-space: nowrap; }
.x2-ideo-fx li small .x2-ico{ width: 1em; height: 1em; }
.x2-ideo-picks{ display: grid; gap: 6px; margin-top: 4px; }
.x2-ideo-chips{ display: flex; flex-wrap: wrap; gap: 6px; }
.x2-ideo-chips .x2-chip{ height: 32px; display: inline-flex; align-items: center; gap: .3em; font-size: .76rem; }
.x2-ideo-chips .x2-chip:disabled{ opacity: .45; }
.x2-ideo-tag{ display: inline-flex; align-items: center; gap: .2em; margin-left: .4em; padding: 1px 7px 1px 5px; border-radius: 999px; font-size: .72rem; font-weight: 700; vertical-align: middle; white-space: nowrap; }
.x2-ideo-tag .x2-ico{ width: 1em; height: 1em; }
.x2-ideo-tag.is-good{ color: var(--x2-good); background: color-mix(in srgb, var(--x2-good) 14%, transparent); }
.x2-ideo-tag.is-bad{ color: var(--x2-bad); background: color-mix(in srgb, var(--x2-bad) 12%, transparent); }
.x2-act-hint.is-bad{ color: var(--x2-bad); }
/* Religions : repartition des croyants */
.x2-faith-top{ padding: 14px 16px 12px; border-bottom: 1px solid var(--x2-rule); }
.x2-faith-bar{ display: flex; height: 18px; border-radius: 999px; overflow: hidden; background: var(--x2-paper-2); }
.x2-faith-seg{ height: 100%; transition: width .4s ease; }
.x2-faith-row{ grid-template-columns: auto auto minmax(0, 1fr) auto auto; }
/* Revenus › Electricite : bilan */
.x2-nrj-row .x2-statrow-label{ display: grid; gap: 5px; }
.x2-nrj-bar{ display: block; height: 6px; border-radius: 999px; background: var(--x2-paper-2); overflow: hidden; max-width: 320px; }
.x2-nrj-bar i{ display: block; height: 100%; border-radius: inherit; background: var(--x2-hue); transition: width .4s ease; }
.x2-nrj-sum{ margin-top: 12px; }
.x2-nrj-sum dd.is-good{ color: var(--x2-good); }
.x2-nrj-sum dd.is-bad{ color: var(--x2-bad); }
.x2-nrj-sum dd.is-good, .x2-goods-bal.is-good{ color: var(--x2-good); }
/* Industries (Revenus) : production et consommation de chaque produit, en face l'une de l'autre */
.x2-goods-row{ display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(7.2em, auto) minmax(7.2em, auto) minmax(7.2em, auto); align-items: center; column-gap: 14px; min-height: 54px; padding: 6px 18px; }
.x2-goods-row + .x2-goods-row{ border-top: 1px solid var(--x2-rule); }
.x2-goods-row > .x2-num{ justify-self: end; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.x2-goods-label{ display: grid; gap: 2px; min-width: 0; }
.x2-goods-label b{ font-weight: 500; }
.x2-goods-label small{ font-size: .74rem; color: var(--x2-ink-3); }
.x2-goods-bal{ font-weight: 600; }
.x2-goods-bal.is-bad{ color: var(--x2-bad); }
.x2-goods-head{ min-height: 0; padding-top: 10px; padding-bottom: 8px; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--x2-ink-3); }
.x2-goods-head > span{ justify-self: end; text-align: right; }
.x2-goods-head > span:nth-child(2){ justify-self: start; text-align: left; }
/* Boutique de demonstration : packs et coups de pouce fictifs */
.x2-offers{ display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.x2-offer{ display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--x2-card); box-shadow: inset 0 0 0 1px var(--x2-rule), var(--x2-shadow-card); }
.x2-offer.is-best{ box-shadow: inset 0 0 0 2px var(--x2-gold), var(--x2-shadow-card); }
.x2-offer-main{ min-width: 0; }
.x2-offer-main h3{ display: flex; flex-wrap: wrap; align-items: baseline; gap: .5em; font-size: .98rem; font-weight: 600; }
.x2-offer-tag{ padding: 1px 8px; border-radius: 999px; background: var(--x2-gold); color: var(--x2-ink); font-size: .66rem; font-weight: 700; }
.x2-offer-main ul{ margin-top: 4px; display: grid; gap: 1px; font-size: .78rem; color: var(--x2-ink-2); }
.x2-offer .x2-btn{ white-space: nowrap; }
.x2-ideo-alert .x2-btn{ margin-left: auto; }
/* Commerce : produits a vendre, contrats ; Banque centrale : emprunts */
.x2-trade-prod{ grid-template-columns: 32px minmax(0, 1fr) minmax(6.5em, auto) minmax(6.5em, auto) minmax(6.5em, auto) auto; }
.x2-trade-prod .x2-btn{ justify-self: end; }
.x2-num.is-neg{ color: var(--x2-bad); }
.x2-trade-opt{ margin: 0 0 10px; }
.x2-contract{ grid-template-columns: auto minmax(0, 1fr) auto; }
.x2-trade-who{ display: flex; align-items: center; gap: 10px; min-width: 0; }
.x2-trade-who > span{ display: grid; gap: 2px; min-width: 0; }
.x2-trade-who b{ font-weight: 500; }
.x2-trade-who small{ font-size: .74rem; color: var(--x2-ink-3); }
.x2-trade-who .x2-flag{ width: 28px; height: 20px; border-radius: 4px; font-size: 8px; flex: none; }
.x2-choose-row .x2-trade-who{ flex: 1; display: grid; gap: 2px; }
.x2-empty-line{ padding: 14px 18px; }
.x2-loan-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 10px; }
.x2-loan{ display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--x2-card); box-shadow: inset 0 0 0 1px var(--x2-rule), var(--x2-shadow-card); }
.x2-loan h3{ display: flex; align-items: center; gap: .45em; font-size: 1rem; font-weight: 600; }
.x2-loan .x2-buy-go{ margin-top: auto; }
/* Montant trop long pour la ligne (« 1 625 milliards $ » en portrait et a 1024 px) : il passe dessous, a droite, au lieu de deborder de la carte (lot bugs, 30/11). */
.x2-loan .x2-buy-facts > div{ flex-wrap: wrap; column-gap: 8px; row-gap: 0; }
.x2-loan .x2-buy-facts dd{ margin-left: auto; }
@media (max-width: 899px){ .x2-goods-row{ grid-template-columns: 28px minmax(0, 1fr) auto auto auto; column-gap: 10px; padding: 6px 12px; font-size: .9rem; } .x2-trade-prod{ grid-template-columns: 28px minmax(0, 1fr) auto auto auto auto; } }
/* Humeur d'un sujet */
.x2-moodblock .x2-kpi-main .x2-mood{ margin-left: .7em; align-self: center; }
.x2-mood-h{ margin: 16px 0 8px; }
.x2-mood-go{ margin-top: 12px; }
/* Evenements subis : risque de l'annee et journal */
.x2-risk-label{ display: grid; gap: 2px; min-width: 0; }
.x2-risk-label b{ font-weight: 500; }
.x2-risk-label small{ font-size: .74rem; color: var(--x2-ink-3); }
.x2-risk-row .x2-rowval small{ font-size: .72rem; }
.x2-risk-logbox{ padding: 10px 18px 14px; border-top: 1px solid var(--x2-rule); }
.x2-risk-log{ display: grid; gap: 4px; margin-top: 6px; font-size: .84rem; color: var(--x2-ink-2); }
.x2-risk-log li{ display: flex; gap: .6em; align-items: baseline; }
.x2-risk-log li span{ flex: none; min-width: 6.5em; color: var(--x2-ink-3); font-variant-numeric: tabular-nums; }
.x2-risk-log li.is-loss{ color: var(--x2-bad); }
.x2-risk-log li.is-win{ color: var(--x2-good); }
/* Statistiques vivantes : ecart depuis le debut de la partie */
.x2-statrow.is-living{ grid-template-columns: auto minmax(0, 1fr) auto auto; }
.x2-kpi-main .x2-stat-delta{ margin-left: .5em; align-self: center; }
.x2-kpi-main .x2-stat-delta:empty{ display: none; }
.x2-faith-dot{ flex: none; width: 10px; height: 10px; border-radius: 50%; }
.x2-faith-seg.is-c0, .x2-faith-dot.is-c0{ background: #3d64c4; }
.x2-faith-seg.is-c1, .x2-faith-dot.is-c1{ background: #2f9a6b; }
.x2-faith-seg.is-c2, .x2-faith-dot.is-c2{ background: #8a5cc2; }
.x2-faith-seg.is-c3, .x2-faith-dot.is-c3{ background: #e07b2c; }
.x2-faith-seg.is-c4, .x2-faith-dot.is-c4{ background: #d9a514; }
.x2-faith-seg.is-c5, .x2-faith-dot.is-c5{ background: #aeb7c6; }

.x2-modal-card.is-order{ width: min(760px, 100%); }
.x2-order{ display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 22px; padding-top: 16px; align-items: start; }
.x2-order-art{ aspect-ratio: 5 / 3; padding: 14px; border-radius: 16px; background: radial-gradient(ellipse 70% 80% at 50% 62%, var(--x2-paper-3), var(--x2-paper-2) 75%); box-shadow: inset 0 0 0 1px var(--x2-rule); }
.x2-order-main{ display: grid; gap: 14px; min-width: 0; }
.x2-order-price{ display: flex; align-items: baseline; gap: .45em; margin-top: -6px; }
.x2-order-price b{ font-size: 1.6rem; font-weight: 600; letter-spacing: -.01em; }
.x2-order-price small{ color: var(--x2-ink-3); }
.x2-order-qty{ display: grid; gap: 8px; }
.x2-order-label{ font-size: .7rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--x2-ink-3); }
.x2-qty{ display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; height: 54px; border-radius: 14px; background: var(--x2-card); box-shadow: inset 0 0 0 1.5px var(--x2-rule-2); }
.x2-qty button{ display: grid; place-items: center; height: 54px; border-radius: 13px; font-size: 1.15rem; color: var(--x2-ink); }
.x2-qty button .x2-ico{ stroke-width: 2.2; }
.x2-qty button:active{ background: var(--x2-paper-2); }
.x2-qty input{ min-width: 0; border: 0; background: transparent; outline: none; text-align: center; font: inherit; font-size: 1.3rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--x2-ink); user-select: text; -webkit-user-select: text; }
.x2-qty:focus-within{ box-shadow: inset 0 0 0 2px var(--x2-ink); }
.x2-presets{ display: flex; flex-wrap: wrap; gap: 6px; }
.x2-presets .x2-chip{ height: 38px; min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.x2-order-sum{ display: grid; border-top: 1px solid var(--x2-rule-2); }
.x2-order-sum > div{ display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--x2-rule); }
.x2-order-sum dt{ font-size: .9rem; color: var(--x2-ink-2); }
.x2-order-sum dd{ font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.x2-order-sum dd small{ display: block; font-size: .76rem; font-weight: 400; color: var(--x2-ink-3); }
.x2-order-sum dd.is-neg{ color: var(--x2-bad); }
.x2-order-warn{ margin-right: auto; display: inline-flex; align-items: center; gap: .45em; font-size: .88rem; font-weight: 500; color: var(--x2-bad); }

/* ---------------------------------------------------------------
 * Fenetres (parametres, boutique, confirmations) et messages
 * ------------------------------------------------------------- */
.x2-modal{ position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; background: rgba(6,10,18,.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: x2-fade .16s ease both; }
.x2-modal-card{ width: min(680px, 100%); max-height: min(720px, 100%); display: flex; flex-direction: column; background: var(--x2-paper); color: var(--x2-ink); border-radius: 22px; overflow: hidden; box-shadow: var(--x2-shadow-pop); animation: x2-rise .2s cubic-bezier(.2,.8,.2,1) both; }
.x2-modal-card:focus{ outline: none; }
.x2-modal-card.is-small{ width: min(480px, 100%); }
.x2-modal-head{ flex: none; display: flex; align-items: center; gap: 14px; padding: 18px 16px 14px 24px; border-bottom: 1px solid var(--x2-rule); }
.x2-modal-head h2{ font-family: var(--x2-font-display); font-weight: 600; font-size: 1.5rem; letter-spacing: -.01em; }
.x2-close{ margin-left: auto; display: grid; place-items: center; width: var(--x2-tap); height: var(--x2-tap); border-radius: 12px; color: var(--x2-ink-2); font-size: 1.1rem; }
.x2-close:active{ background: var(--x2-paper-2); }
.x2-modal-body{ flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 24px 22px; }
.x2-modal-foot{ flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 24px 18px; border-top: 1px solid var(--x2-rule); }
.x2-modal-text{ padding-top: 14px; font-size: 1rem; color: var(--x2-ink-2); }
.x2-modal-text b{ color: var(--x2-ink); font-weight: 600; }

.x2-set{ padding: 16px 0 4px; }
.x2-set + .x2-set{ border-top: 1px solid var(--x2-rule); }
.x2-set h3{ font-size: .72rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--x2-ink-3); margin-bottom: 6px; }
.x2-set-row{ display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 12px; min-height: 52px; padding: 5px 0; }
.x2-set-row + .x2-set-row{ border-top: 1px solid var(--x2-rule); }
.x2-set-ico{ display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--x2-paper-2); color: var(--x2-ink-2); font-size: 1.05rem; }
.x2-set-ico.is-good{ background: var(--x2-rev-soft); color: var(--x2-rev-deep); }
.x2-set-ico.is-warn{ background: #f7e7c4; color: #8a5a00; }
.x2-set-txt{ display: grid; min-width: 0; }
.x2-set-txt b{ font-weight: 600; font-size: .98rem; }
.x2-set-txt small{ font-size: .84rem; color: var(--x2-ink-2); line-height: 1.3; }
.x2-set-val{ font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.x2-set-actions{ display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 0 10px; }
.x2-set-foot{ padding-top: 14px; font-size: .8rem; color: var(--x2-ink-3); }

.x2-toasts{ position: fixed; left: 0; right: 0; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 60; display: grid; justify-items: center; gap: 8px; pointer-events: none; }
.x2-toast{ display: inline-flex; align-items: center; gap: .6em; max-width: min(520px, 90vw); padding: 12px 18px; border-radius: 14px; background: var(--x2-ink); color: var(--x2-paper); font-weight: 500; font-size: .95rem; box-shadow: 0 18px 40px -14px rgba(0,0,0,.7), inset 0 0 0 1px rgba(255,255,255,.08); animation: x2-rise .22s cubic-bezier(.2,.8,.2,1) both; }
.x2-toast.is-out{ opacity: 0; transform: translateY(6px); transition: opacity .25s ease, transform .25s ease; }
.x2-toast .x2-ico{ color: var(--x2-gold); }

/* Petit ecran : le jeu est prevu pour une tablette */
.x2-small{ position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 50; display: none; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: 16px; background: var(--x2-gold); color: #2a1d02; font-size: .92rem; font-weight: 500; box-shadow: 0 18px 40px -14px rgba(0,0,0,.7); }
.x2-small .x2-ico{ width: 1.5em; height: 1.5em; }
.x2-small button{ margin-left: auto; flex: none; height: 40px; padding: 0 1em; border-radius: 10px; background: rgba(42,29,2,.14); font-weight: 600; }

@keyframes x2-fade{ from{ opacity: 0; } to{ opacity: 1; } }
@keyframes x2-rise{ from{ opacity: 0; transform: translateY(10px); } to{ opacity: 1; transform: none; } }
.x2-enter{ animation: x2-rise .2s cubic-bezier(.2,.8,.2,1) both; }

/* ---------------------------------------------------------------
 * Tailles d'ecran
 * ------------------------------------------------------------- */
/* Tablette en paysage etroite (1024 px) : on resserre */
@media (max-width: 1279px) and (min-width: 900px){
  .x2-id-name{ display: none; }
  /* quatre chiffres dans la barre du haut : seul le solde garde son icone */
  .x2-hud-mid .x2-stat:not(.x2-stat-main) .x2-stat-ico{ display: none; }
  .x2-hud-mid .x2-stat:not(.x2-stat-main){ grid-template-columns: auto; padding-left: 14px; }
}
@media (max-width: 1100px){
  .x2-fact dt{ font-size: .7rem; letter-spacing: .04em; }
  .x2-hud{ gap: 10px; padding-left: 12px; padding-right: 12px; }
  .x2-id-name{ display: none; }
  .x2-hud-mid .x2-stat-ico{ display: none; }
  .x2-hud-mid .x2-stat{ grid-template-columns: auto; padding-left: 14px; }
  .x2-stat{ padding: 7px 12px 7px 10px; column-gap: 8px; }
  .x2-hud-mid{ gap: 6px; }
  .x2-hud-mid .x2-stat:not(.x2-stat-main){ padding-left: 10px; padding-right: 10px; }
  .x2-stat-ico{ width: 30px; height: 30px; }
  .x2-date{ min-width: 118px; }
  .x2-speed button{ min-width: 42px; }
  .x2-tab{ min-width: 172px; }
  .x2-tabs-end .x2-save-dot{ display: none; }
  .x2-tile{ padding-left: 10px; padding-right: 10px; column-gap: 9px; }
  .x2-tile > .x2-badge{ width: 34px; height: 34px; font-size: 1.1rem; border-radius: 11px; }
  .x2-stepper{ grid-template-columns: 40px minmax(62px, auto) 40px; }
  .x2-stepper button{ width: 40px; }
  .x2-param{ column-gap: 10px; padding-left: 14px; padding-right: 10px; }
  .x2-param-label, .x2-statrow-label{ font-size: .94rem; }
  .x2-starrow{ column-gap: 10px; padding-left: 12px; padding-right: 14px; grid-template-columns: minmax(0, 1fr) auto auto minmax(92px, auto); }
  .x2-row-ico{ display: none; }
  .x2-star{ width: 40px; }
  .x2-halfstep button{ width: 36px; }
  .x2-statrow, .x2-comment{ padding-left: 14px; padding-right: 14px; }
  .x2-screen-body{ grid-template-columns: 208px minmax(0, 1fr); }
  .x2-pane{ padding: 16px 18px 22px 16px; }
  .x2-pane-cols{ gap: 16px; }
  .x2-sheet-body{ padding-left: 20px; padding-right: 20px; }
  .x2-sheet-head{ padding-left: 20px; padding-right: 20px; }
  .x2-fiche{ padding: 26px 24px 18px; column-gap: 18px; }
}

/* Faible hauteur : tablette dans Safari (barres du navigateur), iPad mini, 1024 x 768 */
@media (max-height: 780px) and (min-width: 900px){
  .x2-hud{ padding-top: 8px; padding-bottom: 9px; }
  .x2-tab{ height: 50px; }
  .x2-tab[aria-selected="true"]{ height: 55px; }
  .x2-sheet-head{ padding-top: 13px; padding-bottom: 10px; align-items: center; }
  .x2-sheet-head > div:first-child{ display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 16px; }
  .x2-h1{ font-size: 1.6rem; }
  .x2-lead{ margin-top: 0; }
  .x2-total{ display: flex; align-items: baseline; gap: 12px; }
  .x2-total b{ font-size: 1.3rem; }
  .x2-grid{ gap: 10px; --row-min: 90px; }
  .x2-tile{ padding: 9px 12px 8px; row-gap: 6px; }
  .x2-badge{ width: 38px; height: 38px; font-size: 1.2rem; border-radius: 12px; }
  .x2-badge-lg{ width: 48px; height: 48px; font-size: 1.5rem; border-radius: 15px; }
  .x2-tile-foot{ padding-top: 5px; }
  .x2-screen-head{ padding-top: 10px; padding-bottom: 10px; }
  .x2-screen-title .x2-h1{ font-size: 1.5rem; }
  .x2-sub{ min-height: 60px; }
  .x2-pane{ padding-top: 14px; }
  .x2-param{ min-height: 50px; }
  .x2-stepper{ height: 42px; }
  .x2-stepper button{ height: 42px; }
  .x2-statrow{ min-height: 48px; }
  .x2-comment{ min-height: 48px; }
  .x2-starrow{ min-height: 60px; }
  .x2-picker{ padding-top: 12px; padding-bottom: 14px; gap: 12px; }
  .x2-fiche{ padding-top: 24px; row-gap: 10px; }
  .x2-fact{ padding-top: 12px; padding-bottom: 12px; }
  .x2-flag-lg{ width: 76px; height: 57px; }
}

/* Tablette en portrait */
@media (max-width: 899px){
  .x2-hud{ grid-template-columns: 1fr auto; grid-template-areas: "left right" "mid mid"; row-gap: 10px; }
  .x2-hud-left{ grid-area: left; }
  .x2-hud-right{ grid-area: right; }
  .x2-hud-mid{ grid-area: mid; justify-content: center; }
  .x2-id-name{ display: inline; }
  .x2-hud-mid .x2-stat{ flex: 1; justify-content: center; }
  .x2-tabs{ padding-left: 12px; }
  .x2-tab{ min-width: 0; flex: 1; }
  .x2-tabs-end{ display: none; }
  .x2-grid{
    --row-min: 124px; --row-max: 188px;
    grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(var(--rows4), minmax(var(--row-min), 1fr));
    min-height: calc(var(--rows4) * var(--row-min) + (var(--rows4) - 1) * 12px);
    max-height: calc(var(--rows4) * var(--row-max) + (var(--rows4) - 1) * 12px);
  }
  .x2-tile{ grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "badge" "name" "foot"; align-items: start; row-gap: 8px; padding: 13px 13px 11px; }
  .x2-tile > .x2-badge{ width: 42px; height: 42px; font-size: 1.32rem; border-radius: 13px; }
  .x2-tile-name{ align-self: end; }
  .x2-tile-name.is-long{ font-size: .98rem; letter-spacing: -.005em; }
  .x2-screen-body{ grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .x2-subs{ flex-direction: row; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--x2-rule); overflow-x: auto; }
  .x2-sub{ flex: 1; min-width: 190px; min-height: 60px; }
  .x2-pane-cols{ grid-template-columns: 1fr; }
  .x2-picker-main{ grid-template-columns: 1fr; grid-template-rows: minmax(0, 38%) minmax(0, 1fr); }
  .x2-fiche{ grid-template-columns: 1fr 34%; overflow-y: auto; }
}

/* Telephone : jouable, mais ce n'est pas la cible */
@media (max-width: 699px){
  .x2-small.is-shown{ display: flex; }
  .x2-hud-mid{ flex-wrap: wrap; }
  .x2-stat-ico{ display: none; }
  .x2-date{ min-width: 0; }
  .x2-speed button{ min-width: 38px; height: 40px; }
  .x2-tab{ padding: 0 10px; gap: 8px; height: 50px; }
  .x2-tab[aria-selected="true"]{ height: 54px; }
  .x2-tab-ico{ display: none; }
  .x2-tab-txt small{ display: none; }
  .x2-work{ padding: 0 8px 8px; }
  .x2-sheet-head{ flex-wrap: wrap; padding: 14px 16px 8px; }
  .x2-sheet-body{ padding: 4px 12px 16px; }
  .x2-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: minmax(96px, auto); gap: 8px; height: auto; min-height: 0; max-height: none; }
  .x2-tile{ grid-template-columns: auto minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "badge name" "foot foot"; align-items: center; padding: 10px 11px 8px; }
  .x2-tile > .x2-badge{ width: 36px; height: 36px; font-size: 1.15rem; }
  .x2-tile-name{ align-self: center; }
  .x2-screen-head{ flex-wrap: wrap; padding: 12px; }
  .x2-screen-head .x2-total{ display: none; }
  .x2-pane{ padding: 12px; }
  .x2-starrow{ grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; padding: 10px 12px; }
  .x2-starrow-label{ grid-column: 1 / -1; }
  .x2-halfstep{ display: none; }
  .x2-order{ grid-template-columns: 1fr; }
  .x2-pane-pair{ grid-template-columns: 1fr; }
  .x2-order-art{ display: none; }
  .x2-rowval{ justify-self: start; }
  .x2-star{ width: 40px; height: 44px; }
  .x2-param{ grid-template-columns: minmax(0, 1fr) auto; padding-left: 12px; }
  .x2-param-ico{ display: none; }
  .x2-picker{ padding: 12px; }
  .x2-picker-lead{ display: none; }
  .x2-fiche{ grid-template-columns: 1fr; grid-template-areas: "head" "facts" "cta" "src"; padding: 22px 16px 14px; }
  .x2-fiche-map{ display: none; }
  .x2-fiche-cta .x2-btn{ min-width: 0; width: 100%; }
  .x2-brand-name{ font-size: 1.6rem; }
}

/* Grande tablette (iPad 12,9 pouces) : tuiles hautes, icone au-dessus du nom */
@media (min-height: 920px) and (min-width: 900px){
  .x2-grid{ --row-min: 150px; --row-max: 196px; }
  .x2-tile{ grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "badge" "name" "foot"; align-items: start; row-gap: 10px; padding: 14px 15px 12px; }
  .x2-tile > .x2-badge{ width: 50px; height: 50px; border-radius: 15px; font-size: 1.55rem; }
  .x2-tile-name{ align-self: end; font-size: 1.08rem; }
  .x2-tile-foot{ padding-top: 9px; }
  .x2-tile-foot b{ font-size: 1.08rem; }
}

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{ animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------------------------------------------------------------- Militaire (28/11) */
/* Rubriques groupees par partie (Ministere de la Defense, Equipement, Statistiques des armees). */
.x2-subs-group{ margin: 8px 6px 0; font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--x2-ink-3); }
.x2-subs-group:first-child{ margin-top: 0; }
.x2-subs.has-groups{ gap: 6px; }
.x2-subs.has-groups .x2-sub{ flex-shrink: 0; min-height: 54px; padding: 7px 10px; }
/* Grades des forces */
.x2-graderow{ display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto minmax(108px, auto); align-items: center; column-gap: 14px; min-height: 68px; padding: 8px 18px 8px 14px; }
.x2-graderow + .x2-graderow{ border-top: 1px solid var(--x2-rule); }
.x2-grade{ display: inline-flex; align-items: center; gap: 10px; }
.x2-grade > b{ min-width: 1.2em; font-size: 1.3rem; text-align: center; }
.x2-pips{ display: inline-flex; gap: 4px; }
.x2-pips i{ width: 11px; height: 22px; border-radius: 3px; background: var(--x2-paper-3); box-shadow: inset 0 0 0 1px var(--x2-rule-2); transform: skewX(-12deg); }
.x2-pips i.is-on{ background: var(--x2-gold); box-shadow: none; }
/* Attaque / defense sur les cartes d'armement */
.x2-buy-facts > div.x2-buy-ad{ justify-content: flex-start; gap: 6px; }
.x2-buy-ad dd{ margin-right: auto; padding-right: 8px; }
.x2-buy-ad dd:last-child{ margin-right: 0; padding-right: 0; }
/* Decisions */
.x2-act-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.x2-act{ display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px 16px; border-radius: 16px; background: var(--x2-card); box-shadow: inset 0 0 0 1px var(--x2-rule), var(--x2-shadow-card); }
.x2-act.is-on{ box-shadow: inset 0 0 0 2px var(--x2-good), var(--x2-shadow-card); }
.x2-act header{ display: flex; align-items: center; gap: 10px; }
.x2-act h3{ font-size: 1.02rem; font-weight: 600; line-height: 1.2; }
.x2-act-body{ flex: 1; display: grid; gap: 6px; align-content: start; }
.x2-act-line{ font-size: .88rem; line-height: 1.35; color: var(--x2-ink-2); }
.x2-act-hint{ display: flex; align-items: center; gap: .4em; font-size: .8rem; line-height: 1.3; color: var(--x2-ink-3); }
.x2-act-hint .x2-ico{ flex: none; }
.x2-act-state{ display: flex; align-items: center; gap: .4em; font-weight: 600; font-size: .9rem; }
.x2-act-state.is-on{ color: var(--x2-good); }
.x2-act footer .x2-btn{ width: 100%; }
.x2-pact-list{ display: grid; gap: 4px; max-height: 132px; overflow-y: auto; }
.x2-pact-list li{ display: flex; align-items: center; gap: 8px; font-size: .86rem; min-width: 0; }
.x2-pact-list small{ margin-left: auto; white-space: nowrap; color: var(--x2-ink-3); }
.x2-pact-list .x2-flag, .x2-choose-row .x2-flag{ width: 28px; height: 20px; border-radius: 4px; font-size: 8px; flex: none; }
/* Choix d'un pays, operation */
.x2-modal-card.is-choose{ width: min(560px, 100%); }
.x2-choose-search{ display: flex; align-items: center; gap: 8px; height: 46px; margin: 14px 0 10px; padding: 0 14px; border-radius: 12px; background: var(--x2-card); box-shadow: inset 0 0 0 1.5px var(--x2-rule-2); }
.x2-choose-search input{ flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; color: var(--x2-ink); outline: none; user-select: text; -webkit-user-select: text; }
.x2-choose-list{ display: grid; max-height: min(52vh, 460px); overflow-y: auto; }
.x2-choose-row{ display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 6px 10px; border-radius: 10px; text-align: left; }
.x2-choose-row:active, .x2-choose-row:hover{ background: var(--x2-paper-2); }
.x2-choose-row small{ margin-left: auto; font-size: .76rem; color: var(--x2-ink-3); }
.x2-modal-card.is-op{ width: min(680px, 100%); }
.x2-op-head{ display: flex; align-items: center; gap: 14px; padding: 14px 0 10px; }
.x2-op-head h3{ font-family: var(--x2-font-display); font-size: 1.3rem; }
.x2-op-head p{ font-size: .9rem; color: var(--x2-ink-2); }
.x2-troops{ display: grid; max-height: 40vh; overflow-y: auto; border-top: 1px solid var(--x2-rule); margin-bottom: 10px; }
.x2-troop{ display: grid; grid-template-columns: minmax(0, 1fr) auto 84px; align-items: center; gap: 12px; padding: 8px 2px; border-bottom: 1px solid var(--x2-rule); }
.x2-troop small{ display: block; font-size: .76rem; color: var(--x2-ink-3); }
.x2-troop > b{ text-align: right; }
.x2-troop .x2-halfstep{ display: inline-flex; }
.x2-troop .x2-halfstep button{ width: auto; min-width: 44px; padding: 0 10px; font-weight: 600; }
@media (max-width: 899px){
  .x2-subs-group{ display: none; }
  .x2-subs.has-groups .x2-sub{ min-width: 170px; }
}
@media (max-width: 1100px){
  .x2-graderow{ column-gap: 10px; padding-left: 12px; padding-right: 12px; }
}

/* ---------------------------------------------------------------- Education, operations (28/11) */
.x2-toggle{ display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; column-gap: 14px; min-height: 68px; padding: 8px 18px 8px 14px; cursor: pointer; }
.x2-toggle .x2-rowval b.is-pos{ color: var(--x2-good); }
.x2-switch{ appearance: none; -webkit-appearance: none; position: relative; width: 52px; height: 30px; margin: 0; border-radius: 999px; background: var(--x2-paper-3); box-shadow: inset 0 0 0 1.5px var(--x2-rule-2); cursor: pointer; transition: background .15s ease; }
.x2-switch::after{ content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(23,32,48,.3); transition: transform .15s ease; }
.x2-switch:checked{ background: var(--x2-hue); box-shadow: none; }
.x2-switch:checked::after{ transform: translateX(22px); }
.x2-switch:focus-visible{ outline: 2px solid var(--x2-ink); outline-offset: 2px; }
.x2-intel{ margin: 4px 0 12px; padding: 12px 14px; border-radius: 14px; background: var(--x2-paper-2); box-shadow: inset 0 0 0 1px var(--x2-rule); }
.x2-intel h4{ display: flex; align-items: center; gap: .4em; margin-bottom: 6px; font-size: .92rem; font-weight: 700; }
.x2-intel-eq{ display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 2px 18px; margin-top: 6px; font-size: .84rem; }
.x2-intel-eq li{ display: flex; justify-content: space-between; gap: 8px; }
.x2-op-chance{ color: var(--x2-hue-deep); }

/* Article qui agit ailleurs (ecole militaire → score militaire) */
.x2-buy-hint{ display: flex; align-items: center; gap: .35em; margin-top: -4px; font-size: .78rem; font-weight: 600; color: var(--x2-hue-deep); }
/* Armee variee (02/12) : part d'un materiel qui ne compte pas, et rappel de la regle au-dessus du catalogue. */
.x2-buy-idle{ display: flex; align-items: flex-start; gap: .4em; margin: 6px 0 0; font-size: .78rem; font-weight: 600; line-height: 1.3; color: var(--x2-bad); }
.x2-buy-idle[hidden]{ display: none; }
.x2-buy-idle .x2-ico{ flex: none; width: 1.1em; height: 1.1em; margin-top: .08em; }
.x2-shop-rule{ margin: 0 0 10px; }
.x2-buy-hint .x2-ico{ width: 1.1em; height: 1.1em; flex: none; }

/* Evolution d'un classement depuis le debut de la partie : fleche et nombre de places */
.x2-rank-delta{ display: inline-flex; align-items: center; gap: .15em; padding: 2px 8px 2px 5px; border-radius: 999px; font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; white-space: nowrap; vertical-align: middle; }
.x2-rank-delta .x2-ico{ width: 1.05em; height: 1.05em; stroke-width: 2.4; }
.x2-rank-delta.is-up{ color: var(--x2-good); background: color-mix(in srgb, var(--x2-good) 14%, transparent); }
.x2-rank-delta.is-down{ color: var(--x2-bad); background: color-mix(in srgb, var(--x2-bad) 14%, transparent); }
.x2-rank-delta.is-flat{ padding: 2px 9px; color: var(--x2-ink-3); background: var(--x2-paper-2); }
.x2-kpi-delta{ align-self: center; margin-left: 4px; }
.x2-rank-evo{ justify-self: end; }
.x2-rank-head .x2-rank-delta{ margin: 0 6px; }

/* ---------------------------------------------------------------- Emploi (29/11) : indicateur et choix */
.x2-indicator, .x2-choice{ display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; column-gap: 14px; min-height: 68px; padding: 8px 18px 8px 14px; }
.x2-choice{ grid-template-columns: auto minmax(0, 1fr) auto; }
.x2-ind-val b{ font-size: 1.5rem; }
.x2-ind-val b.is-up{ color: var(--x2-good); }
.x2-ind-val b.is-down{ color: var(--x2-bad); }
.x2-choice-opts .x2-seg{ min-width: 64px; justify-content: center; }
@media (max-width: 899px){
  .x2-choice{ grid-template-columns: auto minmax(0, 1fr); row-gap: 8px; }
  .x2-choice-opts{ grid-column: 1 / -1; justify-self: start; }
}

/* ---------------------------------------------------------------- Revenus alternatifs (lot « petits », 30/11) : tarif, recette et clients */
.x2-alt-row .x2-param-paid small{ display: flex; flex-wrap: wrap; align-items: center; column-gap: .9em; row-gap: 2px; }
.x2-alt-clients{ display: inline-flex; align-items: center; gap: .3em; white-space: nowrap; }
.x2-alt-clients .x2-ico{ width: 1.1em; height: 1.1em; flex: none; }

/* ---------------------------------------------------------------- Boutique de la barre du haut (lot « boutique », 01/12) :
   offres gratuites (demonstration), compte a rebours entre deux achats, bons a utiliser, point et pastille du bouton */
.x2-shopbtn .x2-soon-dot{ opacity: 0; transform: scale(.3); transition: opacity .2s ease, transform .2s ease; }
.x2-shopbtn.is-ready .x2-soon-dot{ opacity: 1; transform: none; }
.x2-shop-badge{ position: absolute; right: -4px; bottom: -4px; min-width: 20px; height: 20px; padding: 0 5px; display: none; place-items: center; border-radius: 999px; background: var(--x2-gold); color: var(--x2-ink); font-size: .72rem; font-weight: 700; line-height: 1; box-shadow: 0 0 0 2px var(--x2-desk-2); }
.x2-shopbtn.has-perks .x2-shop-badge{ display: grid; }
.x2-modal-card.is-shop{ width: min(880px, 100%); }
.x2-shop-demo{ display: flex; align-items: center; flex-wrap: wrap; gap: .4em .7em; margin: 14px 0 4px; padding: 10px 14px; border-radius: 12px; background: var(--x2-card); box-shadow: inset 0 0 0 1.5px var(--x2-gold); font-size: .94rem; font-weight: 500; }
.x2-shop-demo > .x2-ico{ flex: none; font-size: 1.2rem; color: var(--x2-star); }
.x2-shop-demo > span{ flex: 1 1 280px; min-width: 0; }
.x2-shop-demo > b{ flex: none; margin-left: auto; padding: 5px 12px; border-radius: 999px; background: var(--x2-paper-2); color: var(--x2-ink-2); font-size: .86rem; font-weight: 600; white-space: nowrap; }
.x2-shop-demo > b.is-ready{ background: var(--x2-good); color: #fff; }
.x2-shop-h{ padding: 0; margin: 16px 2px 8px; }
.x2-shop-receipt{ margin-top: 12px; padding: 12px 16px 14px; border-radius: 14px; background: var(--x2-card); box-shadow: inset 0 0 0 2px var(--x2-good), var(--x2-shadow-card); }
.x2-shop-receipt h3{ display: flex; align-items: center; gap: .45em; font-size: 1rem; font-weight: 600; }
.x2-shop-receipt h3 .x2-ico{ flex: none; color: var(--x2-good); }
.x2-shop-receipt ul{ margin-top: 6px; display: grid; gap: 4px; font-size: .9rem; line-height: 1.3; color: var(--x2-ink-2); }
.x2-shop-receipt li{ display: flex; align-items: flex-start; gap: .5em; }
.x2-shop-receipt li .x2-ico{ flex: none; margin-top: .12em; color: var(--x2-good); }
.x2-shop-win .x2-offers{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.x2-shop-win .x2-offers.is-micro{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.x2-shop-win .x2-offer{ display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px 14px; }
.x2-shop-win .x2-offer header{ display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.x2-shop-win .x2-offer .x2-badge{ background: var(--x2-paper-2); color: var(--x2-ink); }
.x2-shop-win .x2-offer h3{ display: flex; flex-wrap: wrap; align-items: baseline; gap: .2em .5em; min-width: 0; font-size: 1rem; font-weight: 600; line-height: 1.2; }
.x2-offer-price{ display: grid; justify-items: end; gap: 1px; line-height: 1.15; white-space: nowrap; }
.x2-offer-price s{ font-size: .82rem; color: var(--x2-ink-3); }
.x2-offer-price b{ font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--x2-good); }
.x2-shop-win .x2-offer ul{ flex: 1; margin: 0; display: grid; align-content: start; gap: 5px; font-size: .86rem; line-height: 1.3; color: var(--x2-ink-2); }
.x2-shop-win .x2-offer li{ display: flex; align-items: flex-start; gap: .5em; }
.x2-shop-win .x2-offer li .x2-ico{ flex: none; margin-top: .12em; color: var(--x2-ink-3); }
.x2-shop-win .x2-offer li.is-off{ color: var(--x2-ink-3); }
.x2-shop-win .x2-offer li small{ display: block; font-size: .76rem; }
.x2-offer-go{ width: 100%; font-variant-numeric: tabular-nums; }
.x2-offer-go .x2-ico{ flex: none; }
.x2-shop-perks .x2-statrow, .x2-shop-active .x2-statrow, .x2-shop-picks .x2-statrow{ grid-template-columns: auto minmax(0, 1fr) auto; }
.x2-shop-perks .x2-btn, .x2-shop-pick .x2-btn{ min-width: 124px; }
.x2-shop-pickhead{ display: flex; align-items: center; gap: 14px; margin: 14px 0 10px; }
.x2-shop-picktitle{ min-width: 0; }
.x2-shop-picktitle h3{ font-family: var(--x2-font-display); font-size: 1.22rem; font-weight: 600; line-height: 1.2; }
.x2-shop-picktitle p{ font-size: .88rem; color: var(--x2-ink-2); }
.x2-shop-picktitle p b{ color: var(--x2-ink); font-weight: 600; }
.x2-shop-picks .x2-flag{ width: 32px; height: 23px; border-radius: 4px; font-size: 8px; flex: none; }
.x2-shop-picks > .x2-act-hint{ padding: 16px 18px; font-size: .9rem; }
.x2-shop-group{ padding: 13px 18px 3px; font-size: .7rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--x2-ink-3); }
.x2-statrow + .x2-shop-group{ border-top: 1px solid var(--x2-rule); }
.x2-shop-count{ display: flex; align-items: center; gap: .45em; margin: 12px 2px 10px; font-size: .92rem; color: var(--x2-ink-2); }
.x2-shop-count .x2-ico{ flex: none; }
.x2-shop-count b{ color: var(--x2-ink); font-weight: 600; }
@media (max-width: 899px){
  .x2-shop-win .x2-offers.is-micro{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 619px){
  .x2-shop-win .x2-offers, .x2-shop-win .x2-offers.is-micro{ grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- Bataille (02/12) */
/* Animation plein ecran apres « Lancer l'attaque » : quatre plans (data-step 1 a 4) montes comme une video.
   Accroche : les deux drapeaux et « VS » ; montee : les troupes envoyees ; choc : force contre defense ; verdict. */
.x2-battle{
  --bt-me: #e6b450; --bt-foe: #e2553f; --bt-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  position: fixed; inset: 0; z-index: 70; overflow: hidden; background: #05080f; color: #fff; cursor: pointer;      /* au-dessus des messages (60) : rien ne passe devant le montage */
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
.x2-battle:focus{ outline: none; }
.x2-battle[data-step="4"]{ cursor: default; }
.x2-battle .x2-flag{ background: #1a2233; color: rgba(255,255,255,.7); }
.x2-bt-scene{ position: absolute; inset: 0; z-index: 2; visibility: hidden; }
.x2-battle[data-step="1"] .x2-bt-vs, .x2-battle[data-step="2"] .x2-bt-cuts, .x2-battle[data-step="3"] .x2-bt-clash, .x2-battle[data-step="4"] .x2-bt-end{ visibility: visible; }
/* Verdict prepare a l'avance (02/12, « micro freeze a l'affichage du resultat ») : pendant le montage, le plan du verdict est deja
   dessine, invisible (opacity 0 ; will-change oblige le navigateur a le peindre quand meme). Au verdict il n'y a plus qu'a le montrer :
   avant, tout son contenu (grand texte a halo, rayons, drapeaux) etait peint d'un coup a cet instant. */
.x2-battle:not(.is-still) .x2-bt-end{ visibility: visible; opacity: 0; pointer-events: none; will-change: opacity; }
.x2-battle:not(.is-still)[data-step="4"] .x2-bt-end{ opacity: 1; pointer-events: auto; }
.x2-bt-fx{ position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; }
/* bandes de cinema : presentes pendant le montage, elles s'ouvrent au verdict */
.x2-bt-bars::before, .x2-bt-bars::after{ content: ""; position: absolute; left: 0; right: 0; z-index: 4; height: 7vh; background: #000; pointer-events: none; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.x2-bt-bars::before{ top: 0; }
.x2-bt-bars::after{ bottom: 0; }
.x2-battle[data-step="4"] .x2-bt-bars::before{ transform: translateY(-101%); }
.x2-battle[data-step="4"] .x2-bt-bars::after{ transform: translateY(101%); }
/* eclair blanc a chaque changement de plan (un nom d'animation par plan : sinon elle ne repart pas) */
.x2-bt-flash{ position: absolute; inset: 0; z-index: 5; background: #fff; opacity: 0; pointer-events: none; will-change: opacity; }
.x2-battle[data-step="2"] .x2-bt-flash{ animation: x2-bt-flash-a .22s ease-out both; }
.x2-battle[data-step="3"] .x2-bt-flash{ animation: x2-bt-flash-b .26s ease-out both; }
.x2-battle[data-step="4"] .x2-bt-flash{ animation: x2-bt-flash-c .6s ease-out both; }
@keyframes x2-bt-flash-a{ from{ opacity: .55; } to{ opacity: 0; } }
@keyframes x2-bt-flash-b{ from{ opacity: .7; } to{ opacity: 0; } }
@keyframes x2-bt-flash-c{ from{ opacity: 1; } to{ opacity: 0; } }
.x2-bt-sound{ position: absolute; left: 16px; top: calc(7vh + 12px); z-index: 6; display: inline-flex; align-items: center; gap: .45em; min-height: 40px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.1); color: rgba(255,255,255,.85); font-size: .82rem; font-weight: 600; }
.x2-bt-sound .x2-ico{ width: 1.25em; height: 1.25em; }
.x2-battle[data-step="4"] .x2-bt-sound{ top: 14px; }
.x2-battle.is-still .x2-bt-sound{ display: none; }      /* verdict seul : aucun son, donc pas de bouton */
.x2-bt-hint{ position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; height: 7vh; display: grid; place-items: center; font-size: .74rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.5); pointer-events: none; }
.x2-battle[data-step="4"] .x2-bt-hint{ display: none; }

/* 1. accroche : les deux camps coupent l'ecran en biais */
.x2-battle[data-step="1"] .x2-bt-vs{ animation: x2-bt-jolt .3s .62s linear both; }
.x2-bt-side{ position: absolute; inset: 0; display: grid; place-items: center; }
.x2-bt-side.is-me{ clip-path: polygon(0 0, 57% 0, 43% 100%, 0 100%); padding-right: 52%; }
.x2-bt-side.is-foe{ clip-path: polygon(57% 0, 100% 0, 100% 100%, 43% 100%); padding-left: 52%; }
.x2-battle[data-step="1"] .x2-bt-side.is-me{ animation: x2-bt-in-l .42s cubic-bezier(.16,1,.3,1) both; }
.x2-battle[data-step="1"] .x2-bt-side.is-foe{ animation: x2-bt-in-r .42s .1s cubic-bezier(.16,1,.3,1) both; }
@keyframes x2-bt-in-l{ from{ transform: translateX(-70%); opacity: 0; } to{ transform: none; opacity: 1; } }
@keyframes x2-bt-in-r{ from{ transform: translateX(70%); opacity: 0; } to{ transform: none; opacity: 1; } }
.x2-bt-back{ position: absolute; inset: -6%; }
.x2-battle[data-step="1"] .x2-bt-back{ animation: x2-bt-ken 1.6s linear both; }
@keyframes x2-bt-ken{ from{ transform: scale(1.16); } to{ transform: scale(1); } }
.x2-bt-back .x2-flag{ position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; box-shadow: none; font-size: 0; }
.x2-bt-back::after{ content: ""; position: absolute; inset: 0; }
.x2-bt-side.is-me .x2-bt-back::after{ background: linear-gradient(100deg, rgba(5,8,15,.9) 0%, rgba(5,8,15,.62) 55%, rgba(230,180,80,.35) 100%); }
.x2-bt-side.is-foe .x2-bt-back::after{ background: linear-gradient(280deg, rgba(5,8,15,.9) 0%, rgba(5,8,15,.62) 55%, rgba(226,85,63,.38) 100%); }
.x2-bt-who{ position: relative; display: grid; justify-items: center; gap: 10px; max-width: 40vw; text-align: center; }
.x2-bt-who .x2-flag{ width: clamp(110px, 24vmin, 230px); height: clamp(82px, 18vmin, 172px); border-radius: 14px; box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 26px 60px -18px #000; }
.x2-bt-who small{ margin-top: 8px; font: 700 clamp(.66rem, 1.6vmin, .9rem)/1 var(--bt-font); letter-spacing: .28em; text-transform: uppercase; }
.x2-bt-side.is-me .x2-bt-who small{ color: var(--bt-me); }
.x2-bt-side.is-foe .x2-bt-who small{ color: var(--bt-foe); }
.x2-bt-who b{ font: italic 900 clamp(1.4rem, 5.4vmin, 3.4rem)/.96 var(--bt-font); letter-spacing: -.02em; text-transform: uppercase; text-wrap: balance; overflow-wrap: break-word; text-shadow: 0 4px 22px rgba(0,0,0,.8); }
.x2-bt-who em{ font-style: normal; font-size: .8rem; color: rgba(255,255,255,.7); }
.x2-bt-seam{ position: absolute; inset: 0; filter: drop-shadow(0 0 14px rgba(255,255,255,.9)); pointer-events: none; }
.x2-bt-seam i{ position: absolute; inset: 0; background: #fff; clip-path: polygon(56.7% 0, 57.3% 0, 43.3% 100%, 42.7% 100%); }
.x2-battle[data-step="1"] .x2-bt-seam{ animation: x2-fade .2s .5s both; }
.x2-bt-vsmark{ position: absolute; left: 50%; top: 50%; font: italic 900 clamp(4rem, 19vmin, 11rem)/1 var(--bt-font); letter-spacing: -.06em; transform: translate(-54%, -52%); text-shadow: -.05em 0 var(--bt-me), .05em 0 var(--bt-foe), 0 10px 40px #000; }
.x2-battle[data-step="1"] .x2-bt-vsmark{ animation: x2-bt-vs .34s .5s cubic-bezier(.2,1.5,.35,1) both; }
@keyframes x2-bt-vs{ from{ transform: translate(-54%, -52%) scale(4.2); opacity: 0; } to{ transform: translate(-54%, -52%) scale(1); opacity: 1; } }
@keyframes x2-bt-jolt{ 0%{ transform: translate(0, 0); } 20%{ transform: translate(-9px, 6px); } 40%{ transform: translate(8px, -6px); } 60%{ transform: translate(-5px, -3px); } 80%{ transform: translate(4px, 3px); } 100%{ transform: none; } }

/* 2. montee : un plan par materiel envoye, de plus en plus court */
.x2-bt-cuts{ background: radial-gradient(120% 90% at 50% 46%, #17223a 0%, #05080f 72%); }
.x2-bt-cut{ position: absolute; inset: 11vh 6vw 20vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 5vw; opacity: 0; }
.x2-bt-cut.is-flip{ grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.x2-bt-cut.is-flip .x2-bt-cut-txt{ order: 2; text-align: right; justify-items: end; }
.x2-battle[data-step="2"] .x2-bt-cut{ animation: x2-bt-cut var(--t) var(--d) linear both; }
@keyframes x2-bt-cut{ 0%{ opacity: 0; transform: scale(1.13); } 5%{ opacity: 1; } 24%{ transform: scale(1.03); } 93%{ opacity: 1; transform: scale(1); } 100%{ opacity: 0; transform: scale(.97); } }
.x2-bt-cut-txt{ display: grid; gap: 6px; min-width: 0; }
.x2-bt-cut-txt b{ font: italic 900 clamp(3rem, 15vmin, 9.5rem)/.9 var(--bt-font); letter-spacing: -.04em; color: var(--bt-me); text-shadow: 0 8px 40px rgba(230,180,80,.35); white-space: nowrap; }
.x2-bt-cut-txt span{ font: 800 clamp(.95rem, 3.2vmin, 1.9rem)/1.05 var(--bt-font); letter-spacing: .12em; text-transform: uppercase; text-wrap: balance; }
.x2-bt-cut-card{ position: relative; aspect-ratio: 200 / 132; max-height: 56vh; justify-self: center; width: 100%; border-radius: 22px; background: var(--x2-paper); transform: skewX(-6deg); box-shadow: 0 0 0 4px var(--bt-me), 14px 14px 0 rgba(230,180,80,.25), 0 40px 90px -30px #000; }
.x2-bt-cut-card .x2-art{ position: absolute; inset: 9%; transform: skewX(6deg); }
@supports not (aspect-ratio: 1){ .x2-bt-cut-card{ height: 44vh; } }      /* tablettes anciennes */
.x2-bt-cut-card::after{ content: ""; position: absolute; inset: 0; border-radius: inherit; background: #fff; opacity: 0; }
.x2-battle[data-step="2"] .x2-bt-cut-card::after{ animation: x2-bt-pop var(--t) var(--d) ease-out both; }
@keyframes x2-bt-pop{ 0%{ opacity: .9; } 30%, 100%{ opacity: 0; } }
.x2-bt-hud{ position: absolute; left: 6vw; right: 6vw; bottom: 9.5vh; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.x2-bt-hud small{ font: 700 .8rem/1 var(--bt-font); letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.72); }
.x2-bt-hud b{ margin-left: auto; font: italic 900 clamp(1.5rem, 4.6vmin, 2.6rem)/1 var(--bt-font); color: var(--bt-me); }
.x2-bt-hud-line{ flex: 0 0 100%; height: 5px; margin-top: 6px; border-radius: 3px; background: rgba(255,255,255,.14); overflow: hidden; }
.x2-bt-hud-line i{ display: block; height: 100%; background: var(--bt-me); transform-origin: 0 50%; transform: scaleX(0); }
.x2-battle[data-step="2"] .x2-bt-hud-line i{ animation: x2-bt-fill var(--len) linear both; }
@keyframes x2-bt-fill{ from{ transform: scaleX(0); } to{ transform: scaleX(1); } }

/* 3. choc : force contre defense, la jauge s'arrete sur la chance de victoire */
.x2-bt-clash{ display: grid; place-items: center; background: radial-gradient(90% 70% at 50% 50%, #2a1a1a 0%, #05080f 75%); }
.x2-battle[data-step="3"] .x2-bt-clash{ animation: x2-bt-shake .11s linear infinite; }
@keyframes x2-bt-shake{ 0%{ transform: translate(2px, -2px); } 25%{ transform: translate(-3px, 2px); } 50%{ transform: translate(3px, 3px); } 75%{ transform: translate(-2px, -3px); } 100%{ transform: translate(2px, -2px); } }
.x2-bt-clash-in{ width: min(1000px, 86vw); display: grid; gap: clamp(18px, 4vmin, 36px); }
.x2-battle[data-step="3"] .x2-bt-clash-in{ animation: x2-bt-push 1.9s cubic-bezier(.5,0,.9,.4) both; }
@keyframes x2-bt-push{ from{ transform: scale(.94); } to{ transform: scale(1.1); } }
.x2-bt-duel-top{ display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 16px; }
.x2-bt-duel-side{ display: flex; align-items: center; gap: 14px; min-width: 0; }
.x2-bt-duel-side.is-foe{ justify-content: flex-end; text-align: right; }
.x2-bt-duel-side .x2-flag{ width: clamp(48px, 9vmin, 84px); height: clamp(48px, 9vmin, 84px); box-shadow: 0 0 0 3px rgba(255,255,255,.85); }
.x2-bt-duel-side span{ display: grid; gap: 4px; min-width: 0; }
.x2-bt-duel-side small, .x2-bt-duel-mid small{ font: 700 .74rem/1 var(--bt-font); letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.x2-bt-duel-side b{ font: italic 900 clamp(1.5rem, 5.6vmin, 3.4rem)/1 var(--bt-font); letter-spacing: -.02em; }
.x2-bt-duel-side.is-me b{ color: var(--bt-me); }
.x2-bt-duel-side.is-foe b{ color: var(--bt-foe); }
.x2-bt-duel-mid{ display: grid; justify-items: center; gap: 6px; }
.x2-bt-duel-mid b{ font: italic 900 clamp(3rem, 13vmin, 8rem)/.9 var(--bt-font); letter-spacing: -.04em; text-shadow: -.04em 0 var(--bt-me), .04em 0 var(--bt-foe); white-space: nowrap; }
.x2-bt-duel{ position: relative; height: clamp(22px, 4.6vmin, 40px); border-radius: 8px; background: var(--bt-foe); transform: skewX(-14deg); overflow: hidden; box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 0 60px rgba(226,85,63,.45); }
.x2-bt-duel i{ position: absolute; left: 0; top: 0; bottom: 0; width: var(--p); background: var(--bt-me); box-shadow: 6px 0 0 #fff, 0 0 40px 10px rgba(255,255,255,.7); }
.x2-battle[data-step="3"] .x2-bt-duel i{ animation: x2-bt-duel 1.25s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes x2-bt-duel{ 0%{ width: 50%; } 25%{ width: 42%; } 50%{ width: 58%; } 100%{ width: var(--p); } }

/* 4. verdict : tampon, drapeau qui se retourne, pertes */
.x2-bt-end{ display: flex; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 18px; background: radial-gradient(90% 70% at 50% 22%, #3a2c10 0%, #0b0f18 62%, #05080f 100%); }
.x2-battle[data-win="0"] .x2-bt-end{ background: radial-gradient(90% 70% at 50% 22%, #3a1512 0%, #0b0f18 62%, #05080f 100%); }
/* Rayons du verdict : la roue tourne seule sur sa couche (will-change), sans masque ; le fondu vers le fond est un voile fixe pose
   par-dessus, aux memes couleurs que le fond (02/12 : le masque sur une couche de 150vmax en rotation pesait sur les tablettes). */
.x2-bt-rays{ position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.x2-bt-rays::before{ content: ""; position: absolute; left: 50%; top: 22%; width: 116vmax; height: 116vmax; margin: -58vmax 0 0 -58vmax; background: repeating-conic-gradient(from 0deg, rgba(230,180,80,.13) 0deg 7deg, transparent 7deg 18deg); will-change: transform; }
.x2-bt-rays::after{ content: ""; position: absolute; inset: 0; background: radial-gradient(90% 70% at 50% 22%, rgba(58,44,16,0) 0%, rgba(46,37,18,.25) 15.5%, rgba(35,30,20,.5) 31%, rgba(23,22,22,.75) 46.5%, #0b0f18 62%, #05080f 100%); }
.x2-battle[data-step="4"] .x2-bt-rays::before{ animation: x2-bt-spin 40s linear infinite; }
.x2-battle[data-win="0"] .x2-bt-rays{ display: none; }
@keyframes x2-bt-spin{ to{ transform: rotate(360deg); } }
.x2-bt-end-in{ position: relative; width: min(760px, 100%); margin: auto; display: grid; justify-items: center; gap: clamp(10px, 2.2vmin, 18px); text-align: center; }
.x2-bt-stamp{ padding: .04em .32em .08em; border: .07em solid currentColor; border-radius: .16em; font: italic 900 clamp(3rem, 13vmin, 7.4rem)/1 var(--bt-font); letter-spacing: -.03em; text-transform: uppercase; color: var(--bt-me); transform: rotate(-5deg); text-shadow: 0 0 28px rgba(230,180,80,.6); will-change: transform, opacity; }
.x2-battle[data-win="0"] .x2-bt-stamp{ color: var(--bt-foe); text-shadow: 0 0 28px rgba(226,85,63,.55); }
.x2-battle[data-step="4"] .x2-bt-stamp{ animation: x2-bt-stamp .32s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes x2-bt-stamp{ from{ transform: rotate(-16deg) scale(2.6); opacity: 0; } to{ transform: rotate(-5deg) scale(1); opacity: 1; } }
.x2-bt-swap{ display: flex; align-items: center; justify-content: center; gap: clamp(12px, 3vmin, 26px); margin-top: 6px; }
.x2-bt-swap .x2-flag{ width: clamp(84px, 16vmin, 132px); height: clamp(63px, 12vmin, 99px); border-radius: 10px; box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 18px 40px -16px #000; }
.x2-bt-arrow{ display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.12); color: var(--bt-me); }
.x2-battle[data-win="0"] .x2-bt-arrow{ color: var(--bt-foe); }
.x2-bt-arrow .x2-ico{ width: 24px; height: 24px; }
.x2-bt-flip{ display: block; perspective: 700px; }
.x2-bt-flip-in{ position: relative; display: block; transform-style: preserve-3d; will-change: transform; }
.x2-bt-flip-in > span{ display: block; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.x2-bt-flip-in > .is-back{ position: absolute; inset: 0; transform: rotateY(180deg); }
.x2-battle[data-win="1"] .x2-bt-flip-in{ transform: rotateY(180deg); }
.x2-battle[data-win="1"][data-step="4"] .x2-bt-flip-in{ animation: x2-bt-flip .7s .75s cubic-bezier(.4,0,.2,1) both; }
@keyframes x2-bt-flip{ from{ transform: rotateY(0deg); } to{ transform: rotateY(180deg); } }
.x2-battle[data-win="0"] .x2-bt-swap > .x2-flag{ filter: grayscale(.8) brightness(.6); }
.x2-bt-line{ font-size: clamp(1rem, 2.6vmin, 1.3rem); color: rgba(255,255,255,.82); }
.x2-bt-line b{ color: #fff; font-weight: 700; }
.x2-bt-facts{ display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 2px 0 0; }
.x2-bt-facts > div{ display: grid; gap: 4px; min-width: 104px; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.x2-bt-facts dt{ font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.x2-bt-facts dd{ margin: 0; font-size: 1.15rem; font-weight: 700; }
.x2-bt-facts .is-good dd{ color: #6fd3a2; }
.x2-bt-facts .is-bad dd{ color: #ff8f7c; }
.x2-bt-losses{ display: grid; justify-items: center; gap: 8px; }
.x2-bt-losses small{ font-size: .66rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.x2-bt-losses ul{ display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.x2-bt-losses li{ display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 6px; border-radius: 999px; background: var(--x2-paper); color: var(--x2-ink); font-size: .86rem; }
.x2-bt-losses li.is-none{ padding: 8px 16px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.8); }
.x2-bt-losses .x2-art{ width: 44px; height: 28px; }
.x2-bt-losses li b{ color: var(--x2-bad); font-weight: 700; }
.x2-bt-go{ margin-top: 6px; min-width: 200px; background: var(--bt-me); color: #1a1405; font-weight: 700; box-shadow: 0 16px 36px -14px rgba(230,180,80,.8); }
.x2-battle[data-step="4"] .x2-bt-swap, .x2-battle[data-step="4"] .x2-bt-line, .x2-battle[data-step="4"] .x2-bt-facts, .x2-battle[data-step="4"] .x2-bt-losses, .x2-battle[data-step="4"] .x2-bt-go{ animation: x2-rise .4s cubic-bezier(.2,.8,.2,1) both; }
.x2-battle[data-step="4"] .x2-bt-swap{ animation-delay: .3s; }
.x2-battle[data-step="4"] .x2-bt-line{ animation-delay: .45s; }
.x2-battle[data-step="4"] .x2-bt-facts{ animation-delay: .6s; }
.x2-battle[data-step="4"] .x2-bt-losses{ animation-delay: .75s; }
.x2-battle[data-step="4"] .x2-bt-go{ animation-delay: .9s; }
/* verdict seul (reglage ou mouvement reduit) : tout est en place tout de suite */
.x2-battle.is-still *, .x2-battle.is-still *::before, .x2-battle.is-still *::after{ animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
.x2-battle.is-still .x2-bt-flash{ display: none; }
@media (max-height: 560px){
  .x2-bt-stamp{ font-size: clamp(2.2rem, 11vmin, 4rem); }
  .x2-bt-swap .x2-flag{ width: 72px; height: 54px; }
  .x2-bt-facts > div{ padding: 7px 12px; }
}

/* 6e demande du 02/12 : part de la production d'armes gardee pour l'export (Revenus › Industrie de l'armement) */
.x2-arms-share{ display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; column-gap: 14px; margin-top: 12px; padding: 10px 18px; border-radius: 16px; background: var(--x2-paper); box-shadow: inset 0 0 0 1px var(--x2-rule); }
.x2-arms-txt{ display: grid; gap: 2px; min-width: 0; }
.x2-arms-txt small{ font-size: .8rem; line-height: 1.3; color: var(--x2-ink-3); }
.x2-arms-share [data-hold]{ touch-action: none; }
/* prix des demi-etoiles qui a bouge depuis le debut de la partie */
.x2-star-price{ margin: -4px 0 10px; }

/* 7e demande du 02/12 : le bouton d'optimisation des exportations, pour tous et bien visible (un vrai bouton plein, dans un encadre) */
.x2-trade-auto{ display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 14px; padding: 14px 18px; border-radius: 18px; background: linear-gradient(135deg, rgba(31,122,83,.12), rgba(31,122,83,.04)); box-shadow: inset 0 0 0 1.5px rgba(31,122,83,.35); }
.x2-trade-auto-txt{ display: grid; gap: 3px; min-width: 0; }
.x2-trade-auto-txt b{ font-size: 1.02rem; }
.x2-trade-auto-txt small{ font-size: .82rem; line-height: 1.35; color: var(--x2-ink-3); }
.x2-trade-auto .x2-btn{ flex: none; min-height: 52px; padding-inline: 22px; font-size: 1rem; box-shadow: 0 6px 16px rgba(27,35,50,.22); }
@media (max-width: 860px){ .x2-trade-auto{ flex-direction: column; align-items: stretch; } }

/* --- bataille : frappe nucleaire (temps 2,5 du montage ; 7e demande du 02/12). Instants en ms depuis l'entree dans le plan :
       0 alerte et compte a rebours · 1190 le missile tombe · 1750 impact (eclair, boule de feu) · 2050 la colonne monte ·
       2150 le chapeau se forme · 4600 fin. Seulement transform et opacity (pas de filtre ni de flou : la tablette). --- */
.x2-battle[data-step="2.5"] .x2-bt-nuke{ visibility: visible; animation: x2-nk-shake .09s linear 1.75s 11; }      /* sans « both » : pas de decalage avant l'impact */
.x2-bt-nuke{ background: #05070c; overflow: hidden; }
/* Attention : un element qui attend son tour (animation-delay) prend sa premiere image des le debut si le remplissage est « both ».
   Tout ce qui ne doit paraitre qu'a l'impact est donc en « forwards » (invisible avant, garde sa derniere image apres). */
.x2-bt-nuke::before{ content: ""; position: absolute; inset: 0; background: radial-gradient(80% 70% at 50% 46%, rgba(226,85,63,.34), rgba(226,85,63,0) 70%); opacity: 0; }
.x2-battle[data-step="2.5"] .x2-bt-nuke::before{ animation: x2-nk-red .34s ease-in-out 5 alternate; }
@keyframes x2-nk-red{ from{ opacity: .25; } to{ opacity: 1; } }
@keyframes x2-nk-shake{ 0%{ transform: translate(6px, -5px); } 25%{ transform: translate(-7px, 4px); } 50%{ transform: translate(6px, 6px); } 75%{ transform: translate(-5px, -6px); } 100%{ transform: translate(0, 0); } }
.x2-battle[data-step="2.5"] .x2-bt-flash{ animation: x2-nk-flash 4.6s linear both; }
@keyframes x2-nk-flash{ 0%, 37.9%{ opacity: 0; } 38.1%, 41%{ opacity: 1; } 53%, 100%{ opacity: 0; } }
.x2-nk-sky{ position: absolute; inset: 0; background: radial-gradient(130% 95% at 50% 78%, #ffe1a6 0%, #ff8a2b 13%, #c2410c 29%, #5a1205 52%, #12060a 80%); opacity: 0; will-change: opacity; }
.x2-battle[data-step="2.5"] .x2-nk-sky{ animation: x2-nk-sky 2.85s 1.75s linear forwards; }
@keyframes x2-nk-sky{ 0%{ opacity: 1; } 40%{ opacity: .92; } 100%{ opacity: .55; } }
.x2-nk-foe{ position: absolute; inset: -4%; opacity: .16; will-change: opacity; }
.x2-nk-foe .x2-flag{ position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; box-shadow: none; font-size: 0; }
.x2-nk-foe::after{ content: ""; position: absolute; inset: 0; background: radial-gradient(90% 80% at 50% 45%, rgba(5,7,12,.2), rgba(5,7,12,.95)); }
.x2-battle[data-step="2.5"] .x2-nk-foe{ animation: x2-nk-foe 4.6s linear both; }
@keyframes x2-nk-foe{ 0%{ opacity: .05; } 8%, 37%{ opacity: .2; } 39%, 100%{ opacity: 0; } }
/* bandes de danger, juste sous les bandes noires du cadre */
.x2-nk-stripes{ position: absolute; left: 0; right: 0; z-index: 2; height: 2.6vh; overflow: hidden; opacity: 0; }
.x2-nk-stripes.is-top{ top: 7vh; }
.x2-nk-stripes.is-bot{ bottom: 7vh; }
.x2-nk-stripes i{ position: absolute; top: 0; bottom: 0; left: -120px; right: -120px; background: repeating-linear-gradient(-45deg, #f2c15c 0 24px, #10131a 24px 48px); will-change: transform; }
.x2-battle[data-step="2.5"] .x2-nk-stripes{ animation: x2-nk-alert-io 1.7s linear both; }
.x2-battle[data-step="2.5"] .x2-nk-stripes i{ animation: x2-nk-slide 1.7s linear both; }
.x2-battle[data-step="2.5"] .x2-nk-stripes.is-bot i{ animation-direction: reverse; }
@keyframes x2-nk-slide{ from{ transform: translateX(0); } to{ transform: translateX(96px); } }
@keyframes x2-nk-alert-io{ 0%{ opacity: 0; } 6%, 90%{ opacity: 1; } 100%{ opacity: 0; } }
/* l'alerte : sigle, titre, cible, compte a rebours */
.x2-nk-alert{ position: absolute; left: 50%; top: 46%; z-index: 2; display: grid; justify-items: center; gap: 1.4vmin; width: min(92vw, 760px); text-align: center; font-family: var(--bt-font); opacity: 0; transform: translate(-50%, -50%); will-change: transform, opacity; }
.x2-battle[data-step="2.5"] .x2-nk-alert{ animation: x2-nk-alert 1.7s cubic-bezier(.2,.9,.3,1) both; }
@keyframes x2-nk-alert{ 0%{ opacity: 0; transform: translate(-50%, -50%) scale(1.5); } 9%{ opacity: 1; transform: translate(-50%, -50%) scale(1); } 14%{ opacity: .45; } 18%{ opacity: 1; } 88%{ opacity: 1; transform: translate(-50%, -50%) scale(1.04); } 100%{ opacity: 0; transform: translate(-50%, -50%) scale(.9); } }
.x2-nk-sign{ width: 17vmin; height: 17vmin; max-width: 150px; max-height: 150px; }
.x2-battle[data-step="2.5"] .x2-nk-sign{ animation: x2-nk-pulse .33s ease-in-out 5 alternate both; }
@keyframes x2-nk-pulse{ from{ transform: scale(1); } to{ transform: scale(1.12); } }
.x2-nk-alert b{ font-size: clamp(2rem, 7.4vmin, 4.4rem); font-weight: 900; line-height: 1; letter-spacing: .09em; text-transform: uppercase; color: #f2c15c; }
.x2-nk-alert small{ font-size: clamp(.95rem, 2.5vmin, 1.4rem); font-weight: 600; letter-spacing: .04em; color: rgba(255,255,255,.86); }
.x2-nk-count{ position: relative; width: 12vmin; height: 12vmin; margin-top: .6vmin; }
.x2-nk-count i{ position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: clamp(2.4rem, 10vmin, 5.6rem); line-height: 1; color: #fff; opacity: 0; font-variant-numeric: tabular-nums; }
.x2-battle[data-step="2.5"] .x2-nk-count i{ animation: x2-nk-tick .33s ease-out both; }
.x2-battle[data-step="2.5"] .x2-nk-count i:nth-child(1){ animation-delay: .26s; }
.x2-battle[data-step="2.5"] .x2-nk-count i:nth-child(2){ animation-delay: .59s; }
.x2-battle[data-step="2.5"] .x2-nk-count i:nth-child(3){ animation-delay: .92s; }
@keyframes x2-nk-tick{ 0%{ opacity: 0; transform: scale(1.9); } 18%{ opacity: 1; transform: scale(1); } 80%{ opacity: 1; } 100%{ opacity: 0; transform: scale(.8); } }
/* le sol et le missile */
.x2-nk-ground{ position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: linear-gradient(#0c0e14, #020203 70%); }
.x2-nk-ground::before{ content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 4px; background: linear-gradient(90deg, rgba(255,214,150,0), #ffe1a6 50%, rgba(255,214,150,0)); opacity: 0; }
.x2-battle[data-step="2.5"] .x2-nk-ground::before{ animation: x2-nk-on 2.85s 1.75s linear forwards; }
@keyframes x2-nk-on{ 0%{ opacity: 1; } 100%{ opacity: .5; } }
.x2-nk-missile{ position: absolute; left: 50%; bottom: 22%; width: 5px; height: 42vh; margin-left: -2.5px; border-radius: 3px; background: linear-gradient(to top, #fff 0, #ffe1a6 6%, rgba(255,170,90,.6) 30%, rgba(255,170,90,0) 100%); opacity: 0; transform-origin: 50% 100%; will-change: transform, opacity; }
.x2-battle[data-step="2.5"] .x2-nk-missile{ animation: x2-nk-fall .72s 1.03s cubic-bezier(.45,0,.85,.7) forwards; }
@keyframes x2-nk-fall{ 0%{ opacity: 0; transform: rotate(9deg) translateY(-112vh); } 12%{ opacity: 1; } 96%{ opacity: 1; transform: rotate(9deg) translateY(0); } 100%{ opacity: 0; transform: rotate(9deg) translateY(0); } }
/* le champignon : boule de feu, colonne, anneaux, chapeau */
.x2-nk-cloud{ position: absolute; left: 50%; bottom: 22%; width: 0; height: 0; }
.x2-nk-cloud > span{ position: absolute; opacity: 0; will-change: transform, opacity; }
.x2-nk-glow{ left: -60vmin; bottom: -34vmin; width: 120vmin; height: 120vmin; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.95) 0%, rgba(255,214,150,.75) 16%, rgba(255,138,43,.38) 42%, rgba(255,138,43,0) 72%); }
.x2-battle[data-step="2.5"] .x2-nk-glow{ animation: x2-nk-glow 2.85s 1.75s cubic-bezier(.1,.8,.2,1) both; }
@keyframes x2-nk-glow{ 0%{ opacity: 0; transform: scale(.12); } 9%{ opacity: 1; transform: scale(1); } 40%{ opacity: .75; transform: scale(.86); } 100%{ opacity: .42; transform: scale(.8); } }
.x2-nk-stem{ left: -4.6vmin; bottom: -1vmin; width: 9.2vmin; height: 31vmin; border-radius: 4.6vmin 4.6vmin 1.2vmin 1.2vmin / 3vmin 3vmin 1vmin 1vmin; background: linear-gradient(90deg, #5a1a08 0%, #c2410c 26%, #ffb45e 50%, #b9330b 74%, #401006 100%); transform-origin: 50% 100%; }
.x2-battle[data-step="2.5"] .x2-nk-stem{ animation: x2-nk-stem 2.55s 2.05s cubic-bezier(.15,.75,.25,1) forwards; }
@keyframes x2-nk-stem{ 0%{ opacity: 1; transform: scale(1.5, .02); } 55%{ opacity: 1; transform: scale(1, 1); } 100%{ opacity: .95; transform: scale(.92, 1.03); } }
.x2-nk-ring{ left: -13vmin; width: 26vmin; height: 4.4vmin; border-radius: 50%; border: .7vmin solid rgba(255,225,180,.75); }
.x2-nk-ring.is-a{ bottom: 12vmin; }
.x2-nk-ring.is-b{ bottom: 20vmin; left: -9vmin; width: 18vmin; height: 3.2vmin; }
.x2-battle[data-step="2.5"] .x2-nk-ring.is-a{ animation: x2-nk-ring 1.7s 2.75s ease-out both; }
.x2-battle[data-step="2.5"] .x2-nk-ring.is-b{ animation: x2-nk-ring 1.6s 3s ease-out both; }
@keyframes x2-nk-ring{ 0%{ opacity: 0; transform: scale(.25); } 22%{ opacity: .85; } 100%{ opacity: .28; transform: scale(1.12); } }
.x2-nk-cap{ left: -23vmin; bottom: 0; width: 46vmin; height: 21vmin; border-radius: 50% 50% 46% 46% / 62% 62% 38% 38%; background: radial-gradient(60% 75% at 50% 68%, #ffd28a 0%, #ff8a2b 26%, #a52e0a 58%, #3a1108 82%, #1c0a07 100%); }
.x2-nk-cap::before{ content: ""; position: absolute; left: 7vmin; right: 7vmin; bottom: -2.6vmin; height: 7.5vmin; border-radius: 50%; background: radial-gradient(closest-side, #c2410c 0%, #6b1d09 60%, rgba(58,17,8,0) 100%); }      /* la collerette sous le chapeau */
.x2-battle[data-step="2.5"] .x2-nk-cap{ animation: x2-nk-cap 2.45s 2.15s cubic-bezier(.15,.75,.25,1) both; }
@keyframes x2-nk-cap{ 0%{ opacity: 0; transform: translateY(0) scale(.3); } 12%{ opacity: 1; } 58%{ opacity: 1; transform: translateY(-27vmin) scale(1); } 100%{ opacity: 1; transform: translateY(-29.5vmin) scale(1.07); } }
.x2-nk-fire{ left: -11vmin; bottom: -4vmin; width: 22vmin; height: 22vmin; border-radius: 50%; background: radial-gradient(closest-side, #fff 0%, #fff3cf 26%, #ffb45e 56%, #e2553f 82%, rgba(160,40,10,0) 100%); }
.x2-battle[data-step="2.5"] .x2-nk-fire{ animation: x2-nk-fire 2.85s 1.75s cubic-bezier(.15,.75,.25,1) forwards; }
@keyframes x2-nk-fire{ 0%{ opacity: 1; transform: scale(.1); } 13%{ opacity: 1; transform: scale(1.25); } 62%{ opacity: .9; transform: translateY(-27vmin) scale(.82); } 100%{ opacity: .55; transform: translateY(-30vmin) scale(.7); } }
/* ondes de choc au sol */
.x2-nk-wave{ position: absolute; left: 50%; bottom: 22%; width: 150vmax; height: 30vmax; margin: 0 0 -15vmax -75vmax; border-radius: 50%; border: .9vmin solid rgba(255,230,190,.85); opacity: 0; will-change: transform, opacity; }
.x2-battle[data-step="2.5"] .x2-nk-wave.is-a{ animation: x2-nk-wave 1.05s 1.75s cubic-bezier(.1,.7,.3,1) forwards; }
.x2-battle[data-step="2.5"] .x2-nk-wave.is-b{ animation: x2-nk-wave 1.25s 1.98s cubic-bezier(.1,.7,.3,1) forwards; }
.x2-battle[data-step="2.5"] .x2-nk-wave.is-c{ animation: x2-nk-wave 1.5s 2.3s cubic-bezier(.1,.7,.3,1) forwards; }
@keyframes x2-nk-wave{ 0%{ opacity: 1; transform: scale(.02); } 70%{ opacity: .5; } 100%{ opacity: 0; transform: scale(1); } }

/* --- Diplomatie (8e demande, 03/12) : quatre cartes d'action, ce qui est en cours, derniers echanges, fenetre d'un pays --- */
.x2-dip-cards{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }      /* 2 × 2 sur tablette, 4 cote a cote au-dela de 1500 px */
.x2-dip-card{ display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px 16px; border-radius: 16px; background: var(--x2-card); box-shadow: inset 0 0 0 1px var(--x2-rule), var(--x2-shadow-card); }
.x2-dip-card header{ display: flex; align-items: center; gap: 10px; }
.x2-dip-card h3{ font-size: 1rem; line-height: 1.2; }
.x2-dip-txt{ font-size: .82rem; line-height: 1.35; color: var(--x2-ink-3); }
.x2-dip-card .x2-buy-facts{ margin-top: auto; }
.x2-dip-card .x2-btn{ align-self: stretch; justify-content: center; }
.x2-dip-now{ display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; margin-top: 14px; align-items: start; }
.x2-dip-h{ padding: 14px 18px 6px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--x2-ink-3); }
.x2-dip-rows{ display: grid; }
.x2-dip-row{ display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 18px; border-top: 1px solid var(--x2-rule-2); }
.x2-dip-row .x2-flag, .x2-dip-log .x2-flag{ width: 30px; height: 21px; border-radius: 4px; font-size: 8px; flex: none; }
.x2-dip-who{ display: grid; gap: 2px; min-width: 0; flex: 1; }
.x2-dip-who b{ font-size: .92rem; }
.x2-dip-who small{ font-size: .78rem; line-height: 1.3; color: var(--x2-ink-3); }
.x2-dip-row .x2-btn{ flex: none; }
.x2-dip-row.is-offer{ background: rgba(211,154,44,.12); }
.x2-dip-row.is-bad .x2-dip-who b{ color: var(--x2-bad); }
.x2-dip-row.is-good .x2-dip-who b{ color: var(--x2-good); }
.x2-dip-log{ display: grid; padding: 0 18px 12px; }
.x2-dip-log li{ display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: .84rem; border-top: 1px solid var(--x2-rule-2); }
.x2-dip-log li span{ flex: 1; min-width: 0; }
.x2-dip-log small{ flex: none; color: var(--x2-ink-3); white-space: nowrap; }
.x2-dip-now .x2-act-hint{ padding: 4px 18px 14px; }
.x2-dip-ops{ display: grid; gap: 8px; margin-top: 10px; }
.x2-dip-op{ display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--x2-paper); box-shadow: inset 0 0 0 1px var(--x2-rule); }
.x2-dip-op .x2-badge{ width: 38px; height: 38px; font-size: 1.15rem; }
.x2-dip-op-txt{ display: grid; gap: 2px; min-width: 0; flex: 1; }
.x2-dip-op-txt small{ font-size: .8rem; line-height: 1.3; color: var(--x2-ink-3); }
.x2-dip-op.is-off .x2-dip-op-txt small{ color: var(--x2-bad); }
.x2-dip-op .x2-btn, .x2-dip-op .x2-stepper{ flex: none; }
@media (min-width: 1500px){ .x2-dip-cards{ grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px){ .x2-dip-now{ grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px){ .x2-dip-op{ flex-wrap: wrap; } .x2-dip-op .x2-btn, .x2-dip-op .x2-stepper{ margin-left: 50px; } }
