:root{--ground:#EEF3EA;--surface:#FAFCF8;--surface-sunk:#E1EADC;--line:#C4D2BF;--ink:#13241A;--ink-muted:#4C5F53;--forest:#1E4A33;--on-forest:#F3F8F1;--forest-deep:#0F2E1F;--fern:#2A6843;--sprout:#D3E8C6;--on-sprout:#173A26;--sprout-deep:#A9CF95;--sap:#3B8550;--ochre:#8A5A0E;--ochre-soft:#F5E8CD;--gold:#F2B33D;--on-gold:#13241A;--rarity-common:#8FAE98;--rarity-uncommon:var(--fern);--rarity-rare:var(--gold);--biome-foret:#CFE3C2;--biome-foret-ink:#2B5937;--biome-prairie:#E3EDB5;--biome-prairie-ink:#4F661B;--biome-eaux:#C9E2E6;--biome-eaux-ink:#1F5A64;--biome-marais:#DFDCBC;--biome-marais-ink:#5E5722;--biome-montagne:#DCDEDA;--biome-montagne-ink:#4F5651;--biome-littoral:#F0E4C9;--biome-littoral-ink:#7A5D22;--biome-mer:#C8D7EC;--biome-mer-ink:#2B4C80;--biome-ville:#F0DCD2;--biome-ville-ink:#8A4A33;--alert:#A3392B;--focus:#1E4A33;--uicn-ex:#1A1A1A;--uicn-ew:#542344;--uicn-cr:#D81E05;--uicn-en:#FC7F3F;--uicn-vu:#F9E814;--uicn-nt:#CCE226;--uicn-lc:#60C659;--uicn-dd:#D1D1C6;--uicn-on-dark:#FFFFFF;--uicn-on-light:#13241A;--shadow-card:0 2px 0 rgba(19,36,26,0.08), 0 10px 28px rgba(19,36,26,0.12);--shadow-pop:0 6px 0 rgba(19,36,26,0.10), 0 18px 40px rgba(19,36,26,0.18);--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:20px;--space-6:24px;--space-8:32px;--space-12:48px;--radius-sm:6px;--radius-md:14px;--radius-lg:24px;--radius-pill:999px;--font-display:"Fredoka", "Nunito", system-ui, sans-serif;--font-sans:"Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;--font-latin:"Newsreader", "Iowan Old Style", Georgia, serif;}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--ground:#0E1813;--surface:#15231B;--surface-sunk:#0A120E;--line:#2C3F33;--ink:#E3ECE4;--ink-muted:#9FB4A6;--forest:#2F6F4B;--on-forest:#F3F8F1;--forest-deep:#1A4630;--fern:#8FD0A2;--sprout:#24412F;--on-sprout:#D7EED9;--sprout-deep:#163024;--sap:#8CC86A;--ochre:#E3AE52;--ochre-soft:#30271A;--gold:#E8B04A;--on-gold:#13241A;--rarity-common:#5E8069;--rarity-uncommon:var(--fern);--rarity-rare:var(--gold);--biome-foret:#1F3A28;--biome-foret-ink:#8CC69A;--biome-prairie:#33401E;--biome-prairie-ink:#C2DB86;--biome-eaux:#1C3940;--biome-eaux-ink:#8ACBD6;--biome-marais:#38351F;--biome-marais-ink:#D2C98A;--biome-montagne:#2E3230;--biome-montagne-ink:#B8C0BA;--biome-littoral:#3D3424;--biome-littoral-ink:#E0C68E;--biome-mer:#1C2B42;--biome-mer-ink:#9DB8E6;--biome-ville:#3E2A24;--biome-ville-ink:#E6AE96;--alert:#F0907F;--focus:#A9E4B8;--uicn-ex:#1A1A1A;--uicn-ew:#542344;--uicn-cr:#D81E05;--uicn-en:#FC7F3F;--uicn-vu:#F9E814;--uicn-nt:#CCE226;--uicn-lc:#60C659;--uicn-dd:#D1D1C6;--uicn-on-dark:#FFFFFF;--uicn-on-light:#13241A;--shadow-card:0 2px 0 rgba(0,0,0,0.4), 0 10px 28px rgba(0,0,0,0.4);--shadow-pop:0 6px 0 rgba(0,0,0,0.45), 0 18px 40px rgba(0,0,0,0.5);color-scheme:dark}}
:root[data-theme="dark"]{--ground:#0E1813;--surface:#15231B;--surface-sunk:#0A120E;--line:#2C3F33;--ink:#E3ECE4;--ink-muted:#9FB4A6;--forest:#2F6F4B;--on-forest:#F3F8F1;--forest-deep:#1A4630;--fern:#8FD0A2;--sprout:#24412F;--on-sprout:#D7EED9;--sprout-deep:#163024;--sap:#8CC86A;--ochre:#E3AE52;--ochre-soft:#30271A;--gold:#E8B04A;--on-gold:#13241A;--rarity-common:#5E8069;--rarity-uncommon:var(--fern);--rarity-rare:var(--gold);--biome-foret:#1F3A28;--biome-foret-ink:#8CC69A;--biome-prairie:#33401E;--biome-prairie-ink:#C2DB86;--biome-eaux:#1C3940;--biome-eaux-ink:#8ACBD6;--biome-marais:#38351F;--biome-marais-ink:#D2C98A;--biome-montagne:#2E3230;--biome-montagne-ink:#B8C0BA;--biome-littoral:#3D3424;--biome-littoral-ink:#E0C68E;--biome-mer:#1C2B42;--biome-mer-ink:#9DB8E6;--biome-ville:#3E2A24;--biome-ville-ink:#E6AE96;--alert:#F0907F;--focus:#A9E4B8;--uicn-ex:#1A1A1A;--uicn-ew:#542344;--uicn-cr:#D81E05;--uicn-en:#FC7F3F;--uicn-vu:#F9E814;--uicn-nt:#CCE226;--uicn-lc:#60C659;--uicn-dd:#D1D1C6;--uicn-on-dark:#FFFFFF;--uicn-on-light:#13241A;--shadow-card:0 2px 0 rgba(0,0,0,0.4), 0 10px 28px rgba(0,0,0,0.4);--shadow-pop:0 6px 0 rgba(0,0,0,0.45), 0 18px 40px rgba(0,0,0,0.5);color-scheme:dark}
:root { --rar-1: #C9D3C4; --rar-2: #8FAE98; --rar-3: var(--fern); --rar-4: var(--gold); --rar-5: #B0451E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --rar-1: #3A4A3F; --rar-2: #5E8069; --rar-5: #F07F52; } }
:root[data-theme="dark"] { --rar-1: #3A4A3F; --rar-2: #5E8069; --rar-5: #F07F52; }

/* Aliases used by the site's base layout */
:root { --bg: var(--ground); --card: var(--surface); --text: var(--ink); --muted: var(--ink-muted); }
.be-biome--foret { --biome: var(--biome-foret); --biome-ink: var(--biome-foret-ink); }
.be-biome--prairie { --biome: var(--biome-prairie); --biome-ink: var(--biome-prairie-ink); }
.be-biome--eaux { --biome: var(--biome-eaux); --biome-ink: var(--biome-eaux-ink); }
.be-biome--marais { --biome: var(--biome-marais); --biome-ink: var(--biome-marais-ink); }
.be-biome--montagne { --biome: var(--biome-montagne); --biome-ink: var(--biome-montagne-ink); }
.be-biome--littoral { --biome: var(--biome-littoral); --biome-ink: var(--biome-littoral-ink); }
.be-biome--mer { --biome: var(--biome-mer); --biome-ink: var(--biome-mer-ink); }
.be-biome--ville { --biome: var(--biome-ville); --biome-ink: var(--biome-ville-ink); }

.be-label { font-size: 12px; line-height: 16px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.be-latin { font-family: "Newsreader", Georgia, serif; font-style: italic; font-size: 15px; color: var(--ink-muted); }
.be-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* UICN badge */
.be-uicn { display: inline-flex; border-radius: 6px; overflow: hidden; font-size: 13px; line-height: 18px; font-weight: 700; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); }
.be-uicn__code { font-family: var(--font-display); padding: 3px 8px; }
.be-uicn__name { padding: 3px 9px 3px 8px; }
.be-uicn--cr .be-uicn__code { background: var(--uicn-cr); color: var(--uicn-on-dark); }
.be-uicn--en .be-uicn__code { background: var(--uicn-en); color: var(--uicn-on-light); }
.be-uicn--vu .be-uicn__code { background: var(--uicn-vu); color: var(--uicn-on-light); }
.be-uicn--nt .be-uicn__code { background: var(--uicn-nt); color: var(--uicn-on-light); }
.be-uicn--lc .be-uicn__code { background: var(--uicn-lc); color: var(--uicn-on-light); }
.be-uicn--dd .be-uicn__code { background: var(--uicn-dd); color: var(--uicn-on-light); }

/* Collectible card */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 20px; }
.be-card { position: relative; display: grid; gap: 10px; align-content: start; min-width: 0; padding: 10px 10px 16px; background: var(--surface); color: var(--ink); text-decoration: none; border: 3px solid var(--rarity, var(--rar-2)); border-radius: 24px; box-shadow: var(--shadow-card); transition: transform .18s ease, box-shadow .18s ease; }
.be-card:hover { transform: translateY(-4px) rotate(-.6deg); box-shadow: var(--shadow-pop); }
.be-card--r1 { --rarity: var(--rar-1); } .be-card--r2 { --rarity: var(--rar-2); } .be-card--r3 { --rarity: var(--rar-3); } .be-card--r4 { --rarity: var(--rar-4); } .be-card--r5 { --rarity: var(--rar-5); }
.be-card--r5 { box-shadow: 0 0 0 3px var(--gold), var(--shadow-card); }
.be-card__top { position: absolute; top: 18px; left: 18px; z-index: 1; }
.be-rarity { font-size: 11px; line-height: 14px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 2px var(--rarity, var(--rar-2)); }
.be-card__body { padding-inline: 6px; display: grid; gap: 8px; }
.be-card__name { font-family: var(--font-display); font-size: 21px; line-height: 25px; font-weight: 600; margin: 0; min-height: 50px; }
.pic { position: relative; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: var(--biome, var(--sprout)); }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Species sheet */
.sheet { background: var(--surface); border-radius: 24px; box-shadow: var(--shadow-pop); overflow: hidden; display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); margin: 12px 0; }
.sheet .pic { aspect-ratio: auto; border-radius: 0; min-height: 260px; height: 100%; }
.sheet .pic img { object-fit: contain; }
.sheet__body { padding: 22px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.sheet__body h1 { margin: 0; font-size: 1.8rem; }
.protect { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--ground); line-height: 1.45; }
.where { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.where li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 12px; background: var(--ground); }
.where .be-biome--foret, .where .be-biome--eaux { }
@media (max-width: 620px) { .sheet { grid-template-columns: 1fr; } .sheet .pic { min-height: 0; aspect-ratio: 4 / 3; } }
.filters { display: flex; gap: 8px; margin: 8px 0 16px; flex-wrap: wrap; }
.filters a { padding: 6px 14px; border-radius: 999px; background: var(--sprout); color: var(--on-sprout); text-decoration: none; font-weight: 700; }
.filters a.is-sel { background: var(--forest); color: var(--on-forest); }

/* Family emblem: light green + dashed outline = image waiting for review; dark green + tick = validated. */
.be-emblem { position: absolute; right: 8px; top: 8px; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; }
.be-emblem > svg:first-child { width: 20px; height: 20px; }
.be-emblem.is-pending { background: var(--sprout-deep); outline: 2px dashed var(--forest-deep); outline-offset: -4px; box-shadow: none; }
.be-emblem.is-pending > svg:first-child { fill: var(--forest-deep); }
.be-emblem.is-validated { background: var(--forest); box-shadow: 0 3px 0 var(--forest-deep); }
.be-emblem.is-validated > svg:first-child { fill: var(--on-forest); }
.be-emblem__tick { position: absolute; right: -5px; bottom: -5px; width: 16px; height: 16px; }
.be-emblem__tick circle { fill: var(--gold); stroke: var(--surface); stroke-width: 1.5; }
.be-emblem__tick path { stroke: var(--forest-deep); }

/* Outing planning and results */
.energy { background: var(--surface); border-radius: 14px; padding: 12px 16px; margin: 12px 0; box-shadow: var(--shadow-card); }
.energy__head { display: flex; justify-content: space-between; }
.energy__bar { height: 12px; border-radius: 999px; background: var(--surface-sunk); overflow: hidden; margin: 6px 0; }
.energy__bar i { display: block; height: 100%; background: var(--sap); border-radius: 999px; }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.choices--row { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.choice { position: relative; display: block; margin: 0; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice__body { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--biome, var(--surface)); color: var(--biome-ink, var(--ink)); border: 3px solid transparent; box-shadow: var(--shadow-card); font-weight: 400; }
.choice__body small { font-size: .85rem; opacity: .9; }
.choice input:checked + .choice__body { border-color: var(--forest); outline: 2px solid var(--gold); }
.choice input:focus-visible + .choice__body { outline: 3px solid var(--focus); }
.choice input:checked + .choice__body::after { content: "✓ choisi"; font-size: .8rem; font-weight: 800; }
.burst { position: absolute; right: -14px; top: -14px; z-index: 3; transform: rotate(8deg); background: var(--gold); color: var(--on-gold); font: 600 1.1rem var(--font-display); padding: 8px 10px; border-radius: 50%; box-shadow: 0 3px 0 rgba(0,0,0,.2); }
.burst--hero { position: static; transform: rotate(6deg); font-size: 1.6rem; padding: 18px 16px; }
.be-chip { display: inline-flex; font-size: 13px; font-weight: 700; padding: 4px 11px; border-radius: 999px; background: var(--sprout); color: var(--on-sprout); }
.be-chip--new { background: var(--forest); color: var(--on-forest); }
.be-chip--gold { background: var(--gold); color: var(--on-gold); }
.be-behav { margin: 0; font-size: .95rem; color: var(--ink-muted); }
button.secondary { background: transparent; color: var(--fern); box-shadow: inset 0 0 0 2px var(--fern); }
.messages { list-style: none; padding: 0; } .messages li { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); }
.messages li.error { border-color: var(--alert); color: var(--alert); }


/* ---- Application shell (mirrors the prototype) ---- */
* { box-sizing: border-box; }
html { background: var(--ground); }
body { margin: 0; font: 16px/1.5 var(--font-sans, "Nunito", system-ui, sans-serif); color: var(--ink); background: var(--ground); }
h1, h2, h3 { font-family: var(--font-display, "Fredoka", system-ui, sans-serif); margin: 0; color: var(--ink); }
a { color: var(--fern); }
.app { max-width: 1240px; margin: 0 auto; min-height: 100vh; background: transparent; }
@media (min-width: 1280px) { .app { margin-block: 16px; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-pop); min-height: calc(100vh - 32px); } }
.appbar { background: var(--forest); color: var(--on-forest); box-shadow: 0 4px 0 var(--forest-deep); position: relative; z-index: 2; }
.appbar__row { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding: 12px clamp(16px, 3vw, 32px); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--on-forest); text-decoration: none; font: 600 32px/1 var(--font-display); }
.brand img { border-radius: 10px; display: block; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { padding: 7px 16px; border-radius: 999px; background: rgba(0,0,0,.2); color: var(--on-forest); font: 600 15px var(--font-display); text-decoration: none; }
.nav a:hover { background: rgba(0,0,0,.32); }
.nav a.is-sel { background: var(--on-forest); color: var(--forest); }
.appbar__energy { margin-inline-start: auto; min-width: 230px; }
.logout { margin: 0; }
.linkbtn { background: none; border: 0; color: var(--on-forest); font: 700 14px var(--font-sans); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 6px; box-shadow: none; }
.be-energy { display: flex; align-items: center; gap: 10px; }
.be-energy__icon { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--sap); display: grid; place-items: center; box-shadow: 0 3px 0 var(--forest-deep); }
.be-energy__icon svg { width: 18px; height: 18px; fill: #fff; }
.be-energy__body { display: grid; gap: 3px; flex: 1; min-width: 150px; }
.be-energy__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.be-energy__head small { font-weight: 400; opacity: .8; }
.be-energy__track { position: relative; height: 14px; border-radius: 999px; background: rgba(0,0,0,.25); overflow: hidden; display: block; }
.be-energy__fill { display: block; height: 100%; background: var(--sap); border-radius: 999px; box-shadow: inset 0 -3px 0 rgba(19,36,26,.15), inset 0 3px 0 rgba(255,255,255,.25); }
.be-energy__notch { position: absolute; top: 3px; bottom: 3px; width: 2px; border-radius: 2px; background: var(--forest); opacity: .7; }
.be-energy__hint { font-size: 13px; line-height: 18px; font-weight: 700; opacity: .85; }
.hero { position: relative; overflow: hidden; background: var(--forest); color: var(--on-forest); padding: 28px clamp(16px, 3vw, 32px) 34px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px 28px; }
.hero__in { position: relative; display: grid; gap: 6px; min-width: 0; }
.hero__eyebrow { color: var(--on-forest); opacity: .8; }
.hero__title { color: var(--on-forest); font-size: clamp(28px, 4vw, 44px); line-height: 1.08; text-wrap: balance; }
.hero__sub { margin: 0; opacity: .92; max-width: 62ch; }
.hero__score { position: relative; display: flex; align-items: center; gap: 20px; }
.hero__land { position: absolute; inset: 0; color: var(--on-forest); opacity: .1; pointer-events: none; }
.hero__land svg { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; }
.wrap { padding: 24px clamp(16px, 3vw, 32px) 40px; display: grid; gap: 22px; align-content: start; }
.panel { background: var(--surface); border-radius: var(--radius-lg, 24px); padding: 20px; display: grid; gap: 12px; align-content: start; box-shadow: var(--shadow-card); min-width: 0; }
.panel__title { font-size: 20px; line-height: 24px; }
.panel p { margin: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } .appbar__energy { margin-inline-start: 0; width: 100%; } }
.sticky { position: sticky; top: 16px; }
.be-btn, a.be-btn, button.be-btn { font: 600 16px/20px var(--font-display); border-radius: 14px; padding: 13px 22px 12px; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; transition: transform .08s ease, box-shadow .08s ease; }
.be-btn--primary { background: var(--forest); color: var(--on-forest); box-shadow: 0 5px 0 var(--forest-deep); }
.be-btn--secondary { background: var(--sprout); color: var(--on-sprout); box-shadow: 0 5px 0 var(--sprout-deep); }
.be-btn--lg { font-size: 19px; padding: 17px 28px 16px; border-radius: 18px; }
.be-btn:hover { transform: translateY(-1px); }
.be-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0,0,0,.3); }
.be-btn[disabled] { background: var(--surface-sunk); color: var(--ink-muted); box-shadow: 0 5px 0 var(--line); cursor: not-allowed; transform: none; }
.be-cost { background: rgba(255,255,255,.18); border-radius: 999px; padding: 2px 10px; font-size: 14px; }
.sum { display: grid; }
.sum__row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.sum__row:last-child { border-bottom: 0; }
.sum__row span:first-child { color: var(--ink-muted); }
.sum__row b { text-align: end; }
input, select { font: inherit; }
.auth { max-width: 460px; margin: 0 auto; width: 100%; }
.auth form p { margin: 0 0 14px; }
.auth label { display: block; font-weight: 700; margin-bottom: 4px; }
.auth input[type=email], .auth input[type=password], .auth input[type=text] { width: 100%; padding: 11px 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); }
.auth input:focus { outline: 3px solid var(--focus); border-color: transparent; }
.errorlist { color: var(--alert); list-style: none; padding: 0; margin: 4px 0; font-weight: 700; }
.list { list-style: none; margin: 0; padding: 0; display: grid; }
.list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.stat3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.stat3 > div { display: grid; padding: 10px 12px; border-radius: 14px; background: var(--ground); }
.stat3 b { font: 600 24px/28px var(--font-display); }
.stat3 small { color: var(--ink-muted); }
@media (prefers-reduced-motion: reduce) { .be-btn, .be-card { transition: none; } }

