/* ===== Thèmes =====
 * Le thème par défaut reprend la charte Nouvelle Énergie (bleu #1d257a,
 * chamois #b0ad85, Montserrat). Chaque président a sa propre ambiance,
 * appliquée via <html data-theme="…">. */
:root,
:root[data-theme="lisnard"] {
  --bg-1: #0f1752;
  --bg-2: #1d257a;
  --glow: rgba(74, 54, 163, 0.5);
  --primary: #1d257a;
  --primary-ink: #ffffff;
  --accent: #b0ad85;
  --accent-ink: #0f1752;
  --card: #ffffff;
  --ink: #171b3e;
  --muted: #4a5464;
  --hair: #dedbe9;
  --surface: #f3f1f7;
  --on-bg: #ffffff;
  --on-bg-muted: rgba(255, 255, 255, 0.72);
  --panel: rgba(255, 255, 255, 0.07);
  --panel-line: rgba(255, 255, 255, 0.14);
  --good: #137a4b;
  --good-bg: rgba(31, 157, 99, 0.12);
  --bad: #b0124f;
  --bad-bg: rgba(208, 22, 95, 0.1);
  --font: "Montserrat", Arial, sans-serif;
  --font-title: "Montserrat", Arial, sans-serif;
  --title-case: none;
  --title-weight: 800;
  --good-bar: #3ccf7e;
  --mid-bar: #f2b33d;
  --bad-bar: #f0506e;

  /* Couleurs Nouvelle Énergie fixes (bandeau, panneau de comparaison) */
  --ne-blue: #1d257a;
  --ne-blue-dark: #0f1752;
  --ne-chamois: #b0ad85;
  --ne-chamois-light: #dedbbd;
  --ne-indigo: #4a36a3;
}

:root[data-theme="melenchon"] {
  --bg-1: #33060f;
  --bg-2: #8a1027;
  --glow: rgba(255, 106, 74, 0.38);
  --primary: #b3172b;
  --accent: #ff7a59;
  --accent-ink: #33060f;
  --ink: #2a0c12;
  --hair: #f0d9dc;
  --surface: #fbf1f2;
}

:root[data-theme="bardella"] {
  --bg-1: #05132f;
  --bg-2: #0c2d6b;
  --glow: rgba(227, 6, 19, 0.28);
  --primary: #0c2d6b;
  --accent: #e30613;
  --accent-ink: #ffffff;
  --ink: #0b1630;
  --hair: #dbe1ee;
  --surface: #f1f4fa;
}

:root[data-theme="philippe"] {
  --bg-1: #07303f;
  --bg-2: #0e6f93;
  --glow: rgba(73, 198, 229, 0.35);
  --primary: #0e6f93;
  --accent: #49c6e5;
  --accent-ink: #07303f;
  --ink: #0b2530;
  --hair: #d6e8ef;
  --surface: #eff7fa;
}

:root[data-theme="glucksmann"] {
  --bg-1: #36081f;
  --bg-2: #9b1555;
  --glow: rgba(255, 138, 181, 0.35);
  --primary: #b0175f;
  --accent: #ff8ab5;
  --accent-ink: #36081f;
  --ink: #2b0b1b;
  --hair: #f1d8e3;
  --surface: #fcf0f5;
}

:root[data-theme="dictateur"] {
  --bg-1: #11110c;
  --bg-2: #2d2c1c;
  --glow: rgba(193, 18, 31, 0.3);
  --primary: #3f3f22;
  --accent: #c1121f;
  --accent-ink: #ffffff;
  --card: #ebe5cf;
  --ink: #1c1a10;
  --muted: #55513a;
  --hair: #cfc6a6;
  --surface: #ddd5b8;
  --font-title: "Black Ops One", "Montserrat", Arial, sans-serif;
  --title-case: uppercase;
  --title-weight: 400;
}

:root[data-theme="ia"] {
  --bg-1: #010503;
  --bg-2: #06140d;
  --glow: rgba(0, 230, 118, 0.22);
  --primary: #00c853;
  --primary-ink: #00140a;
  --accent: #00e676;
  --accent-ink: #00140a;
  --card: #07120c;
  --ink: #c8ffe0;
  --muted: #6fbf94;
  --hair: #144d31;
  --surface: #0b1f15;
  --good: #00e676;
  --good-bg: rgba(0, 230, 118, 0.12);
  --bad: #ff5c8a;
  --bad-bg: rgba(255, 92, 138, 0.12);
  --font: "JetBrains Mono", ui-monospace, monospace;
  --font-title: "JetBrains Mono", ui-monospace, monospace;
}

:root[data-theme="degaulle"] {
  --bg-1: #08163a;
  --bg-2: #1b3a8a;
  --glow: rgba(237, 41, 57, 0.28);
  --primary: #002395;
  --accent: #ed2939;
  --accent-ink: #ffffff;
  --ink: #0b1630;
  --hair: #dbe1ee;
  --surface: #f1f4fa;
}

:root[data-theme="napoleon"] {
  --bg-1: #0b2013;
  --bg-2: #1f4d2b;
  --glow: rgba(212, 175, 55, 0.32);
  --primary: #1f4d2b;
  --accent: #d4af37;
  --accent-ink: #1a1405;
  --card: #fffaf0;
  --ink: #1d2318;
  --hair: #e4dcc0;
  --surface: #f5efdc;
  --font-title: "Cinzel", Georgia, serif;
  --title-weight: 800;
}

:root[data-theme="louis14"] {
  --bg-1: #0b1238;
  --bg-2: #1c2a6b;
  --glow: rgba(226, 179, 60, 0.38);
  --primary: #1c2a6b;
  --accent: #e2b33c;
  --accent-ink: #120d02;
  --card: #fffaf0;
  --ink: #161a33;
  --hair: #e8dcc0;
  --surface: #f7f0de;
  --font-title: "Cinzel", Georgia, serif;
  --title-weight: 800;
}

:root[data-theme="charlemagne"] {
  --bg-1: #240c09;
  --bg-2: #6b1d17;
  --glow: rgba(226, 179, 60, 0.3);
  --primary: #7a1f1f;
  --accent: #e2b33c;
  --accent-ink: #1e0f05;
  --card: #f6efe0;
  --ink: #2a1a10;
  --muted: #5e4a38;
  --hair: #d9caa8;
  --surface: #ece2cc;
  --font-title: "Cinzel", Georgia, serif;
  --title-weight: 800;
}

