/* Bruyère Idle : jetons de la charte, repris de la maquette de l’atelier (eux-mêmes repris de playbruyere.com). */
:root {
  --nuit: #141019;
  --nuit-2: #1c1624;
  --panneau: rgba(30, 24, 40, .92);
  --panneau-2: #251d31;
  --ligne: rgba(255, 235, 200, .14);
  --ligne-forte: rgba(255, 235, 200, .26);
  --or: #d9a441;
  --or-clair: #f0c060;
  --or-vif: #ffd54a;
  --bruyere: #c86fb4;
  --bruyere-sombre: #4a2546;
  --encre: #f3ead7;
  --encre-2: #b9ad97;
  --encre-3: #7d7364;
  --vie: #e0605a;
  --vie-sombre: #3d1a1c;
  --ok: #7dff9a;
  --ok-sombre: #173a24;
  --titre: Georgia, "DejaVu Serif", serif;
  --texte: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --jauge-xp: linear-gradient(90deg, #a8558f 0%, #c86fb4 55%, #e7a3d6 100%);
  --jauge-or: linear-gradient(90deg, #b5832c 0%, #d9a441 60%, #ffd54a 100%);
  --rayon: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--nuit); color: var(--encre); font-family: var(--texte); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; text-align: inherit; }
img { display: block; }

/* --- Écran de téléphone 390 × 844 --- */
.tel { width: 390px; height: 844px; overflow: hidden; position: relative; display: flex; flex-direction: column;
  background: radial-gradient(120% 60% at 50% 0%, #2e2340 0%, var(--nuit) 60%); }
.barre-etat { height: 44px; padding: 14px 24px 0; display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; flex-shrink: 0; }
.entete { padding: 6px 18px 10px; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.entete h1 { font-family: var(--titre); font-size: 24px; font-weight: 700; color: var(--or); flex: 1; line-height: 1.1; }
.entete .sous { display: block; font-family: var(--texte); font-size: 12px; color: var(--encre-2); font-weight: 500; margin-top: 2px; }
.retour { width: 36px; height: 36px; border-radius: 50%; background: var(--panneau-2); border: 1px solid var(--ligne); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.contenu { flex: 1; padding: 2px 16px 12px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.bas { padding: 10px 16px 12px; flex-shrink: 0; }

/* --- Barre d'onglets du bas --- */
.onglets { height: 78px; padding: 8px 8px 22px; display: flex; flex-shrink: 0; background: rgba(20, 16, 25, .96); border-top: 1px solid var(--ligne); }
.onglets button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--encre-3); text-align: center; }
.onglets button .i { font-size: 21px; filter: grayscale(.6); opacity: .8; }
.onglets button.actif { color: var(--or); }
.onglets button.actif .i { filter: none; opacity: 1; }

/* --- Cartes et lignes --- */
.carte { background: var(--panneau); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 14px; }
.carte-or { border-color: rgba(217, 164, 65, .55); box-shadow: 0 0 0 1px rgba(217, 164, 65, .15), 0 8px 24px rgba(0, 0, 0, .35); }
.titre-section { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--encre-3); }
.ligne { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ligne); }
.ligne:last-child { border-bottom: 0; }
.ic { width: 40px; height: 40px; border-radius: 11px; background: var(--panneau-2); border: 1px solid var(--ligne); display: grid; place-items: center; font-size: 21px; flex-shrink: 0; }
.tx { flex: 1; min-width: 0; }
.tx b { display: block; font-size: 15px; font-weight: 650; }
.tx span { display: block; font-size: 12.5px; color: var(--encre-2); }
.petit { font-size: 12.5px; color: var(--encre-2); line-height: 1.45; }
.or { color: var(--or); }
.chiffre { font-variant-numeric: tabular-nums; }

/* --- Boutons --- */
.btn { height: 52px; border-radius: 12px; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.btn-principal { background: linear-gradient(180deg, var(--or-clair), var(--or)); color: #2a1c05; box-shadow: 0 6px 18px rgba(217, 164, 65, .28); }
.btn-second { background: var(--panneau-2); border: 1px solid var(--ligne-forte); color: var(--encre); }
.btn-petit { height: 34px; padding: 0 14px; width: auto; font-size: 13px; border-radius: 9px; }

/* --- Pastilles --- */
.pastille { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.p-or { background: rgba(217, 164, 65, .16); color: var(--or-clair); }
.p-bruyere { background: var(--bruyere-sombre); color: #f2b8e3; }
.p-ok { background: var(--ok-sombre); color: var(--ok); }
.p-gris { background: rgba(255, 255, 255, .06); color: var(--encre-3); }
.p-vie { background: var(--vie-sombre); color: #ff9a92; }

/* --- Jauges --- */
.jauge { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.jauge > i { display: block; height: 100%; border-radius: 99px; background: var(--jauge-xp); }
.jauge.or > i { background: var(--jauge-or); }
.jauge.vie > i { background: linear-gradient(90deg, #b8403b, #e0605a); }
.jauge.fine { height: 5px; }
.jauge.anim > i { animation: avance 4s linear infinite; }
@keyframes avance { from { width: 6%; } to { width: 100%; } }

/* --- Tuiles d'objets --- */
.tuiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tuile { aspect-ratio: 1; border-radius: 11px; background: var(--panneau-2); border: 1px solid var(--ligne); position: relative; display: grid; place-items: center; font-size: 28px; }
.tuile b { position: absolute; right: 5px; bottom: 3px; font-size: 11.5px; font-weight: 800; color: var(--encre); text-shadow: 0 1px 2px #000; font-variant-numeric: tabular-nums; }
.tuile.rare { border-color: rgba(200, 111, 180, .7); box-shadow: inset 0 0 14px rgba(200, 111, 180, .25); }
.tuile.legende { border-color: rgba(255, 213, 74, .8); box-shadow: inset 0 0 14px rgba(255, 213, 74, .25); }

/* --- Portraits des habitants (captures du jeu) --- */
.portrait { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; object-position: 50% 30%; border: 1px solid var(--ligne-forte); flex-shrink: 0; background: #2a2035; }
.verrou { opacity: .45; }

/* --- Pages d'étapes (1200 px) --- */
.page { width: 1200px; min-height: 800px; padding: 56px 64px; background: radial-gradient(90% 50% at 50% 0%, #2a2038 0%, var(--nuit) 70%); }
.page h1 { font-family: var(--titre); color: var(--or); font-size: 44px; margin-bottom: 6px; }
.page h2 { font-family: var(--titre); color: var(--or-clair); font-size: 24px; margin: 34px 0 12px; }
.page h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.page p, .page li { font-size: 15px; line-height: 1.6; color: var(--encre); }
.page .chapo { font-size: 18px; color: var(--encre-2); max-width: 820px; }
.page ul { padding-left: 20px; }
.colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.colonnes-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.contenu > * { flex-shrink: 0; }
