
/* ============================================
   L'ÉCART DES SIÈCLES
   IDENTITÉ VISUELLE — VERSION 1.0
   Décor fixe + panneaux au premier plan
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;

  --paper: #e8e2d8;
  --paper-deep: #d8d0c4;
  --surface: #f8f6f1;
  --surface-soft: #f0ece5;

  --ink: #252725;
  --ink-soft: #605e58;
  --line: #d4cabe;

  --orange: #ee874c;
  --orange-hover: #dc7340;

  --shadow: 0 20px 55px rgba(43, 35, 26, .12);
  --radius: 19px;
}

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

html {
  scroll-behavior: smooth;
}

html body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;

  font-family: "DM Sans", sans-serif;
  color: var(--ink);

  background: var(--paper) !important;
}

button,
input {
  font: inherit;
}

button:not(:disabled) {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.hidden {
  display: none !important;
}

/* ============================================
   COUCHE 1 : DÉCOR FIXE
   ============================================ */

/* Une texture extrêmement légère.
   Aucune image téléchargée.
   Le décor ne défile pas avec le menu. */

html body::before {
  content: "";
  position: fixed;
  inset: 0;

  pointer-events: none;
  z-index: 0;

  background:
    radial-gradient(
      ellipse at 12% 20%,
      rgba(164, 133, 93, .12),
      transparent 38%
    ),
    radial-gradient(
      ellipse at 90% 80%,
      rgba(104, 103, 99, .09),
      transparent 42%
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      transparent 79px,
      rgba(70, 61, 49, .025) 80px
    );

  opacity: .95;
}

/* Graduations rappelant une échelle temporelle.
   Elles restent fixes sur les côtés. */

html body::after {
  content: "";
  position: fixed;
  inset: 0;

  pointer-events: none;
  z-index: 0;

  background-image:
    repeating-linear-gradient(
      to bottom,
      rgba(95, 77, 57, .25) 0px,
      rgba(95, 77, 57, .25) 1px,
      transparent 1px,
      transparent 26px
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(95, 77, 57, .25) 0px,
      rgba(95, 77, 57, .25) 1px,
      transparent 1px,
      transparent 26px
    );

  background-size:
    18px 100%,
    18px 100%;

  background-position:
    left 14px top,
    right 14px top;

  background-repeat: no-repeat;

  opacity: .55;
}

/* ============================================
   COUCHE 2 : SITE AU PREMIER PLAN
   ============================================ */

.app {
  position: relative;
  z-index: 1;

  width: min(1100px, calc(100% - 44px));
  max-width: 1100px;

  margin: 0 auto;
  padding-bottom: 40px;
}

/* ============================================
   EN-TÊTE ET SABLIER
   ============================================ */

.app .topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;

  padding: 23px 4px;
  margin-bottom: 17px;

  border-bottom: 1px solid #c4b9ab;
}

.app .brand {
  display: flex;
  align-items: center;
  gap: 13px;

  font-family: "Space Grotesk", sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.5px;

  color: var(--ink);
}

/* Logo sablier noir sur orange */

.app .brand-icon {
  position: relative;

  display: grid;
  place-items: center;

  width: 52px;
  height: 52px;
  min-width: 52px;

  background: var(--orange);
  color: transparent;

  font-size: 0;
  line-height: 0;

  border-radius: 13px;
  box-shadow: 3px 3px 0 #252725;
}

.app .brand-icon::before {
  content: "";

  width: 27px;
  height: 35px;

  background: #222422;

  clip-path: polygon(
    0 0,
    100% 0,
    100% 12%,
    59% 50%,
    100% 88%,
    100% 100%,
    0 100%,
    0 88%,
    41% 50%,
    0 12%
  );
}

.app .brand-icon::after {
  content: "";

  position: absolute;

  width: 22px;
  height: 3px;

  background: var(--orange);
  border-radius: 3px;
}