:root[data-theme="cesar"] {
  --bg-1: #170820;
  --bg-2: #5b1e6b;
  --glow: rgba(212, 175, 55, 0.32);
  --primary: #5b1e6b;
  --accent: #d4af37;
  --accent-ink: #1a1405;
  --card: #fbf7ee;
  --ink: #22122a;
  --hair: #e6dccb;
  --surface: #f4ecdd;
  --font-title: "Cinzel", Georgia, serif;
  --title-case: uppercase;
  --title-weight: 800;
}

:root[data-theme="mobutu"] {
  --bg-1: #00230f;
  --bg-2: #007a3d;
  --glow: rgba(247, 214, 24, 0.38);
  --primary: #007a3d;
  --accent: #f7d618;
  --accent-ink: #1d1a00;
  --ink: #0f2416;
  --hair: #d8e8d6;
  --surface: #f2f8ee;
}

/* Fond léopard, en hommage à la toque du Maréchal */
:root[data-theme="mobutu"] body {
  background-image:
    radial-gradient(ellipse 14px 10px at 20px 20px, rgba(20, 12, 0, 0.55) 45%, transparent 55%),
    radial-gradient(ellipse 12px 9px at 62px 54px, rgba(20, 12, 0, 0.5) 45%, transparent 55%),
    radial-gradient(ellipse 10px 13px at 90px 18px, rgba(20, 12, 0, 0.5) 45%, transparent 55%),
    radial-gradient(circle at 88% 4%, var(--glow), transparent 480px),
    linear-gradient(145deg, var(--bg-2) 0%, var(--bg-1) 78%);
  background-size: 110px 80px, 110px 80px, 110px 80px, auto, auto;
}

:root[data-theme="croquette"] {
  --bg-1: #4a2410;
  --bg-2: #c2622a;
  --glow: rgba(255, 210, 150, 0.45);
  --primary: #c2622a;
  --accent: #ffd28a;
  --accent-ink: #4a2410;
  --card: #fffaf3;
  --ink: #3a1d0b;
  --hair: #f1dcc6;
  --surface: #fbefe1;
  --font: "Fredoka", "Montserrat", Arial, sans-serif;
  --font-title: "Fredoka", "Montserrat", Arial, sans-serif;
  --title-weight: 700;
}

/* ===== Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--on-bg);
  background-color: var(--bg-1);
  background-image:
    radial-gradient(circle at 88% 4%, var(--glow), transparent 480px),
    radial-gradient(circle at 6% 96%, rgba(176, 173, 133, 0.08), transparent 420px),
    linear-gradient(145deg, var(--bg-2) 0%, var(--bg-1) 78%);
  background-attachment: fixed;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

main {
  flex: 1;
}

.ribbon,
main,
.disclaimer {
  position: relative;
  z-index: 1;
}

/* ===== Décor de fond : barres diagonales, nids d'abeille, particules ===== */
.bg-deco {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bar {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.08) 45%, rgba(255, 255, 255, 0));
  transform: rotate(-28deg);
  animation: drift var(--d) ease-in-out infinite alternate;
}

.bar--dark {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.24) 45%, rgba(0, 0, 0, 0));
}

.bar--accent {
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 55%, transparent) 50%, transparent);
}

@keyframes drift {
  from {
    translate: -3vw 2vh;
  }
  to {
    translate: 4vw -3vh;
  }
}

.hexes {
  position: absolute;
  width: 560px;
  height: 560px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='48' viewBox='0 0 28 48'%3E%3Cpath d='M14 0L28 8V24L14 32L0 24V8ZM14 32V48' fill='none' stroke='white' stroke-opacity='0.09' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 42px 72px;
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 68%);
  mask-image: radial-gradient(circle, #000 0%, transparent 68%);
}

.hexes--tl {
  top: -200px;
  left: -200px;
}

.hexes--br {
  right: -220px;
  bottom: -220px;
}

.spark {
  position: absolute;
  bottom: -12px;
  left: var(--l);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  opacity: 0;
  animation: rise var(--d) linear var(--delay) infinite;
}

@keyframes rise {
  0% {
    translate: 0 0;
    opacity: 0;
  }
  12% {
    opacity: 0.55;
  }
  80% {
    opacity: 0.35;
  }
  100% {
    translate: var(--dx) -105vh;
    opacity: 0;
  }
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}

.wrap--narrow {
  max-width: 560px;
}

/* ===== Menu des jeux de la campagne ===== */
.jeux-nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 10px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.jeux-nav::-webkit-scrollbar {
  display: none;
}

.jeux-nav a {
  flex: none;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--panel-line);
  background: var(--panel);
  color: var(--on-bg);
  font: 700 0.8rem "Montserrat", Arial, sans-serif;
  text-decoration: none;
  white-space: nowrap;
}

.jeux-nav a:hover {
  background: rgba(255, 255, 255, 0.14);
}

.jeux-nav a[aria-current="page"] {
  background: var(--ne-chamois);
  border-color: var(--ne-chamois);
  color: var(--ne-blue-dark);
}