/* ---- Animals tree ---- */
.muted { color: var(--ink-muted); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-weight: 700; }
.crumb__sep { color: var(--ink-muted); }
.lvl { display: grid; gap: 6px; }
.lvl__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lvl__bar { height: 12px; border-radius: 999px; background: var(--surface-sunk); overflow: hidden; }
.lvl__bar i { display: block; height: 100%; background: var(--sap); border-radius: 999px; }
.leaves { display: inline-flex; gap: 2px; }
.leaf { width: 18px; height: 18px; fill: var(--surface-sunk); stroke: var(--line); stroke-width: 1.5; }
.leaf.on { fill: var(--sap); stroke: var(--forest); }
.branches { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.twig { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-card); text-decoration: none; color: var(--ink); }
.twig:hover { transform: translateY(-2px); }
.twig--unseen { background: var(--surface-sunk); border: 2px dashed var(--line); box-shadow: none; }
.twig__txt { display: grid; flex: 1; min-width: 0; font-family: var(--font-display); font-size: 1.15rem; }
.twig__meta { display: grid; justify-items: end; gap: 2px; }
.twig__go { font-size: 1.6rem; color: var(--ink-muted); }
.genus { display: flex; justify-content: space-between; align-items: center; }
.leaves-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.obs, .ghost { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: var(--ground); text-decoration: none; color: var(--ink); min-height: 76px; }
.obs__pic { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; flex: none; background: var(--biome, var(--sprout)); }
.obs__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.obs__txt { display: grid; gap: 1px; min-width: 0; }
.ghost { border: 2px dashed var(--line); background: transparent; }
.ghost__q { width: 64px; height: 64px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--surface-sunk); font: 700 28px var(--font-display); color: var(--ink-muted); }