.app .version {
  color: #796d61;
  font-size: 11px;
  font-weight: 700;

  background: #f6f0e6;
  border: 1px solid #d1c6b8;

  border-radius: 100px;
  padding: 7px 12px;
}

/* ============================================
   BANNIÈRE PRINCIPALE
   ============================================ */

.app .intro {
  position: relative;
  overflow: hidden;

  min-height: 275px;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;

  padding: 42px;
  margin: 12px 0 25px;

  background: #292b29;
  color: #f8f6f0;

  border: 1px solid #373936;
  border-radius: 23px;

  box-shadow: var(--shadow);
}

/* Des graduations sur la droite.
   Pas de roue, pas de rotation. */

.app .intro::before {
  content: "";

  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;

  width: 33%;

  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 23px,
    rgba(238, 135, 76, .17) 24px,
    transparent 25px
  );

  transform: skewX(-15deg);
  pointer-events: none;
}

.app .intro::after {
  content: "1500 av. J.-C.  →  2026";

  position: absolute;
  right: 35px;
  bottom: 28px;

  color: #d39c75;

  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}

.app .intro .eyebrow {
  position: relative;
  z-index: 1;

  color: #e6a879;

  background: transparent;
  border: 0;

  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

.app .intro .eyebrow::before {
  display: none;
}

.app .intro h1 {
  position: relative;
  z-index: 1;

  max-width: 690px;
  margin: 16px 0;

  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(33px, 5vw, 57px);
  line-height: 1.09;
  font-weight: 700;
  letter-spacing: -2px;

  text-align: left;
  color: #f8f6f0;
}

.app .intro h1 em {
  display: inline;
  font-style: normal;

  color: #f09a63;
  -webkit-text-fill-color: #f09a63;

  background: none;
  transform: none;
}

.app .intro p {
  position: relative;
  z-index: 1;

  max-width: 550px;

  margin: 0;

  color: #dbd8d0;
  font-size: 14px;
  line-height: 1.75;
  text-align: left;
}

/* ============================================
   MENU PRINCIPAL
   ============================================ */

.app #menuPrincipal {
  margin: 24px 0 35px;
  padding: 32px;

  background: var(--surface);
  color: var(--ink);

  border: 1px solid #d4c9bb;
  border-radius: 23px;

  box-shadow: var(--shadow);
}

.app #menuPrincipal .mode-kicker {
  color: #b96e42;

  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

.app #menuPrincipal .mode-heading {
  margin: 11px 0 8px;

  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 4vw, 38px);

  letter-spacing: -1px;

  color: var(--ink);
}

.app #menuPrincipal .mode-desc {
  max-width: 580px;
  margin: 0 auto 28px;

  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.app #menuPrincipal .mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

/* Chaque époque possède sa propre matière
   et sa propre couleur d'ambiance. */

.app #menuPrincipal .mode-choice[data-mode="tous"] {
  --period: #e58a50;
  --period-text: #3e2a20;
  --period-surface: #f0e3d4;
}

.app #menuPrincipal .mode-choice[data-mode="antiquite"] {
  --period: #c59667;
  --period-text: #3a281d;
  --period-surface: #eee0cd;
}

.app #menuPrincipal .mode-choice[data-mode="medieval"] {
  --period: #79593e;
  --period-text: #493424;
  --period-surface: #e5d9ca;
}

.app #menuPrincipal .mode-choice[data-mode="moderne"] {
  --period: #855047;
  --period-text: #532f30;
  --period-surface: #eadbd4;
}

.app #menuPrincipal .mode-choice[data-mode="xix"] {
  --period: #aa9170;
  --period-text: #534737;
  --period-surface: #e8dfcf;
}

.app #menuPrincipal .mode-choice[data-mode="xx"] {
  --period: #777e75;
  --period-text: #3c4742;
  --period-surface: #e2e3de;
}

.app #menuPrincipal .mode-choice[data-mode="actuel"] {
  --period: #535353;
  --period-text: #282828;
  --period-surface: #e9e9e7;
}