.jeux-nav .jeux-nav-titre {
  background: none;
  border: 0;
  padding-left: 0;
  color: var(--ne-chamois);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Les autres jeux, en fin de partie */
.autres-jeux {
  margin: 22px 0 0;
}

.autres-jeux h3 {
  margin: 0 0 10px;
  color: var(--on-bg);
  font-size: 1.1rem;
  font-weight: 800;
}

.autres-jeux-liste {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.autres-jeux-liste a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  color: var(--on-bg);
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.autres-jeux-liste a:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
}

.autres-jeux-liste span {
  color: var(--on-bg-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

/* ===== Bandeau soutien ===== */
.ribbon {
  background: var(--ne-chamois);
  color: var(--ne-blue-dark);
  font: 600 0.8rem/1.3 "Montserrat", Arial, sans-serif;
  text-align: center;
  padding: 8px 16px;
}

.ribbon strong {
  font-weight: 800;
}

.tricolore {
  display: inline-block;
  width: 18px;
  height: 12px;
  margin-right: 6px;
  vertical-align: -1px;
  border-radius: 2px;
  background: linear-gradient(90deg, #002395 33.3%, #ffffff 33.3% 66.6%, #ed2939 66.6%);
  box-shadow: 0 0 0 1px rgba(15, 23, 82, 0.25);
}

/* ===== Écrans ===== */
.screen {
  display: none;
}

.screen.is-active {
  display: block;
  animation: fade-up 0.4s ease both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.kicker {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.kicker--ink {
  color: var(--primary);
}

:root[data-theme="ia"] .kicker--ink {
  color: var(--accent);
}

.section-title,
.panel-title {
  margin: 0 0 8px;
  font-family: var(--font-title);
  font-weight: var(--title-weight);
  text-transform: var(--title-case);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 0 0 28px;
  color: var(--on-bg-muted);
  font-size: 1.05rem;
}

/* ===== Boutons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  line-height: 1.2;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px);
}

.btn-lg {
  padding: 16px 26px;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 30px -12px var(--accent);
}

/* Reflet qui balaie le bouton de temps en temps */
.btn-shine {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-shine::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: skewX(-20deg);
  animation: shine 3.6s ease-in-out infinite;
}

@keyframes shine {
  0%,
  55% {
    left: -60%;
  }
  100% {
    left: 130%;
  }
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-ink);
}

.btn-ghost {
  background: transparent;
  color: var(--on-bg);
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-ghost:hover {
  border-color: var(--on-bg);
  background: rgba(255, 255, 255, 0.06);
}

.back-link,
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--on-bg-muted);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.back-link {
  margin-bottom: 20px;
}

.link-btn {
  color: var(--primary);
  margin-left: 6px;
}

:root[data-theme="ia"] .link-btn {
  color: var(--accent);
}

/* ===== Accueil ===== */
.home {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(32px, 7vw, 88px) 16px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
}

.home-title {
  margin: 0 0 22px;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.rotator-wrap {
  display: block;
  color: var(--accent);
  min-height: 1.1em;
}

.rotator {
  position: relative;
  display: inline-block;
  transition: opacity 0.25s ease;
}

.rotator::after {
  content: "";
  position: absolute;
  left: -2%;
  top: 54%;
  height: 0.09em;
  width: 0;
  background: #ffffff;
  border-radius: 2px;
}

.rotator.is-struck {
  opacity: 0.55;
}

/* La rature s'anime seulement à l'aller : au retrait elle disparaît net,
   pour ne jamais rayer le nom suivant. */
.rotator.is-struck::after {
  width: 104%;
  transition: width 0.35s ease;
}

.rotator.is-final::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.04em;
  height: 0.12em;
  background: var(--accent);
  opacity: 0.35;
  border-radius: 4px;
  animation: grow 0.6s ease both;
  transform-origin: left;
}

@keyframes grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.home-lead {
  margin: 0 0 32px;
  max-width: 34em;
  font-size: 1.12rem;
  color: var(--on-bg-muted);
}

.home-lead em {
  color: var(--on-bg);
  font-style: normal;
  font-weight: 700;
}

.home-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.home-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.home-chips li {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Visuel d'accueil : photo + cartes qui flottent autour */
.home-visual {
  position: relative;
  min-height: 560px;
}

.hero-halo {
  position: absolute;
  top: 50%;
  right: 6%;
  width: 440px;
  height: 440px;
  translate: 0 -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(176, 173, 133, 0.35), rgba(176, 173, 133, 0) 65%);
}

.hero-halo span {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 2px dashed rgba(176, 173, 133, 0.5);
  animation: spin 40s linear infinite;
}

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

.hero-photo {
  position: relative;
  z-index: 1;
  width: min(380px, 78%);
  margin: 0 30px 0 auto;
  border-radius: 28px;
  overflow: hidden;
  border: 3px solid var(--ne-chamois);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.75);
  transform: rotate(2deg);
  background: var(--ne-blue);
}

.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 20%;
  animation: zoom-soft 14s ease-in-out infinite alternate;
}

@keyframes zoom-soft {
  to {
    transform: scale(1.06);
  }
}

.hero-photo figcaption {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  padding: 60px 20px 18px;
  background: linear-gradient(transparent, rgba(15, 23, 82, 0.92));
  color: #ffffff;
}

.hero-photo figcaption strong {
  font-size: 1.2rem;
  font-weight: 800;
}

.hero-photo figcaption span {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ne-chamois);
}

/* Photo indisponible (hors ligne) : on garde un cadre sobre */
.hero-photo.is-missing {
  min-height: 420px;
  background:
    radial-gradient(circle at 50% 35%, rgba(176, 173, 133, 0.35), transparent 60%),
    var(--ne-blue);
}

.hero-photo.is-missing img {
  display: none;
}

.preview-card {
  position: absolute;
  z-index: 3;
  left: -10px;
  bottom: 90px;
  width: 260px;
  background: var(--card);
  color: var(--ink);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  rotate: -3deg;
}

.preview-card .ev-emoji {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 1.5rem;
}

.preview-card .ev-title {
  margin: 10px 0 4px;
  font-weight: 800;
  font-size: 1.15rem;
}

.preview-card .ev-text {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.preview-card .fx-row {
  margin-bottom: 0;
}

.preview-badge {
  position: absolute;
  z-index: 3;
  left: 4%;
  top: 30px;
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  border-radius: 18px;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.6);
  rotate: -5deg;
}

.hero-chip {
  position: absolute;
  z-index: 3;
  right: -10px;
  top: 47%;
  padding: 10px 16px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ne-blue-dark);
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 0 16px 30px -14px rgba(0, 0, 0, 0.6);
  rotate: 3deg;
}

.hero-chip--2 {
  right: -18px;
  top: 32%;
  background: var(--ne-blue);
  color: #ffffff;
  border: 1px solid rgba(176, 173, 133, 0.6);
  rotate: -2deg;
}

/* Petits mouvements : on anime `translate` pour garder les rotations */
.float {
  animation: float 6s ease-in-out infinite;
}

.float--slow {
  animation-duration: 8s;
  animation-delay: -2s;
}

.float--alt {
  animation-duration: 7s;
  animation-delay: -4s;
}

@keyframes float {
  50% {
    translate: 0 -14px;
  }
}

.preview-grade {
  font-size: 2.3rem;
  font-weight: 900;
  line-height: 1;
}

.preview-grade small {
  font-size: 1rem;
  font-weight: 700;
  opacity: 0.75;
}

.preview-mention {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ===== Choix du président ===== */
.pres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.pres-sub {
  margin: 40px 0 16px;
  font-size: 1.1rem;
  font-weight: 800;
}

.pres-section:first-child .pres-sub {
  margin-top: 0;
}

.pres-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border-radius: 20px;
  background: #ffffff;
  color: #171b3e;
  border-top: 6px solid var(--c);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pres-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 50px -24px rgba(0, 0, 0, 0.7);
}

.pres-card.is-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 32px;
  padding: 30px;
  border-top: 0;
  background:
    radial-gradient(circle at 92% 0%, rgba(74, 54, 163, 0.5), transparent 320px),
    linear-gradient(145deg, var(--ne-blue), var(--ne-blue-dark));
  color: #ffffff;
  outline: 2px solid var(--ne-chamois);
  outline-offset: -2px;
}