.choices--big { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.basecard { align-content: start; }

/* Tutorial */
.tuto__head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.missions { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mission { display: flex; gap: 12px; align-items: start; padding: 10px 12px; border-radius: 14px; background: var(--ground); }
.mission__n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-sunk); font: 600 14px var(--font-display); }
.mission__body { display: grid; gap: 6px; justify-items: start; }
.mission.is-current { background: var(--sprout); box-shadow: inset 0 0 0 2px var(--forest); }
.mission.is-current .mission__n { background: var(--forest); color: var(--on-forest); }
.mission.is-done .mission__n { background: var(--sap); color: #fff; }
.mission.is-done b { text-decoration: line-through; text-decoration-thickness: 1.5px; opacity: .75; }
.linkbtn--dark { color: var(--fern); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.be-coins { display: inline-flex; align-items: center; gap: 6px; font: 600 17px var(--font-display); padding: 5px 12px 5px 6px; border-radius: 999px; background: rgba(0,0,0,.2); color: var(--on-forest); }
.be-coin { display: inline-block; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); box-shadow: inset 0 -3px 0 var(--ochre); vertical-align: middle; }
.gears { display: grid; gap: 10px; }
.gear { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 14px; border-radius: 14px; background: var(--ground); }
.gear > div { display: grid; gap: 2px; min-width: 0; }
.gear--locked_title, .gear--locked_req, .gear--outdated { opacity: .75; }
.be-btn .be-coin { width: 16px; height: 16px; }

/* Bureau */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.tabs a { padding: 8px 16px; border-radius: 999px; background: var(--surface); font-weight: 700; text-decoration: none; color: inherit; box-shadow: var(--shadow-card); }
.tabs a.is-sel { background: var(--forest); color: var(--on-forest); }
.statline { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin: 0 0 12px; }
.desk { display: grid; gap: 14px; }
.desk__item { background: var(--ground); border-radius: 14px; padding: 14px; display: grid; gap: 10px; }
.desk__head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.desk__form { display: grid; gap: 10px; }
.desk__form--row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.desk__nets { display: grid; gap: 8px; }
.desk__nets .be-btn { text-align: left; }
.desk fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.desk legend { font-weight: 700; margin-bottom: 4px; }
.opt { display: flex; gap: 8px; align-items: flex-start; }
.field { display: grid; gap: 4px; font-weight: 700; }
.field select { padding: 8px; border-radius: 10px; font: inherit; }
.reqs { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.reqs li.is-ok { font-weight: 700; }

/* Arbre en menus dépliants */
.folds, .fold__body { display: grid; gap: 10px; }
.fold { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-card); }
.fold > summary { list-style: none; cursor: pointer; box-shadow: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary .twig__go { transition: transform .15s; }
.fold[open] > summary .twig__go { transform: rotate(90deg); }
.fold__body { padding: 0 14px 14px; }
.fold .fold { background: var(--ground); box-shadow: none; }
.fold .fold .fold { background: var(--surface); }
.fold summary:focus-visible { outline: 3px solid var(--forest); outline-offset: 2px; border-radius: 18px; }
@media (prefers-reduced-motion: reduce) { .fold > summary .twig__go { transition: none; } }
.fold > summary.twig { background: transparent; border-radius: 18px; transform: none; }
.fold > summary.twig--unseen { border: 0; background: transparent; }
.fold > summary.twig:hover { background: rgba(0,0,0,.04); transform: none; }
.fold[open] > summary.twig { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.fold__body { padding: 4px 14px 14px; }
.fold { border: 2px solid var(--line); }
.fold--class { border-color: var(--forest); }
.fold--order { border-color: var(--fern, var(--sap)); }
.fold--family { border-color: var(--line); }
.fold[open] { border-color: var(--sap); }
.obs__lvl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.genus { justify-content: flex-start; gap: 12px; }

/* Carte */
.map { width: 100%; max-width: 480px; height: auto; display: block; margin: 0 auto 4px; }
.map__bg { fill: var(--surface-sunk); }
.ring { fill: none; stroke: var(--fern); stroke-width: 1.5; stroke-dasharray: 5 6; opacity: .6; }
.ring__t { font: 700 11px var(--font-sans); fill: var(--fern); text-anchor: middle; letter-spacing: .06em; text-transform: uppercase; }
.pin { cursor: pointer; }
.pin circle { fill: var(--biome); stroke: var(--biome-ink); stroke-width: 3; }
.pin--off { opacity: .55; }
.map__t { font: 700 13px var(--font-sans); fill: var(--ink); text-anchor: middle; paint-order: stroke; stroke: var(--surface-sunk); stroke-width: 4px; }
.mlink { stroke: var(--fern); stroke-width: 3; stroke-linecap: round; }
.mlake { fill: var(--biome-eaux); stroke: var(--biome-eaux-ink); stroke-width: 1; opacity: .9; }
.map__t--s { font-size: 11px; pointer-events: none; }
.retr { fill: var(--line); opacity: .45; } .rdep { fill: var(--sprout); opacity: .55; stroke: var(--surface); stroke-width: 1.5; } .rdep--launch { opacity: .8; } .rdep--play { fill: var(--sprout-deep); opacity: .75; } .rdep--nb { opacity: .3; } .rdep--nb.rdep--play { opacity: .6; }
.rriv { fill: none; stroke: var(--biome-eaux-ink); stroke-width: 1.6; opacity: .55; stroke-linejoin: round; }
.rtxt { font: 700 12px var(--font-sans); text-anchor: middle; pointer-events: none; } .rtxt--dep { fill: var(--forest); opacity: .45; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.rtxt--etr { fill: var(--ink); opacity: .4; font-size: 13px; } .rtxt--parc { fill: var(--forest); font: italic 600 11.5px var(--font-sans); opacity: .8; }
.rtxt--lieu { fill: var(--ink); font-size: 10.5px; paint-order: stroke; stroke: var(--surface-sunk); stroke-width: 3px; }
.map--zoom { max-width: 500px; } .map--zoom .map__t { font-size: 11px; stroke-width: 3px; } .map--zoom .rtxt--parc { font-size: 9.5px; } .map--zoom .ring__t { font-size: 9px; }
.map--zoom .ring { stroke-width: 1; } .map--zoom .pin circle { stroke-width: 2; } .map--zoom .base { stroke-width: 2.5; }
.pin--soon { cursor: help; } .pin--soon circle { fill: var(--surface); stroke: var(--muted, #8a9a8a); stroke-width: 1.5; }
.rtxt--soon { fill: var(--ink); opacity: .6; font-size: 9.5px; font-weight: 600; paint-order: stroke; stroke: var(--surface-sunk); stroke-width: 3px; }
.map--zoom .rtxt--soon { font-size: 8.5px; } .mdot--soonlieu { background: var(--surface); border: 1.5px solid #8a9a8a; }
.map--zoom { max-width: 560px; }
.mnode { fill: var(--forest); stroke: var(--surface); stroke-width: 2; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 16px; padding: 0; margin: 6px 0 0; font-size: 14px; }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend__ring { width: 16px; height: 16px; border-radius: 50%; border: 2px dashed var(--fern); }
.legend__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--sap); border: 2px solid var(--forest); }
.legend__dot--soon { background: var(--surface); border-color: #8a9a8a; }
.base { fill: var(--gold); stroke: var(--surface); stroke-width: 3; pointer-events: none; }
.map--zoom .map__t { font-size: var(--fs, 11px); stroke-width: 3px; }
.map--zoom .rtxt--soon, .map--zoom .rtxt--parc { font-size: var(--fs-s, 9.5px); }

.needs { list-style: none; margin: -4px 0 4px; padding: 0; display: grid; gap: 4px; font-size: 14px; line-height: 20px; font-weight: 600; }
.needs li { display: flex; align-items: center; gap: 8px; }
.needs .be-check { width: 20px; height: 20px; font-size: 11px; }
.map--wide { max-width: 100%; }
.mdep { fill: var(--sprout); stroke: var(--surface); stroke-width: 1; cursor: pointer; } .mdep--later { fill: var(--line); opacity: .7; }
.mdep--launch { fill: var(--sprout-deep); } .mdep--playable, .mdep--installed { fill: var(--surface); stroke: var(--forest); stroke-width: 1.5; }
.mdep--here { fill: var(--gold); } .mdep--explored { fill: var(--forest); } .mdep.is-sel { stroke: var(--ink); stroke-width: 3; }
.mdep:hover, .mpays:hover { opacity: .85; } .mdep:focus-visible, .mpays:focus-visible { outline: none; stroke: var(--focus); stroke-width: 3; }
.mpin { fill: var(--forest); stroke: var(--surface); stroke-width: 2; pointer-events: none; } .mpin--here { fill: var(--ink); }
.mfond { fill: var(--line); opacity: .45; }
.mpays { fill: var(--line); stroke: var(--surface); stroke-width: 1; cursor: pointer; } .mpays--open { fill: var(--sprout-deep); } .mpays.is-sel { stroke: var(--ink); stroke-width: 2.5; }
.mpays--launch { fill: var(--sprout); } .mdot--wl { background: var(--sprout); }
.seg--tabs { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 6px; background: var(--surface-sunk); padding: 5px; border-radius: var(--radius-md); max-width: 600px; margin: 0 0 12px; }
.seg--tabs a { display: grid; place-items: center; padding: 8px 4px; border-radius: 10px; text-decoration: none; color: var(--ink); font: 600 15px/19px var(--font-display); }
.seg--tabs a.is-sel { background: var(--surface); box-shadow: 0 3px 0 var(--line); color: var(--fern); }
.map--wide { max-width: 100%; }
.mapinfo { display: grid; gap: 6px; }
.mdep--later { fill: var(--line); opacity: .7; }
.needs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-weight: 600; }
.needs li.is-ok { color: var(--fern); }
.map a { cursor: pointer; }
.map--monde .mpays.is-sel { stroke-width: 1; }
.legs { margin: 0; padding-left: 20px; display: grid; gap: 4px; }

/* Page Sortie */
.be-level__bar { height: 8px; border-radius: var(--radius-pill); background: var(--surface-sunk); overflow: hidden; }
.be-level__bar i { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--sap); }
.places { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; }
.place { position: relative; text-align: left; border: 0; cursor: pointer; font: inherit; color: var(--ink); display: grid; gap: 6px; padding: 14px; border-radius: var(--radius-md); background: var(--biome); box-shadow: inset 0 0 0 1.5px transparent; overflow: hidden; }
.place b { font: 600 19px/23px var(--font-display); position: relative; }
.place > * { position: relative; }
.place__land { position: absolute !important; left: 0; right: 0; bottom: 0; height: 70px; color: var(--biome-ink); opacity: .22; }
.place__land svg { width: 100%; height: 100%; }
.place.is-sel { box-shadow: inset 0 0 0 3px var(--biome-ink), 0 4px 0 var(--biome-ink); }
.place .be-level__bar { background: var(--surface); }
.place .be-level__bar i { background: var(--biome-ink); }
.field { display: grid; gap: 8px; }
.hint { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink-muted); }
.warn { color: var(--alert); }
.segr { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 6px; background: var(--surface-sunk); padding: 5px; border-radius: var(--radius-md); }
.segb { display: block; cursor: pointer; }
.segb > span { display: grid; place-items: center; text-align: center; gap: 0; padding: 8px 4px; border-radius: 10px; font: 600 15px/19px var(--font-display); color: var(--ink); }
.segb small { font: 700 12px/15px var(--font-sans); color: var(--ink-muted); }
.segb input:checked + span { background: var(--surface); box-shadow: 0 3px 0 var(--line); color: var(--fern); }
.segb input:disabled + span { opacity: .45; cursor: not-allowed; }
.segb input:focus-visible + span { outline: 3px solid var(--focus); }
@media (max-width: 560px) { .segr--5 { --n: 3 !important; } }
.place:has(input:checked) { box-shadow: inset 0 0 0 3px var(--biome-ink), 0 4px 0 var(--biome-ink); }
.place input:focus-visible ~ b { text-decoration: underline; }
.place { cursor: pointer; }
.pin--sel circle { fill: var(--biome-ink); stroke: var(--gold); }
.be-energy__cost { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, var(--gold), var(--gold) 4px, var(--ochre) 4px, var(--ochre) 8px); opacity: .85; }
.stack { display: grid; gap: 14px; align-content: start; min-width: 0; }
.cardlink { display: block; position: relative; text-decoration: none; color: inherit; border-radius: 20px; }
.cardlink:hover { transform: translateY(-3px); }
.cardlink:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.cardlink__who { display: inline-flex; margin: 8px 0 0 12px; }
.cards--one { max-width: 340px; }
.be-card__pub { justify-self: start; margin-top: 6px; }

/* Fiche d'espèce (joueur) */
.fichecard { max-width: 380px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { border: 2px solid var(--line); border-radius: 12px; padding: 0; width: 64px; height: 64px; overflow: hidden; cursor: pointer; background: var(--surface); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:focus-visible { outline: 3px solid var(--focus); }
.stats { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.plain { margin: 0; padding-left: 20px; display: grid; gap: 4px; }

/* Sur le terrain */
.field__bar { height: 12px; border-radius: 999px; background: var(--surface-sunk); overflow: hidden; }
.field__bar i { display: block; height: 100%; width: 0; background: var(--sap); border-radius: 999px; transition: width .2s linear; }
.log { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.log li { display: flex; gap: 12px; align-items: baseline; animation: login .4s ease; }
.log time { flex: none; font: 700 13px var(--font-display); color: var(--fern); min-width: 52px; }
@keyframes login { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .log li { animation: none; } }
.be-btn.is-wait { opacity: .5; cursor: wait; }

/* Accueil : tuiles d'actions */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; grid-auto-rows: 1fr; margin-bottom: 22px; }
.tile { display: grid; gap: 4px; align-content: start; padding: 18px; border-radius: var(--radius-lg, 24px); background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-card); transition: transform .1s ease; }
.tile:hover { transform: translateY(-2px); }
.tile b { font: 600 20px/24px var(--font-display); }
.tile small { color: var(--ink-muted); font-weight: 600; }
.tile__ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--sprout); color: var(--forest); margin-bottom: 6px; }
.tile__ico svg { width: 36px; height: 36px; }
.tile--main .tile__ico { background: rgba(255,255,255,.14); color: var(--on-forest); }
.tile { min-height: 168px; align-content: start; }
.tile--main { background: var(--forest); color: var(--on-forest); box-shadow: 0 6px 0 var(--forest-deep); }
.tile--main small { color: var(--sprout); }
.wm { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--ground); }
.wm p { margin: 0; }
.album-filters { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; margin-bottom: 14px; }
.album-filters label { display: grid; gap: 4px; font: 700 13px/16px var(--font-sans); color: var(--ink-muted); }
.album-filters select { font: 600 15px var(--font-sans); padding: 9px 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); max-width: 100%; }