.app #menuPrincipal .mode-choice {
  position: relative;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  align-items: flex-start;

  min-height: 166px;
  padding: 19px;

  background: var(--period-surface, #eee9e2);
  border: 1px solid #cfc6ba;
  border-radius: 14px;

  text-align: left;

  box-shadow: none;

  transition:
    transform .18s ease,
    box-shadow .18s ease;
}

.app #menuPrincipal .mode-choice::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;

  width: 6px;
  background: var(--period, var(--orange));
}

.app #menuPrincipal .mode-choice:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px #29251f20;
}

.app #menuPrincipal .mode-choice.is-selected {
  border: 2px solid var(--period, var(--orange));
  box-shadow:
    0 0 0 2px rgba(30, 30, 30, .07),
    0 8px 20px #29251f19;
}

.app #menuPrincipal .mode-choice.all {
  grid-column: 1 / -1;
  min-height: 132px;
}

.app #menuPrincipal .mode-choice.all::after {
  content: "";
  position: absolute;

  top: 0;
  right: 0;
  bottom: 0;

  width: 40%;

  opacity: .27;

  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 18px,
    #ac7954 19px,
    transparent 20px
  );

  pointer-events: none;
}

.app #menuPrincipal .mode-icon {
  display: grid;
  place-items: center;

  width: 44px;
  height: 44px;

  padding: 0;
  margin-bottom: 13px;

  border-radius: 10px;
  background: rgba(255, 255, 255, .48);

  font-size: 23px;
}

.app #menuPrincipal .mode-name {
  margin-bottom: 6px;

  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
  font-weight: 700;

  color: var(--period-text, var(--ink));
}

.app #menuPrincipal .mode-info {
  color: #605950;
  font-size: 12px;
  line-height: 1.6;
}

.app #menuPrincipal .mode-count {
  margin-top: auto;
  padding-top: 13px;

  color: var(--period-text, var(--ink));
  font-size: 11px;
  font-weight: 800;
}

.app #menuPrincipal .mode-bottom {
  margin-top: 26px;
  padding-top: 24px;

  border-top: 1px solid #d5ccbf;
}

.app #menuPrincipal .mode-bottom-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.app #menuPrincipal .round-options {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;

  gap: 9px;
  margin: 17px 0 21px;
}

.app #menuPrincipal .round-choice {
  padding: 11px 20px;

  color: #48433c;
  background: #ede8df;

  border: 1px solid #d1c7ba;
  border-radius: 9px;

  font-weight: 700;
}

.app #menuPrincipal .round-choice.active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

.app #menuPrincipal .start-button {
  width: 100%;
  min-height: 57px;

  padding: 14px;

  background: var(--orange);
  color: #231f1b;

  border: 1px solid #d57d49;
  border-radius: 11px;

  font-weight: 800;
  font-size: 14px;

  box-shadow: 0 4px 0 #aa633d;
}

.app #menuPrincipal .start-button:hover {
  background: #f49a62;
}

.app #menuPrincipal .start-button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #aa633d;
}

/* ============================================
   LE PANNEAU DE JEU
   ============================================ */

.app .game-panel {
  width: 100%;
  max-width: 1050px;

  margin: 20px auto 33px;
  padding: 29px;

  background: var(--surface);
  color: var(--ink);

  border: 1px solid #d4c9bb;
  border-radius: 22px;

  box-shadow: var(--shadow);
}

.app .session-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  flex-wrap: wrap;

  padding-bottom: 18px;
  margin-bottom: 22px;

  border-bottom: 1px solid var(--line);
}

.app .session-mode {
  color: #916344;
  font-size: 13px;
  font-weight: 800;
}

.app .session-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.app .mini-action {
  padding: 9px 13px;

  background: #eae5dd;
  color: var(--ink);

  border: 1px solid #cfc4b6;
  border-radius: 9px;

  font-size: 12px;
  font-weight: 800;
}