.pres-flag {
  position: absolute;
  top: -12px;
  left: 24px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--ne-chamois);
  color: var(--ne-blue-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pres-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pres-emoji {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--c) 12%, white);
  font-size: 1.5rem;
}

.is-featured .pres-emoji {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 1.9rem;
}

/* Portrait sur fond noir : « lighten » fond le noir dans le bleu de la carte */
.pres-photo {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 112%;
  width: auto;
  mix-blend-mode: lighten;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%);
  mask-image: linear-gradient(90deg, transparent, #000 40%);
  pointer-events: none;
}

.pres-card.is-featured {
  overflow: hidden;
  padding-right: clamp(30px, 24%, 260px);
}

.pres-card.is-featured > *:not(.pres-photo) {
  position: relative;
  z-index: 1;
}

.pres-card.is-featured .pres-flag {
  position: absolute;
  top: 14px;
  left: auto;
  right: 18px;
  z-index: 2;
}

.pres-name {
  display: block;
  font-weight: 800;
  font-size: 1.12rem;
  line-height: 1.2;
}

.is-featured .pres-name {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.pres-party {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #4a5464;
}

.is-featured .pres-party {
  color: var(--ne-chamois);
}

.pres-devise {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ne-chamois);
}

.pres-mesures {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  color: #38405e;
}

.pres-mesures li {
  position: relative;
  padding-left: 18px;
}

.pres-mesures li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--c);
}

.is-featured .pres-top,
.is-featured .pres-devise,
.is-featured .pres-go {
  grid-column: 1;
}

.is-featured .pres-mesures {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
}

.is-featured .pres-mesures li::before {
  background: var(--ne-chamois);
}

.pres-go {
  margin-top: auto;
  align-self: flex-start;
  padding: 10px 16px;
  border-radius: 999px;
  border: 0;
  background: var(--c);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
}

.is-featured .pres-go {
  background: var(--ne-chamois);
  color: var(--ne-blue-dark);
  padding: 14px 22px;
  font-size: 1rem;
}

/* ===== Création ===== */
.panel {
  background: var(--card);
  color: var(--ink);
  border-radius: 24px;
  padding: clamp(22px, 5vw, 36px);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.65);
}

.create-pres {
  margin: 0 0 24px;
  color: var(--muted);
}

.create-pres strong {
  color: var(--ink);
}

.field {
  display: block;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-row {
  display: flex;
  gap: 8px;
}

.field input,
.field select {
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  border-radius: 12px;
  border: 2px solid var(--hair);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary);
}

.icon-btn {
  flex: none;
  width: 52px;
  border-radius: 12px;
  border: 2px solid var(--hair);
  background: var(--surface);
  font-size: 1.3rem;
}

.icon-btn:hover {
  border-color: var(--primary);
}

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.seg--3 {
  grid-template-columns: repeat(3, 1fr);
}

.seg label {
  position: relative;
}

.seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 48px;
  padding: 10px 8px;
  border-radius: 12px;
  border: 2px solid var(--hair);
  background: var(--surface);
  font-weight: 600;
  font-size: 0.92rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.seg input:checked + span {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--card));
  color: var(--ink);
}

.seg input:focus-visible + span {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ===== HUD ===== */
.wrap--game {
  max-width: 820px;
  padding-bottom: 8px;
}

.hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.hud-who {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  font-size: 1.9rem;
}

.hud-name {
  display: block;
  font-family: var(--font-title);
  text-transform: var(--title-case);
  font-weight: var(--title-weight);
  font-size: 1.35rem;
  line-height: 1.2;
}

.hud-meta {
  display: block;
  color: var(--on-bg-muted);
  font-size: 0.9rem;
}

.hud-pres {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 5px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  font-size: 0.85rem;
  font-weight: 600;
}

.hud-pres b {
  color: var(--accent);
}

/* Photos rondes des présidents */
.ph {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: #f3f1f7;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.45);
  font-size: 1.3rem;
  line-height: 1;
}

.ph img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pres-avatar {
  width: 58px;
  height: 58px;
  border-color: var(--c);
}

.hud-pres-photo {
  width: 32px;
  height: 32px;
  border-color: var(--accent);
  font-size: 1rem;
}

.line-ph {
  width: 20px;
  height: 20px;
  border-width: 1px;
  box-shadow: none;
  font-size: 0.7rem;
}

.rank-ph {
  width: 30px;
  height: 30px;
  border-width: 1.5px;
  font-size: 0.9rem;
}

.create-avatar {
  width: 54px;
  height: 54px;
  border-color: var(--primary);
}

/* ===== Statistiques ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.stat {
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.stat-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--on-bg-muted);
}

.stat-val {
  font-size: 1rem;
  font-weight: 800;
  color: var(--on-bg);
  font-variant-numeric: tabular-nums;
}

.stat-bar {
  margin-top: 7px;
  height: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.stat-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.4s ease;
}

.stat--money .stat-val {
  display: block;
  margin-top: 3px;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat.flash-up {
  background: rgba(31, 157, 99, 0.3);
  border-color: rgba(31, 157, 99, 0.65);
}

.stat.flash-down {
  background: rgba(208, 22, 95, 0.28);
  border-color: rgba(208, 22, 95, 0.65);
}

/* ===== Journal de vie ===== */
.lifelog {
  height: min(50vh, 520px);
  overflow-y: auto;
  padding: 0 18px 14px;
  border-radius: 22px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.65);
  scroll-behavior: smooth;
}

:root[data-theme="ia"] .lifelog,
:root[data-theme="ia"] .modal-card {
  border: 1px solid var(--hair);
}

:root[data-theme="dictateur"] .lifelog {
  border: 2px solid #b9ae86;
}

.lifelog--recap {
  height: auto;
  max-height: 60vh;
  margin-top: 12px;
}