/* Identité : motif de feuilles et d'empreintes derrière le contenu */
body { background-color: var(--ground); background-image: url("../img/fond.bf09304ed121.svg"); background-size: 420px 420px; }

/* Fond d'écran : silhouette de la base du joueur (dégradé de verts), fixe en bas de l'écran */
body.has-fond::before { content: ""; position: fixed; inset: auto 0 0 0; height: 70vh; z-index: 0; pointer-events: none; background: var(--fond) center bottom / cover no-repeat; opacity: .45; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 45%); mask-image: linear-gradient(to bottom, transparent, #000 45%); }
body.has-fond .app { position: relative; z-index: 1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.has-fond::before { opacity: .22; } }
:root[data-theme="dark"] body.has-fond::before { opacity: .22; }
.fond-space { height: 55vh; }
.mlink--out { stroke-dasharray: 2 6; }

/* Carte Région : réseau des bases */
.map--net { max-width: 720px; }
.map--net .map__t { font-size: var(--nfs, 13px); }
.map--net .rtxt--parc { font-size: 12px; }
.mnode circle { stroke: var(--surface); stroke-width: 3; }
.mnode--here circle { fill: var(--gold); stroke: var(--forest); }
.mnode--base circle { fill: var(--forest); }
.mnode--new circle { fill: var(--surface); stroke: var(--forest); stroke-width: 3.5; }
.mnode--hub circle { fill: #3F86D6; stroke: #fff; }
.mnode--soon circle { fill: var(--sprout); stroke: #8a9a8a; }
.mnode.is-sel circle { stroke: var(--gold); stroke-width: 4.5; }
.mlink--off { stroke: #8a9a8a; stroke-dasharray: 2 7; }
.mstub__a { fill: #8a9a8a; }
.map__t--stub { opacity: .8; font-style: italic; }
.nlieu { fill: var(--sap); stroke: var(--forest); stroke-width: 1.2; opacity: .85; }
.nlieu--soon { fill: var(--surface); stroke: #8a9a8a; }
.legend__dot--here { background: var(--gold); border-color: var(--forest); } .legend__dot--base { background: var(--forest); } .legend__dot--new { background: var(--surface); }
.legend__dot--hub { background: #3F86D6; border-color: #3F86D6; } .legend__dot--soon { background: var(--sprout); }
.legend__dia { width: 10px; height: 10px; background: var(--sap); border: 1.5px solid var(--forest); transform: rotate(45deg); }
.legend__line { width: 22px; border-top: 3px solid var(--fern); border-radius: 2px; }

/* Écran de félicitations (nouveau titre) */
.fete { position: fixed; inset: 0; z-index: 100; background: rgba(10,25,16,.78); display: grid; place-items: center; padding: 16px; overflow: auto; }
.fete__card { background: var(--surface); border-radius: 28px; overflow: hidden; max-width: 760px; width: 100%; box-shadow: var(--shadow-pop); animation: fete-in .5s ease both; }
.fete__img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; max-height: 52vh; }
.fete__txt { display: grid; gap: 10px; padding: 22px 26px 26px; justify-items: center; text-align: center; }
.fete__title { margin: 0; font: 700 clamp(34px, 7vw, 52px)/1.05 var(--font-display); color: var(--forest); }
.fete__sub { margin: 0; font-size: 20px; }
.fete__opens { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.fete__opens li { background: var(--sprout); color: var(--on-sprout); padding: 6px 14px; border-radius: 999px; font-weight: 700; }
@keyframes fete-in { from { transform: scale(.92) translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fete__card { animation: none; } }

/* Écrire un article */
.wsubjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: 340px; overflow: auto; padding: 2px; }
.wsub, .wang { display: grid; gap: 2px; padding: 12px 14px; border-radius: 16px; background: var(--ground); color: var(--ink); text-decoration: none; box-shadow: inset 0 0 0 2px var(--line); }
.wsub small, .wang small { color: var(--ink-muted); font-weight: 600; }
.wsub:hover, .wang:hover { box-shadow: inset 0 0 0 2px var(--fern); }
.wsub.is-sel, .wang.is-sel { background: var(--sprout); box-shadow: inset 0 0 0 3px var(--forest); }
.wangles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.wang.is-off { opacity: .6; }
.langswitch { margin: 0; }
.langswitch select { font: 700 13px var(--font-sans); border-radius: 999px; border: 1px solid rgba(255,255,255,.4); background: transparent; color: var(--on-forest); padding: 4px 8px; }
.langswitch select option { color: #222; }

/* Pages de compte (allauth) et profil */
.wrap--auth { max-width: 560px; margin: 24px auto 40px; width: calc(100% - 32px); background: var(--surface); border-radius: var(--radius-lg, 24px); padding: 22px; box-shadow: var(--shadow-card); align-content: start; gap: 12px; }
.wrap--auth h1 { font: 600 26px/30px var(--font-display); margin: 0; }
.wrap--auth p, .wrap--auth form p { margin: 0 0 12px; }
.wrap--auth label { display: block; font-weight: 700; margin-bottom: 4px; }
.wrap--auth input[type=email], .wrap--auth input[type=password], .wrap--auth input[type=text], .wrap--auth input[type=number] { width: 100%; padding: 11px 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); }
.wrap--auth input:focus { outline: 3px solid var(--focus); border-color: transparent; }
.wrap--auth table { width: 100%; border-collapse: collapse; }
.wrap--auth td, .wrap--auth th { text-align: start; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.wrap--auth ul { padding-inline-start: 20px; }
.wrap--auth a:not(.be-btn) { color: var(--fern, inherit); font-weight: 700; }
.profil { max-width: 720px; margin: 0 auto; width: 100%; display: grid; gap: 18px; }
.profil__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.profil__links a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--ground); text-decoration: none; font-weight: 700; color: inherit; }
.profil__links a small { font-weight: 400; color: var(--ink-muted); }
.profil__links a:hover { outline: 2px solid var(--gold); }
.pill { display: inline-block; font-size: .8rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--surface-sunk); }

/* En-tête : crédits, énergie, profil, connexion et langue en haut ; le menu passe en dessous */
.appbar__row .nav { order: 10; flex: 1 0 100%; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.12); }

/* Équipe : tuiles d'assistants et de candidats */
.avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font: 700 26px var(--font-display); color: var(--biome-ink, var(--forest)); background: var(--biome, var(--sprout)); box-shadow: inset 0 0 0 3px rgba(255,255,255,.7), 0 2px 0 rgba(19,36,26,.15); }
.who { display: flex; gap: 14px; align-items: flex-start; }
.who__txt { display: grid; gap: 4px; min-width: 0; }
.who__name { font: 600 20px/24px var(--font-display); }
.who__origin { color: var(--ink-muted); font-weight: 600; font-size: 14px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.cands { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.cand { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: start; padding: 14px; border-radius: 20px; background: var(--ground); box-shadow: inset 0 0 0 2px var(--line); }
.cand__body { display: grid; gap: 4px; min-width: 0; }
.cand__body b { font: 600 19px/22px var(--font-display); }
.cand__buy, .cand > .be-chip { grid-column: 1 / -1; }
.cand__buy { display: flex; flex-wrap: wrap; gap: 6px; }
.cand__buy .be-btn { padding: 8px 12px 7px; font-size: 14px; }

/* Tchèque : Fredoka n'a pas ě š č ř ž ů ť ď ň ; Baloo 2 a le même style arrondi et couvre le latin étendu */
:root:lang(cs){--font-display:"Baloo 2", "Nunito", system-ui, sans-serif}

/* Portraits d'assistants : petits, ronds */
.avatar { overflow: hidden; padding: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.be-btn--block { width: 100%; margin-top: 8px; }
.be-btn--block small { font: 600 13px var(--font-body, inherit); opacity: .85; }

/* Carte : où on peut aller, et pourquoi pas */
.mnode--lock circle { stroke-dasharray: 4 3; opacity: .6; } .mnode--lock text { opacity: .7; }
.mnode--go circle { stroke: var(--sap-deep, #2f8f4e); stroke-width: 4; }
.mnode--base .mcheck { stroke: #fff; }
.mcheck { fill: none; stroke: var(--forest); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.mlock { fill: none; stroke: #8a9a8a; stroke-width: 2.4; stroke-linecap: round; pointer-events: none; }
.legend__go { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--sap-deep, #2f8f4e); font: 700 11px/1 var(--font-sans); color: var(--forest); }
.legend__go--no { border: 2px dashed #8a9a8a; color: #8a9a8a; }
.dests { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dests li { display: grid; gap: 2px; } .dests a { color: inherit; text-decoration: none; } .dests li:not(.is-ok) a { opacity: .75; }
.dests li.is-ok a span:first-child { color: var(--forest); font-weight: 800; }
.dests small { padding-left: 20px; }

/* Résultat de sortie : progression de l'espèce sous la carte */
.lvl { margin-top: 10px; display: grid; gap: 4px; }
.lvl__now, .lvl__up { font: 700 14px/18px var(--font-display); color: var(--forest); }
.lvl--up { background: var(--gold-soft, #fff3c4); border-radius: 12px; padding: 8px 10px; box-shadow: inset 0 0 0 2px var(--gold, #f2b533); }
.lvl__bar { height: 10px; border-radius: 999px; background: var(--sprout); overflow: hidden; }
.lvl__bar span { display: block; height: 100%; background: var(--forest); border-radius: 999px; }
.lvl--up .lvl__bar span { background: var(--gold, #f2b533); }
.lvl__need { color: var(--ink-muted); font-weight: 600; }

/* Couverture par site */
.cov { display: grid; gap: 12px; }
.cov__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.cov__name { grid-column: 1 / -1; display: grid; line-height: 20px; }
.cov__name b { font-weight: 700; }
.cov__bar { height: 10px; border-radius: 999px; background: var(--sprout); overflow: hidden; display: block; }
.cov__bar i { display: block; height: 100%; border-radius: 999px; background: var(--biome-ink, var(--forest)); }
.cov__row .be-num { font: 700 15px var(--font-display); }

/* Badges : hexagone, cadre selon le palier (bronze, argent, or, émeraude) ; les points répètent le palier pour l'accessibilité */
.hex { flex: none; width: 52px; height: 56px; display: inline-grid; place-items: center; }
.hex svg { width: 100%; height: 100%; }
.hex__shape { fill: var(--surface-sunk); stroke: var(--line); stroke-width: 3; stroke-dasharray: 4 3; }
.hex__sym { fill: var(--line); }
.hex--t1 .hex__shape { fill: #E8CBA8; stroke: #9A5B25; stroke-width: 4; stroke-dasharray: none; } .hex--t1 .hex__sym { fill: #9A5B25; }
.hex--t2 .hex__shape { fill: #E4E8EA; stroke: #7C8A93; stroke-width: 4; stroke-dasharray: none; } .hex--t2 .hex__sym { fill: #7C8A93; }
.hex--t3 .hex__shape { fill: #F8E1A0; stroke: #C28A12; stroke-width: 4; stroke-dasharray: none; } .hex--t3 .hex__sym { fill: #C28A12; }
.hex--t4 .hex__shape { fill: var(--forest); stroke: var(--gold); stroke-width: 4; stroke-dasharray: none; } .hex--t4 .hex__sym { fill: var(--gold); }
.hex--jalon.hex--t0 .hex__shape { fill: var(--sprout); stroke: var(--gold); stroke-width: 5; stroke-dasharray: none; } .hex--jalon.hex--t0 .hex__sym { fill: var(--forest); }
.bdg-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.bdg { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--ground); }
.bdg.is-won { background: var(--sprout); color: var(--on-sprout); }
.bdg--next { background: var(--ground); margin: 6px 0 10px; }
.bdg__body { display: grid; gap: 3px; min-width: 0; flex: 1; }
.bdg__body small { font-size: 13px; }
.bdg__tier { font-weight: 800; letter-spacing: .04em; }

.navdot{display:inline-block;width:.6em;height:.6em;border-radius:50%;background:#e0a526;vertical-align:middle;margin-left:.2em}
.annonce{max-width:72rem;margin:.6rem auto 0;padding:.6rem .9rem;display:flex;gap:.6rem;align-items:center;border-radius:12px;background:#e3f3d8;border:2px solid #3f8f4a;color:#1f4a26;font-weight:700}
.annonce form{margin-left:auto}
.annonce__x{border:0;background:transparent;font-size:1.4rem;line-height:1;cursor:pointer;color:inherit;padding:0 .3rem}
.reportbar{max-width:72rem;margin:.6rem auto 0;padding:0 1rem;display:grid;gap:.4rem}
.reportbar a{display:block;padding:.6rem .9rem;border-radius:12px;background:#fff4d6;border:2px solid #e0a526;color:#4a3500;font-weight:700;text-decoration:none}

/* Les prénoms tchèques (assistants) s'affichent aussi dans les autres langues : Baloo 2 complète Fredoka pour ě š č ř ž ů ť ď ň */
:root{--font-display:"Fredoka", "Baloo 2", "Nunito", system-ui, sans-serif}
:root{--biome-grotte:#DDDAE6;--biome-grotte-ink:#4A4563}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--biome-grotte:#2D2B38;--biome-grotte-ink:#BDB8D2}}
:root[data-theme="dark"]{--biome-grotte:#2D2B38;--biome-grotte-ink:#BDB8D2}
.be-biome--grotte { --biome: var(--biome-grotte); --biome-ink: var(--biome-grotte-ink); }

/* Page « Comment jouer » */
.howto { padding: 24px clamp(16px, 3vw, 32px) 40px; display: grid; gap: 18px; max-width: 980px; margin-inline: auto; }
.howto__card { grid-template-columns: 180px minmax(0, 1fr); gap: 20px; align-items: center; }
.howto__img { width: 180px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 18px; border: 3px solid var(--gold); }
.howto__txt { display: grid; gap: 8px; }
.howto__go { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
@media (max-width: 640px) { .howto__card { grid-template-columns: 1fr; } .howto__img { width: 100%; aspect-ratio: 4 / 3; } }

/* Badges dessinés (SVG hexagone, voir game/badge_art.py) : le dessin porte lui-même ses couleurs */
.hex { width: 56px; height: 59px; }
.mplane { fill: var(--c-ink, #2f4a35); text-anchor: middle; paint-order: stroke; stroke: #fff; stroke-width: 3px; pointer-events: none; }
.legend__plane { display: inline-block; width: 1.1em; text-align: center; color: #2f4a35; }

/* Éléments cachés par l'attribut hidden (les composants à display explicite ne doivent pas le contourner) */
[hidden] { display: none !important; }