.app .mini-action:hover {
  background: #e0d6c8;
}

.app .stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;

  margin-bottom: 14px;
}

.app .stats > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app .stat-label {
  display: block;

  color: #777067;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
}

.app .stats strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 28px;
  font-weight: 700;

  color: var(--ink);
}

.app .score-box {
  text-align: right;
}

.app .score-box strong {
  color: #bf713e;
}

.app .progress-track {
  width: 100%;
  height: 8px;

  margin-bottom: 31px;

  background: #e0d8ce;
  border-radius: 100px;
  overflow: hidden;
}

.app .progress-fill {
  width: 0%;
  height: 100%;

  background: var(--orange);
  border-radius: inherit;

  transition: width .35s ease;
}

.app .question {
  margin-bottom: 25px;

  text-align: center;
  color: var(--ink);

  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.3;
}

/* ============================================
   PERSONNAGES
   ============================================ */

.app .characters {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr) 46px minmax(0, 1fr);

  align-items: center;
  gap: 10px;

  margin-bottom: 21px;
}

.app .character {
  display: flex;
  flex-direction: column;

  min-width: 0;
  height: 100%;

  padding: 14px;

  background: #f1ede6;
  border: 1px solid #d6cbbe;
  border-radius: 17px;

  text-align: center;
}

.app .character:first-child {
  border-top: 4px solid #a98660;
}

.app .character:last-child {
  border-top: 4px solid #777976;
}

.app .portrait {
  position: relative;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: clamp(155px, 21vw, 235px);

  border-radius: 11px;
}

.app .portrait-a {
  background: #bd9a76;
}

.app .portrait-b {
  background: #b3b2ac;
}

.app .portrait > span {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(67px, 11vw, 110px);
  font-weight: 700;

  color: #ffffffd9;
}

.app .portrait-decoration {
  position: absolute;
  right: -10%;
  top: 10%;

  width: 65%;
  aspect-ratio: 1;

  border: 13px solid #ffffff2c;
  border-radius: 50%;

  pointer-events: none;
}

.app .portrait img {
  display: block;
  max-width: 100%;
}

.app .portrait-credit {
  position: absolute;
  z-index: 20;

  left: 6px;
  right: 6px;
  bottom: 6px;

  padding: 5px 7px;

  background: #242424d9;
  color: white;

  border-radius: 6px;

  font-size: 9px;
  text-decoration: none;
}

.app .character h2 {
  margin: 16px 0 5px;

  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(15px, 2vw, 21px);
  font-weight: 700;
  line-height: 1.3;

  color: var(--ink);
  overflow-wrap: anywhere;
}

.app .character p {
  margin: 0 0 15px;

  color: #77716a;
  font-size: 12px;
}

.app .versus {
  display: grid;
  place-items: center;

  width: 46px;
  height: 46px;
  margin: 0;

  background: var(--orange);
  color: #28241e;

  border: 2px solid #28241e;
  border-radius: 50%;

  font-size: 14px;
  font-weight: 800;

  z-index: 2;
}

.app .birth {
  display: flex;
  flex-direction: column;

  margin-top: auto;
  padding: 12px 7px;

  background: #e6ded2;
  border: 1px solid #d6cbbd;
  border-radius: 9px;
}

.app .birth span {
  color: #746c62;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
}

.app .birth strong {
  color: var(--ink);

  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
  font-weight: 700;
}

/* ============================================
   ESTIMATION
   ============================================ */

.app .controls {
  padding: 25px;

  background: #eeebe4;
  border: 1px solid #ddd3c7;
  border-radius: 15px;

  text-align: center;
}

.app .estimate-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;

  margin: 15px 0 21px;
}

.app #guess {
  width: min(220px, 53%);
  min-width: 100px;

  border: 0;
  border-bottom: 3px solid var(--orange);

  border-radius: 0;
  background: transparent;

  color: var(--ink);
  text-align: center;

  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(37px, 7vw, 64px);
  font-weight: 700;
}