.year-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 0 6px;
  background: var(--card);
  border-bottom: 1px solid var(--hair);
  font-family: var(--font-title);
  font-weight: var(--title-weight);
  text-transform: var(--title-case);
  font-size: 0.95rem;
  color: var(--primary);
}

:root[data-theme="ia"] .year-head {
  color: var(--accent);
}

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

.line {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 6px;
  margin: 0 -6px;
  border-bottom: 1px dashed var(--hair);
  border-radius: 10px;
  animation: fade-up 0.3s ease both;
}

.line:last-child {
  border-bottom: 0;
}

.line-emoji {
  font-size: 1.4rem;
  line-height: 1.25;
  text-align: center;
}

.line-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 2px;
  font-size: 0.9rem;
  font-weight: 800;
}

.line-text {
  margin: 0;
  font-size: 0.95rem;
}

.line-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px 2px 2px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-ink);
  font-size: 0.7rem;
  font-weight: 800;
}

.line--policy {
  background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 8%, transparent), transparent 80%);
}

.line--action .line-title {
  color: var(--muted);
}

.line--death {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.line--calme .line-text {
  color: var(--muted);
  font-style: italic;
}

.fx-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.fx-row:empty {
  margin-bottom: 0;
}

.fx-row--small {
  margin: 6px 0 0;
  gap: 4px;
}

.fx-row--small .fx {
  padding: 3px 8px;
  font-size: 0.75rem;
}

.fx {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  animation: pop 0.35s ease both;
}

.fx.up {
  background: var(--good-bg);
  color: var(--good);
}

.fx.down {
  background: var(--bad-bg);
  color: var(--bad);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Carte d'aperçu de l'accueil */
.ev-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ev-emoji {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--surface);
  font-size: 2rem;
}

.ev-age {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.ev-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-ink);
  font-size: 0.78rem;
  font-weight: 800;
  animation: pop 0.4s ease both;
}

.ev-tag.is-ne {
  background: var(--ne-blue);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px var(--ne-chamois);
}

@keyframes bob {
  50% {
    translate: 0 -5px;
    rotate: -4deg;
  }
}

/* ===== Commandes ===== */
.controls {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 0 -16px;
  padding: 14px 16px 12px;
  background: linear-gradient(transparent, color-mix(in srgb, var(--bg-1) 92%, transparent) 26%);
}

.speed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.speed-label {
  margin-right: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-bg-muted);
}

.speed button,
.pace button {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--panel-line);
  background: var(--panel);
  color: var(--on-bg);
  font-size: 0.82rem;
  font-weight: 700;
}

.speed button.is-on,
.pace button.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.pace {
  display: inline-flex;
  gap: 4px;
  margin-left: 6px;
}

.dock {
  display: grid;
  grid-template-columns: 1fr 1fr auto 1fr 1fr;
  align-items: center;
  gap: 10px;
}

.dock-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 16px;
  border: 1px solid var(--panel-line);
  background: var(--panel);
  color: var(--on-bg);
  font-size: 0.8rem;
  font-weight: 700;
  transition: transform 0.15s ease, background-color 0.2s ease;
}

.dock-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.dock-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.dock-ico {
  font-size: 1.5rem;
  line-height: 1;
}

.age-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.9);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 900;
  box-shadow: 0 14px 30px -10px var(--accent), 0 0 0 6px color-mix(in srgb, var(--accent) 25%, transparent);
  transition: transform 0.15s ease;
}

.age-btn span {
  font-size: 1.9rem;
  line-height: 1;
}

.age-btn small {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.age-btn:hover:not(:disabled) {
  transform: scale(1.05);
}

.age-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.age-btn:disabled {
  opacity: 0.5;
}

.age-btn.is-auto {
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    box-shadow: 0 14px 30px -10px var(--accent), 0 0 0 14px color-mix(in srgb, var(--accent) 10%, transparent);
  }
}

.actions-left {
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--on-bg-muted);
}

/* ===== Fenêtres (choix, menus) ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(5, 8, 30, 0.55);
  backdrop-filter: blur(3px);
}

.modal-card {
  position: relative;
  width: min(480px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 24px 22px 22px;
  border-radius: 24px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
}

.modal-card.is-in {
  animation: modal-in 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: var(--surface);
  color: var(--ink);
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-emoji {
  font-size: 2.6rem;
  line-height: 1;
  animation: bob 3.2s ease-in-out infinite;
}

.modal-emoji:empty {
  display: none;
}

.modal-title {
  margin: 8px 40px 8px 0;
  font-family: var(--font-title);
  font-weight: var(--title-weight);
  text-transform: var(--title-case);
  font-size: 1.45rem;
  line-height: 1.15;
}

.modal-text {
  margin: 0 0 16px;
  font-size: 1.02rem;
}

.modal-outcome {
  margin: 0 0 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface);
  border-left: 4px solid var(--primary);
  font-weight: 600;
  animation: fade-up 0.3s ease both;
}

:root[data-theme="ia"] .modal-outcome {
  border-left-color: var(--accent);
}

.modal-actions {
  display: grid;
  gap: 8px;
}

.modal-actions .btn-primary {
  padding: 14px;
}

.btn-choice {
  justify-content: flex-start;
  width: 100%;
  padding: 13px 16px;
  border-radius: 14px;
  border: 2px solid var(--hair);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  font-weight: 600;
}

.btn-choice:hover:not(:disabled) {
  border-color: var(--primary);
}

:root[data-theme="ia"] .btn-choice:hover:not(:disabled) {
  border-color: var(--accent);
}

.btn-choice:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-choice kbd {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--hair);
  font: 600 0.75rem var(--font);
  color: var(--muted);
}

.btn-menu {
  justify-content: space-between;
  padding: 11px 14px;
}

.btn-menu small {
  flex: none;
  font-weight: 700;
  color: var(--muted);
}

.menu-section {
  margin: 10px 0 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.menu-empty {
  margin: 0;
  color: var(--muted);
}

/* ===== Fin de partie ===== */
.end-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.tomb {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 28px;
  border-radius: 140px 140px 24px 24px;
  background: var(--card);
  color: var(--ink);
  text-align: center;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.65);
}

.tomb-emoji {
  font-size: 2.6rem;
}

.tomb-name {
  margin: 8px 0 4px;
  font-family: var(--font-title);
  text-transform: var(--title-case);
  font-weight: var(--title-weight);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.1;
}