.app .estimate-display span {
  color: #826d5d;
  font-size: 12px;
  font-weight: 800;
}

.app #range {
  width: 100%;
  margin: 14px 0 7px;

  accent-color: var(--orange);
  cursor: pointer;
}

.app .range-labels {
  display: flex;
  justify-content: space-between;

  margin-bottom: 22px;

  color: #77716a;
  font-size: 11px;
  font-weight: 700;
}

.app .btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;

  width: 100%;
  min-height: 56px;

  padding: 14px 18px;

  border: 0;
  border-radius: 10px;

  font-size: 14px;
  font-weight: 800;

  transition:
    background .15s ease,
    transform .15s ease;
}

.app .btn-primary {
  background: var(--orange);
  color: #28231e;

  box-shadow: 0 4px 0 #a95f37;
}

.app .btn-primary:hover:not(:disabled) {
  background: #f39a61;
}

.app .btn-primary:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #a95f37;
}

.app .btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

/* ============================================
   RÉSULTAT
   ============================================ */

.app .answer {
  margin-top: 24px;
  padding-top: 23px;

  border-top: 1px solid #d2c8bd;
}

.app .true-gap {
  margin: 14px 0;

  color: #c26d3b;

  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(37px, 7vw, 59px);
  font-weight: 700;
}

.app #answerDetail {
  color: #615c54;
  font-size: 14px;
  line-height: 1.6;
}

.app .earned {
  display: inline-block;

  margin: 10px 0;
  padding: 9px 14px;

  background: #e3efdf;
  color: #35603c;

  border: 1px solid #b5d0b2;
  border-radius: 100px;

  font-weight: 800;
}

.app .sources {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;

  margin: 15px 0;
}

.app .sources a {
  color: #765136;
  font-size: 11px;
}

.app #next {
  margin-top: 12px;
}

/* ============================================
   FRISE CHRONOLOGIQUE
   ============================================ */

.app .history-timeline {
  margin: 23px 0;
  padding: 25px 17px;

  background: #302f2d;
  color: #f6f0e6;

  border: 1px solid #403b35;
  border-radius: 15px;
}

.app .ht-title {
  color: #e9ae80;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;

  text-align: center;
}

.app .ht-counter {
  margin: 17px 0;

  color: #f0aa78;

  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(36px, 7vw, 60px);
  font-weight: 700;
  text-align: center;
}

.app .ht-counter small {
  font-size: 14px;
}

.app .ht-status {
  color: #d2c9bd;
  font-size: 12px;
  text-align: center;
}

.app .ht-chart {
  padding: 0 15px;
  margin-top: 18px;
}

.app .ht-track {
  position: relative;
  height: 110px;
}

.app .ht-line,
.app .ht-gap {
  position: absolute;
  top: 47px;

  height: 6px;
  border-radius: 10px;
}

.app .ht-line {
  left: 0;
  right: 0;

  background: #77736d;
}

.app .ht-gap {
  background: #f0a36e;
  box-shadow: 0 0 10px #f0a36e55;
}

.app .ht-dot {
  position: absolute;
  z-index: 5;

  display: grid;
  place-items: center;

  width: 28px;
  height: 28px;

  transform: translateX(-50%);

  border: 3px solid white;
  border-radius: 50%;

  font-size: 12px;
  font-weight: 900;
}

.app .ht-dot-a {
  top: 6px;
  color: #fff;
  background: #9a6748;
}

.app .ht-dot-b {
  top: 65px;
  color: #292929;
  background: #e3d6c2;
}

.app .ht-dot-a::after {
  background: #9a6748;
}

.app .ht-dot-b::before {
  background: #e3d6c2;
}

.app .ht-ticks {
  position: relative;
  height: 36px;
}

.app .ht-tick {
  position: absolute;
  top: 0;

  color: #c9c1b8;

  font-size: 10px;
  white-space: nowrap;
  transform: translateX(-50%);
}