.tomb-dates {
  margin: 0 0 4px;
  font-weight: 700;
  color: var(--muted);
}

.tomb-job {
  margin: 0 0 16px;
  font-weight: 600;
}

.tomb-france {
  margin: 0;
  padding-top: 16px;
  border-top: 1px dashed var(--hair);
  font-style: italic;
  color: var(--muted);
}

.grade-card {
  padding: 28px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
}

.grade-label {
  margin: 0;
  color: var(--on-bg-muted);
  font-weight: 600;
}

.grade-label strong {
  color: var(--on-bg);
}

.grade {
  margin: 4px 0 0;
  font-size: clamp(3.4rem, 9vw, 5rem);
  font-weight: 900;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.grade small {
  font-size: 0.35em;
  color: var(--on-bg-muted);
}

.grade-mention {
  margin: 6px 0 20px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
}

.end-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.end-stats div {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.end-stats dt {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--on-bg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.end-stats dd {
  margin: 2px 0 0;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Panneau comparatif aux couleurs Nouvelle Énergie, quel que soit le thème */
.ne-panel {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  padding: clamp(22px, 4vw, 36px);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 0%, rgba(74, 54, 163, 0.55), transparent 380px),
    linear-gradient(145deg, var(--ne-blue), var(--ne-blue-dark));
  border: 2px solid var(--ne-chamois);
  color: #ffffff;
  font-family: "Montserrat", Arial, sans-serif;
}

.ne-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: end;
}

.ne-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-28deg, transparent 0 46px, rgba(255, 255, 255, 0.035) 46px 70px, transparent 70px 130px, rgba(0, 0, 0, 0.12) 130px 150px);
  pointer-events: none;
}

.ne-main,
.ne-side {
  position: relative;
}

.ne-side {
  margin: 0 calc(-1 * clamp(22px, 4vw, 36px)) calc(-1 * clamp(22px, 4vw, 36px)) 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.ne-photo {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: lighten;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
  mask-image: linear-gradient(180deg, #000 70%, transparent);
}

.ne-quote {
  position: relative;
  margin: -70px 20px 24px 0;
  padding: 14px 16px;
  border-radius: 16px 16px 16px 4px;
  background: rgba(15, 23, 82, 0.92);
  border: 1px solid var(--ne-chamois);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  animation: float 7s ease-in-out infinite;
}

.ne-quote cite {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ne-chamois);
}

.ne-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ne-chamois);
}

.ne-title {
  margin: 0 0 20px;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ne-chamois);
}

.ranking {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.rank-row {
  display: grid;
  grid-template-columns: 28px minmax(150px, 220px) minmax(0, 1fr) 54px;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.92rem;
}

.rank-row.is-played {
  background: rgba(255, 255, 255, 0.08);
}

.rank-row.is-ne {
  background: rgba(176, 173, 133, 0.18);
  outline: 1px solid rgba(176, 173, 133, 0.6);
}

.rank-pos {
  font-weight: 800;
  color: rgba(255, 255, 255, 0.6);
}

.rank-name {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-name small {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
}

.rank-bar {
  height: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.rank-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 8px;
  transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rank-note {
  text-align: right;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.is-ne .rank-note {
  color: var(--ne-chamois);
}

.ne-verdict {
  margin: 0 0 20px;
  max-width: 46em;
  font-size: 1.02rem;
  color: rgba(255, 255, 255, 0.9);
}

.ne-verdict strong {
  color: var(--ne-chamois);
}

.rank-crown {
  margin-right: 4px;
}

/* « Le meilleur choix » : Lisnard face aux autres candidats */
.ne-why {
  margin: 0 0 22px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(176, 173, 133, 0.12);
  border: 1px solid rgba(176, 173, 133, 0.5);
}

.ne-why-titre {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 800;
}

.ne-why-titre strong {
  color: var(--ne-chamois);
}

.ne-why-sous {
  margin: 0 0 14px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

.ne-why-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.ne-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(15, 23, 82, 0.55);
}

.ne-tile-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
}

.ne-tile-lis {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--ne-chamois);
  font-variant-numeric: tabular-nums;
}

.ne-tile-autres {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums;
}

.ne-mesures {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ne-mesures li {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  font-weight: 600;
}

/* Bouton d'adhésion */
.ne-adhesion {
  margin: 0 0 18px;
  padding: 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(176, 173, 133, 0.28), rgba(176, 173, 133, 0.08));
  border: 2px solid var(--ne-chamois);
  text-align: center;
}

.ne-adhesion-titre {
  margin: 0 0 14px;
  font-size: 1.2rem;
  font-weight: 800;
}

.ne-adhesion-titre span {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ne-chamois);
}

.btn-xl {
  padding: 18px 34px;
  font-size: 1.2rem;
  font-weight: 800;
}

.ne-adhesion .btn-xl {
  box-shadow: 0 16px 34px -14px var(--ne-chamois);
  animation: pulse-ne 2.4s ease-in-out infinite;
}

@keyframes pulse-ne {
  50% {
    transform: scale(1.04);
  }
}

.ne-adhesion-note {
  margin: 12px 0 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.ne-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-ne {
  background: var(--ne-chamois);
  color: var(--ne-blue-dark);
  font-family: "Montserrat", Arial, sans-serif;
}

.btn-ne-ghost {
  background: transparent;
  color: #ffffff;
  border-color: rgba(176, 173, 133, 0.7);
  font-family: "Montserrat", Arial, sans-serif;
}

.btn-ne-ghost:hover {
  border-color: var(--ne-chamois);
  background: rgba(176, 173, 133, 0.1);
}

.end-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ribbons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.ribbons li {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.8rem;
  font-weight: 800;
}

.ne-loading {
  margin: 0 0 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  animation: blink 1.2s ease-in-out infinite;
}

@keyframes blink {
  50% {
    opacity: 0.5;
  }
}

.rank-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.rank-name > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lifelog-recap {
  margin-bottom: 20px;
}

.lifelog-recap summary {
  cursor: pointer;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  font-weight: 700;
}

/* Sections de présidents */
.pres-section + .pres-section {
  margin-top: 8px;
}

.create-pres {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ===== Partage du résultat ===== */
.share-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: center;
  margin: 0 0 20px;
  padding: clamp(18px, 3vw, 28px);
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
}

.share-preview {
  aspect-ratio: 1080 / 1350;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--ne-blue), var(--ne-blue-dark));
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.8);
  transform: rotate(-1.5deg);
}