.app .ht-tick:first-child {
  transform: none;
}

.app .ht-tick:last-child {
  transform: translateX(-100%);
}

.app .ht-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;

  margin-top: 18px;
}

.app .ht-person {
  min-width: 0;
  padding: 14px;

  background: #41403d;

  border: 1px solid #58534d;
  border-radius: 10px;

  text-align: left;
}

.app .ht-name {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;

  overflow-wrap: anywhere;
}

.app .ht-date {
  display: block;
  margin-top: 11px;

  color: #f5eee4;
  font-size: 12px;
  line-height: 1.5;
}

.app .ht-note {
  margin-top: 17px;

  color: #c9bfb4;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

/* ============================================
   FICHES BIOGRAPHIQUES
   ============================================ */

.app .bios-section {
  margin-top: 25px;
  padding-top: 25px;

  border-top: 1px solid #d8cfc3;
}

.app .bios-heading {
  margin: 0 0 19px;

  color: var(--ink);

  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  font-weight: 700;

  text-align: center;
  letter-spacing: -.2px;
}

.app .bios-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.app .bio-card {
  display: flex;
  flex-direction: column;

  min-width: 0;
  padding: 20px;

  background: #f7f3ec;

  border: 1px solid #d9cebf;
  border-radius: 13px;

  text-align: left;
}

.app .bio-a {
  --bio-accent: #a98660;
  border-top: 4px solid #a98660;
}

.app .bio-b {
  --bio-accent: #777976;
  border-top: 4px solid #777976;
}

.app .bio-tag {
  color: #956f50;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;

  margin-bottom: 11px;
}

.app .bio-b .bio-tag {
  color: #5e6663;
}

.app .bio-name {
  margin: 0 0 7px;

  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;

  overflow-wrap: anywhere;
}

.app .bio-role {
  margin-bottom: 13px;

  color: #777067;
  font-size: 12px;
}

.app .bio-description {
  color: #494741;

  font-size: 13px;
  line-height: 1.75;

  flex: 1;
}

.app .bio-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;

  margin-top: 18px;
  padding-top: 13px;

  border-top: 1px solid #d8cfc2;
}

.app .bio-date {
  color: #706b63;
  font-size: 11px;
  font-weight: 700;
}

.app .bio-link,
.app .bio-b .bio-link {
  color: #9d5934;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.app .bio-link:hover {
  text-decoration: underline;
}

/* ============================================
   FIN DE PARTIE
   ============================================ */

.app .finish {
  max-width: 850px;

  margin: 24px auto;
  padding: 42px 25px;

  text-align: center;

  background: var(--surface);
  color: var(--ink);

  border: 1px solid #d4c9bb;
  border-radius: 22px;

  box-shadow: var(--shadow);
}

.app .finish-icon {
  display: block;
  font-size: 58px;
  margin-bottom: 10px;
}

.app .finish h2 {
  margin: 10px 0;

  color: var(--ink);

  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
}

.app .finish p {
  color: #777067;
}

.app .final-score {
  margin: 23px 0;

  color: #c26d3b;

  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(38px, 7vw, 65px);
  font-weight: 700;
}

.app .finish .btn {
  max-width: 480px;
  margin: 20px auto 0;
}

.app .end-actions {
  max-width: 480px;
  margin: 12px auto;
}

/* ============================================
   PIED DE PAGE
   ============================================ */

.app footer {
  padding: 25px 10px;

  text-align: center;
  color: #81786d;
  font-size: 12px;
}

/* ============================================
   ACCUEIL COMPACT DURANT UNE PARTIE
   ============================================ */