.share-canvas {
  display: block;
  width: 100%;
  height: auto;
  animation: fade-up 0.4s ease both;
}

.share-kicker {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.share-title {
  margin: 0 0 8px;
  font-family: var(--font-title);
  font-weight: var(--title-weight);
  text-transform: var(--title-case);
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1.1;
}

.share-lead {
  margin: 0 0 18px;
  color: var(--on-bg-muted);
}

.share-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  background: #ffffff;
  color: #ffffff;
  font: 700 0.92rem "Montserrat", Arial, sans-serif;
  text-align: left;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.share-btn svg {
  flex: none;
  width: 22px;
  height: 22px;
}

.share-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.share-btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* Couleurs des réseaux (fonds pleins, texte blanc lisible) */
.share-btn--natif {
  grid-column: 1 / -1;
  justify-content: center;
  background: var(--ne-chamois);
  color: var(--ne-blue-dark);
}

.share-btn--x {
  background: #000000;
}

.share-btn--instagram {
  background: linear-gradient(45deg, #d62976, #962fbf);
}

.share-btn--tiktok {
  background: #010101;
  box-shadow: inset 3px 0 0 #25f4ee, inset -3px 0 0 #fe2c55;
}

.share-btn--whatsapp {
  background: #167a43;
}

.share-btn--facebook {
  background: #166fe5;
}

.share-btn--telegram {
  background: #177bb0;
}

.share-btn--linkedin {
  background: #0a66c2;
}

.share-btn--telecharger,
.share-btn--lien {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--panel-line);
}

.share-fallback {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(176, 173, 133, 0.18);
  border: 1px solid rgba(176, 173, 133, 0.5);
  font-size: 0.85rem;
  font-weight: 600;
}

.share-fallback a {
  color: var(--ne-chamois-light);
  font-weight: 800;
}

.share-hint {
  margin: 14px 0 0;
  font-size: 0.78rem;
  color: var(--on-bg-muted);
}

@media (max-width: 760px) {
  .share-panel {
    grid-template-columns: 1fr;
  }

  .share-preview {
    max-width: 320px;
    width: 100%;
    margin: 0 auto;
  }
}

/* ===== #ilsepassequelquechose : la vraie dynamique de Lisnard ===== */
.wrap--phen {
  padding-top: 0;
}

.wrap--phen-end {
  margin: 0 0 20px;
}

.phen {
  /* Jetons des graphiques : surface claire, une couleur mise en avant, le reste en gris */
  --phen-surface: #fcfcfb;
  --phen-ink: #0b0b0b;
  --phen-ink-2: #52514e;
  --phen-muted: #898781;
  --phen-grid: #e1e0d9;
  --phen-axis: #c3c2b7;
  --phen-accent: #2a78d6;
  --phen-other: #898781;
  position: relative;
  font-family: "Montserrat", Arial, sans-serif;
  color: #ffffff;
}

.phen-head {
  text-align: center;
  margin: 8px 0 22px;
}

.phen-kicker {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ne-chamois);
}

.phen-hashtag {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 6vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  overflow-wrap: anywhere;
  background: linear-gradient(90deg, #ffffff, var(--ne-chamois), #ffffff, var(--ne-chamois));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: phen-shimmer 6s linear infinite;
}

@keyframes phen-shimmer {
  to {
    background-position: -300% 0;
  }
}

.phen-lead {
  max-width: 40em;
  margin: 0 auto;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

.phen a {
  color: inherit;
}

.phen-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.phen-kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border-radius: 18px;
  background: var(--phen-surface);
  color: var(--phen-ink);
}

.phen-kpi-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--phen-ink-2);
}

.phen-kpi-val {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--ne-blue);
}

.phen-kpi-delta {
  font-size: 0.85rem;
  font-weight: 800;
  color: #006300;
}

.phen-kpi-note {
  font-size: 0.75rem;
  color: var(--phen-ink-2);
}

.phen-kpi-note a,
.phen-card-sous a {
  color: var(--phen-muted);
  font-size: 0.7rem;
  text-decoration: none;
  margin-left: 2px;
}

.phen-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.phen-card {
  margin: 0;
  padding: 18px 18px 12px;
  border-radius: 18px;
  background: var(--phen-surface);
  color: var(--phen-ink);
}

.phen-card--wide {
  grid-column: 1 / -1;
}

.phen-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}

.phen-card-titre {
  font-size: 1rem;
  font-weight: 800;
}

.phen-card-sous {
  font-size: 0.8rem;
  color: var(--phen-ink-2);
}

.phen-legend {
  display: flex;
  gap: 16px;
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--phen-ink-2);
}

.phen-legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.phen-key {
  display: inline-block;
  width: 16px;
  height: 3px;
  border-radius: 2px;
}

.phen-key--accent {
  background: var(--phen-accent);
}

.phen-key--other {
  background: var(--phen-other);
}

.phen-plot {
  min-height: 140px;
}

.phen-plot svg {
  display: block;
  overflow: visible;
}

.phen svg .phen-gridline {
  stroke: var(--phen-grid);
  stroke-width: 1;
}

.phen svg .phen-axis {
  stroke: var(--phen-axis);
  stroke-width: 1;
}