body:has(#game:not(.hidden)) .app .intro,
body:has(#finish:not(.hidden)) .app .intro {
  min-height: 140px;
  padding: 23px 29px;
}

body:has(#game:not(.hidden)) .app .intro h1,
body:has(#finish:not(.hidden)) .app .intro h1 {
  font-size: clamp(26px, 4vw, 39px);
  margin: 10px 0;
}

body:has(#game:not(.hidden)) .app .intro p,
body:has(#finish:not(.hidden)) .app .intro p {
  display: none;
}

/* ============================================
   TABLETTES
   ============================================ */

@media (max-width: 850px) {
  .app #menuPrincipal .mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app .intro {
    padding: 31px;
  }

  .app .game-panel {
    padding: 20px;
  }
}

/* ============================================
   TÉLÉPHONES
   ============================================ */

@media (max-width: 600px) {
  html body::after {
    display: none;
  }

  .app {
    width: calc(100% - 18px);
  }

  .app .topbar {
    padding: 13px 3px;
  }

  .app .brand {
    gap: 9px;
    font-size: 13px;
  }

  .app .brand-icon {
    width: 42px;
    min-width: 42px;
    height: 42px;
  }

  .app .brand-icon::before {
    width: 22px;
    height: 29px;
  }

  .app .version {
    font-size: 9px;
    padding: 6px;
  }

  .app .intro {
    min-height: 230px;
    padding: 25px 20px;

    border-radius: 16px;
  }

  .app .intro h1 {
    font-size: clamp(31px, 8vw, 42px);
    letter-spacing: -1.5px;
  }

  .app .intro p {
    font-size: 13px;
  }

  .app .intro::after {
    right: 18px;
    bottom: 12px;
    font-size: 9px;
  }

  .app #menuPrincipal {
    padding: 17px 12px;
    border-radius: 16px;
  }

  .app #menuPrincipal .mode-grid {
    gap: 9px;
  }

  .app #menuPrincipal .mode-choice {
    padding: 13px;
    min-height: 171px;
  }

  .app #menuPrincipal .mode-choice.all {
    min-height: 120px;
  }

  .app #menuPrincipal .mode-name {
    font-size: 14px;
  }

  .app #menuPrincipal .mode-info {
    font-size: 11px;
  }

  .app .game-panel {
    padding: 14px 10px;
    border-radius: 16px;
  }

  .app .session-toolbar {
    justify-content: center;
  }

  .app .question {
    font-size: 20px;
  }

  .app .characters {
    grid-template-columns:
      minmax(0, 1fr) 32px minmax(0, 1fr);

    gap: 4px;
  }

  .app .character {
    padding: 7px;
    border-radius: 11px;
  }

  .app .portrait {
    height: 143px;
    border-radius: 8px;
  }

  .app .character h2 {
    font-size: 13px;
  }

  .app .character p {
    font-size: 11px;
  }

  .app .versus {
    width: 33px;
    height: 33px;

    font-size: 11px;
  }

  .app .birth {
    padding: 8px 5px;
  }

  .app .birth strong {
    font-size: 16px;
  }

  .app .controls {
    padding: 16px 11px;
  }

  .app #guess {
    font-size: 44px;
  }

  .app .history-timeline {
    padding: 18px 10px;
  }

  .app .ht-chart {
    padding: 0 11px;
  }

  .app .ht-tick {
    font-size: 9px;
  }

  .app .ht-legend {
    gap: 7px;
  }

  .app .ht-person {
    padding: 9px;
  }

  .app .ht-name,
  .app .ht-date {
    font-size: 11px;
  }

  .app .bios-grid {
    grid-template-columns: 1fr;
  }

  .app .bio-card {
    padding: 17px;
  }

  body:has(#game:not(.hidden)) .app .intro,
  body:has(#finish:not(.hidden)) .app .intro {
    min-height: 115px;
    padding: 16px;
  }

  body:has(#game:not(.hidden)) .app .intro h1,
  body:has(#finish:not(.hidden)) .app .intro h1 {
    font-size: 25px;
  }

  body:has(#game:not(.hidden)) .app .intro::after,
  body:has(#finish:not(.hidden)) .app .intro::after {
    display: none;
  }
}

/* ============================================
   ACCESSIBILITÉ
   ============================================ */

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

/* ============================================
   BÊTA UNIFIÉE — COMPTE, LANGUE, INFORMATIONS
   ============================================ */
.header-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.language-label { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
#languageSelect { min-width: 65px; min-height: 41px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface); font: inherit; font-size: 13px; }
#accountButton { min-height: 41px; }
.guest-stats { width: 100%; margin: 16px 0 22px; padding: 13px 20px; display: flex; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 3px 10px #29251f12; }
.guest-stats span { display: inline-flex; align-items: baseline; gap: 8px; }
.guest-stats strong { color: #b96e42; font-family: 'Space Grotesk', sans-serif; font-size: 24px; }
.guest-stats small { font-size: 12px; color: var(--ink-soft); }
.record-feedback { color: #4b7b55 !important; font-weight: 700; }
.footer-links { margin-top: 12px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.footer-links button, .link-button { background: none; color: #88583b; border: 0; text-decoration: underline; cursor: pointer; padding: 5px; font: inherit; font-size: 12px; }
.eds-modal { width: min(540px, calc(100% - 26px)); max-height: min(90vh, 760px); padding: 23px; overflow: auto; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 25px 90px #0005; }
.eds-modal::backdrop { background: #161615aa; }
.modal-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.modal-heading h2 { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: 24px; }
.modal-close { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #e8e2da; color: var(--ink); font-size: 24px; cursor: pointer; }
.modal-subtitle { color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.notice { background: #fff2cc; color: #584822; padding: 13px; border-radius: 10px; font-size: 13px; line-height: 1.5; border: 1px solid #e8d6aa; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.auth-tabs button { padding: 11px; background: #eee7df; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 13px; font-weight: 700; }
.auth-tabs button.active { color: #26201c; background: var(--orange); border-color: #d67b44; }
.auth-form { display: grid; gap: 14px; margin-top: 17px; }
.auth-form label { display: grid; gap: 6px; font-size: 12px; font-weight: 800; }
.auth-form input { width: 100%; min-height: 46px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.auth-form .btn { margin-top: 2px; }
.auth-actions { display: grid; gap: 9px; }
.auth-actions button { width: 100%; text-align: center; }
.auth-actions .danger { color: #9b312c; border-color: #c89692; background: #fae8e6; }
#accountStatus { min-height: 1.2em; font-size: 13px; font-weight: 700; color: #6a5434; }
#infoContent { color: var(--ink-soft); line-height: 1.75; font-size: 14px; }
.eds-modal button:focus-visible, #languageSelect:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
@media (max-width: 600px) {
  .header-controls { gap: 6px; }
  .language-label { display: none; }
  #accountButton { padding: 8px; font-size: 11px; }
  .guest-stats { padding: 11px; }
  .guest-stats span { display: grid; gap: 0; }
  .guest-stats strong { font-size: 20px; }
  .guest-stats small { font-size: 10px; }
  .footer-links { gap: 6px; }
  .footer-links button { padding: 4px; }
  .eds-modal { padding: 15px; }
}

.app .ht-person:first-child .ht-name { color: #f2b281; }
.app .ht-person:last-child .ht-name { color: #f3e3ca; }

/* Connexion Google : bouton accessible sans ressource graphique tierce. */
.auth-separator { display: flex; align-items: center; gap: 13px; margin: 18px 0 13px; color: var(--ink-soft); font-size: 11px; font-weight: 800; text-align: center; }
.auth-separator::before, .auth-separator::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google-signin-button { display: flex; justify-content: center; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 10px 16px; border: 1px solid #cfc6ba; border-radius: 10px; background: #fff; color: #252725; font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }
.google-signin-button:hover:not(:disabled) { background: #f5f1eb; border-color: #968876; }
.google-signin-button:disabled { opacity: .55; cursor: wait; }
.google-signin-mark { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 1px solid #dedede; border-radius: 50%; color: #4285f4; font-family: Arial, sans-serif; font-size: 18px; font-weight: 900; }