.phen svg .phen-tick {
  fill: var(--phen-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.phen svg .phen-line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.phen svg .phen-line--accent {
  stroke: var(--phen-accent);
}

.phen svg .phen-line--other {
  stroke: var(--phen-other);
}

.phen svg .phen-area--accent {
  fill: var(--phen-accent);
  fill-opacity: 0.1;
}

.phen svg .phen-dot {
  stroke: var(--phen-surface);
  stroke-width: 2;
}

.phen svg .phen-dot--accent {
  fill: var(--phen-accent);
}

.phen svg .phen-dot--other {
  fill: var(--phen-other);
}

.phen svg .phen-bar--accent {
  fill: var(--phen-accent);
}

.phen svg .phen-bar--other {
  fill: var(--phen-other);
}

.phen svg .phen-hit-area {
  fill: transparent;
}

.phen svg .phen-hit {
  cursor: pointer;
  outline: none;
}

.phen svg .phen-hit:hover .phen-dot,
.phen svg .phen-hit:focus .phen-dot {
  r: 7;
}

.phen svg .phen-hit:hover .phen-bar,
.phen svg .phen-hit:focus .phen-bar {
  opacity: 0.85;
}

.phen svg .phen-hit:focus-visible .phen-hit-area {
  stroke: var(--phen-accent);
  stroke-width: 2;
}

.phen svg .phen-end {
  fill: var(--phen-ink-2);
  font-size: 12px;
  font-weight: 700;
}

.phen svg .phen-end--accent {
  fill: var(--phen-ink);
  font-weight: 800;
}

.phen svg .phen-cat {
  fill: var(--phen-ink-2);
  font-size: 12px;
  font-weight: 600;
}

.phen svg .phen-cat--accent {
  fill: var(--phen-ink);
  font-weight: 800;
}

.phen svg .phen-target {
  stroke: var(--phen-ink-2);
  stroke-width: 1;
  stroke-dasharray: 5 4;
}

.phen svg .phen-target-label {
  fill: var(--phen-ink-2);
  font-size: 11px;
  font-weight: 700;
}

.phen-table {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--phen-ink-2);
}

.phen-table summary {
  cursor: pointer;
  font-weight: 600;
}

.phen-table table {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.phen-table th,
.phen-table td {
  padding: 5px 6px;
  border-bottom: 1px solid var(--phen-grid);
  text-align: left;
}

.phen-cta {
  margin: 18px 0 10px;
  text-align: center;
}

.phen-cta p {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 800;
}

.phen-sources {
  max-width: 820px;
  margin: 10px auto 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
}

.phen-sources summary {
  cursor: pointer;
  text-align: center;
  font-weight: 700;
}

.phen-sources ol {
  padding-left: 22px;
}

.phen-sources li {
  margin-bottom: 4px;
}

.phen-tip {
  position: absolute;
  z-index: 10;
  max-width: 260px;
  padding: 7px 11px;
  border-radius: 10px;
  background: #0b0b0b;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  pointer-events: none;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.6);
}

@media (max-width: 960px) {
  .phen-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .phen-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .phen-kpi-val {
    font-size: 1.6rem;
  }

  .phen-kpi {
    padding: 13px;
  }
}

/* ===== Pied de page, toast ===== */
.disclaimer {
  padding: 24px 16px 32px;
  text-align: center;
}

.disclaimer p {
  max-width: 760px;
  margin: 0 auto;
  font-size: 0.74rem;
  color: var(--on-bg-muted);
  font-family: "Montserrat", Arial, sans-serif;
}

.disclaimer .credits {
  max-width: 760px;
  margin: 10px auto 0;
  font-size: 0.7rem;
  color: var(--on-bg-muted);
  font-family: "Montserrat", Arial, sans-serif;
}

.credits summary {
  cursor: pointer;
}

.credits ul {
  display: grid;
  gap: 2px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.disclaimer a {
  color: inherit;
}

/* Confettis de fin de partie */
.confetti {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow: hidden;
  pointer-events: none;
}

.confetti i {
  position: absolute;
  top: -20px;
  left: var(--l);
  width: var(--w);
  height: calc(var(--w) * 0.45);
  background: var(--c);
  border-radius: 2px;
  animation: fall var(--d) cubic-bezier(0.3, 0.6, 0.4, 1) var(--delay) forwards;
}

@keyframes fall {
  to {
    translate: var(--dx) 110vh;
    rotate: var(--r);
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  padding: 12px 18px;
  border-radius: 999px;
  background: #ffffff;
  color: #171b3e;
  font-weight: 700;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .home {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .home-visual {
    min-height: 480px;
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
  }

  .hero-photo {
    width: 280px;
    margin: 0 auto;
  }

  .hero-halo {
    right: 50%;
    width: 380px;
    height: 380px;
    translate: 50% -50%;
  }

  .ne-panel {
    grid-template-columns: 1fr;
  }

  .ne-side {
    margin: 0 auto calc(-1 * clamp(22px, 4vw, 36px));
    max-width: 280px;
  }

  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lifelog {
    height: 46vh;
  }

  .end-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .pres-card.is-featured {
    grid-template-columns: 1fr;
  }

  .is-featured .pres-mesures {
    grid-column: 1;
    grid-row: auto;
  }

  .home-ctas .btn {
    width: 100%;
  }

  .home {
    gap: 20px;
    padding-top: 20px;
  }

  .home-visual {
    order: -1;
    min-height: 0;
  }

  .hero-photo {
    width: 200px;
  }

  .hero-halo {
    width: 300px;
    height: 300px;
  }

  .preview-card {
    display: none;
  }

  .hero-photo figcaption {
    display: none;
  }

  .preview-badge {
    left: 0;
    top: auto;
    bottom: 0;
    padding: 10px 14px;
  }

  .preview-grade {
    font-size: 1.8rem;
  }

  .hero-chip {
    right: 0;
    top: auto;
    bottom: 64px;
    font-size: 0.78rem;
  }

  .hero-chip--2 {
    right: 6px;
    top: 18px;
    bottom: auto;
  }

  .pres-photo {
    height: 64%;
    opacity: 0.45;
  }

  .pres-card.is-featured {
    padding-right: 30px;
  }

  .rank-row {
    grid-template-columns: 22px minmax(0, 1fr) 48px;
    gap: 4px 10px;
  }

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

  .btn-xl {
    width: 100%;
    padding: 16px 18px;
    font-size: 1.05rem;
  }

  .rank-bar {
    grid-column: 2 / -1;
    grid-row: 2;
  }

  .tomb {
    border-radius: 100px 100px 24px 24px;
  }

  .stats {
    gap: 6px;
  }

  .stat {
    padding: 8px 9px;
  }

  .stat-top {
    font-size: 0.68rem;
  }

  .stat--money .stat-val {
    font-size: 0.82rem;
  }

  .lifelog {
    height: max(240px, calc(100svh - 520px));
    padding: 0 12px 10px;
  }

  .lifelog--recap {
    height: auto;
  }

  .speed-label {
    display: none;
  }

  .speed {
    margin-bottom: 8px;
  }

  .controls {
    padding-top: 8px;
  }

  .dock {
    gap: 6px;
  }

  .dock-btn {
    padding: 8px 2px;
    font-size: 0.68rem;
  }

  .dock-ico {
    font-size: 1.3rem;
  }

  .age-btn {
    width: 76px;
    height: 76px;
  }

  .age-btn span {
    font-size: 1.5rem;
  }

  .hud-pres {
    font-size: 0.78rem;
  }
}

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