/* la police du village : Baloo 2 (Ek Type, licence SIL OFL), hébergée sur le site (polices/) */
@font-face { font-family: "Baloo 2"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(../polices/baloo2-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Baloo 2"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(../polices/baloo2-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* ============================================================
   Olisé Village — l'interface : bulles crème, boutons ronds bien tendres,
   lettres arrondies (Baloo 2). Le monde est dessiné dans la toile #monde.
   ============================================================ */
:root {
  --feuille: #3fa34d;
  --feuille-fonce: #23702f;
  --feuille-claire: #e3f4d6;
  --creme: #fffaee;
  --creme-2: #f4ebd6;
  --brun: #59402f;
  --brun-doux: #765a43;
  --ciel: #5cc0dc;
  --corail: #ff7a59;
  --soleil: #ffcd4a;
  --rose: #ff8fb1;
  --ombre-douce: 0 6px 18px rgba(52, 40, 24, .22), 0 1px 2px rgba(52, 40, 24, .16);
  --ombre-bouton: 0 4px 10px rgba(30, 80, 30, .28), 0 1px 1px rgba(30, 60, 20, .2);
  --rayon: 18px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --clavier: 0px;
  --police: "Baloo 2", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
  height: 100%;
  background: #3e8a49;
}
body {
  margin: 0; height: 100%; overflow: hidden;
  font-family: var(--police); color: var(--brun);
  background: #3e8a49;
  overscroll-behavior: none;
}
::selection { background: var(--soleil); color: var(--brun); }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; border: 0; }
input { font: inherit; font-size: 16px; color: var(--brun); caret-color: var(--feuille); }
:focus-visible { outline: 3px solid var(--soleil); outline-offset: 2px; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

#monde {
  position: fixed; inset: 0; width: 100vw; height: 100dvh;
  display: block; touch-action: none; cursor: pointer;
}

/* ---------- pastilles du haut ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud > * { pointer-events: auto; }
.hud-haut {
  position: absolute; left: 0; right: 0; top: 0;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  padding: calc(10px + var(--sat)) calc(12px + var(--sar)) 0 calc(12px + var(--sal));
  pointer-events: none;
}
.hud-haut > * { pointer-events: auto; }
.hud-droite { display: flex; gap: 6px; align-items: center; }
.pastille {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 4px 14px 4px 10px;
  background: var(--creme); color: var(--brun);
  border-radius: 999px; box-shadow: var(--ombre-douce);
  font-weight: 700; font-size: 16px; line-height: 1; white-space: nowrap;
}
.pastille.rond { width: 44px; height: 44px; padding: 0; justify-content: center; }
.pastille b { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 1ch; }
.compteur svg { color: var(--corail); width: 20px; height: 20px; }
.compteur + .compteur svg { color: var(--ciel); }
#b-lieu svg { color: var(--feuille); }
#b-lieu .voisins {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: 2px; padding: 3px 9px 3px 7px; border-radius: 999px;
  background: var(--feuille-claire); color: var(--feuille-fonce); font-size: 14px;
}
#b-lieu .voisins::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--feuille); box-shadow: 0 0 0 3px rgba(63,163,77,.18); }
.pastille:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .pastille:hover { background: #fff; } }

/* ---------- la cueillette en cours ---------- */
#manche {
  position: absolute; left: 50%; top: calc(62px + var(--sat)); transform: translateX(-50%);
  background: var(--creme); border-radius: var(--rayon); box-shadow: var(--ombre-douce);
  padding: 8px 14px 10px; min-width: 200px; text-align: center;
}
.manche-tete { display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 800; font-size: 17px; }
.manche-tete svg { color: #d99a1c; }
.manche-tete b { font-variant-numeric: tabular-nums; color: var(--corail); min-width: 3.2ch; }
#manche-top { list-style: none; margin: 4px 0 0; padding: 0; font-size: 15px; font-weight: 600; }
#manche-top li { display: flex; justify-content: space-between; gap: 12px; }
#manche-top li b { font-variant-numeric: tabular-nums; }
#manche-top:empty::before { content: "Ramasse un max de fruits\00a0!"; color: var(--brun-doux); }


/* ---------- le plateau (morpion, puissance 4) ---------- */
#plateau {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(70px + var(--sab) + var(--clavier));
  width: min(380px, calc(100% - 24px));
  background: var(--creme); border-radius: 24px; box-shadow: var(--ombre-douce);
  padding: 10px 12px 12px; display: grid; gap: 10px; animation: pop .22s ease-out;
}
.plateau-tete { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 4px 8px; }
#pl-j0 { grid-column: 1; grid-row: 1; } #pl-j1 { grid-column: 2; grid-row: 1; }
#pl-etat { grid-column: 1 / -1; grid-row: 2; }
.joueur { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 800; font-size: 14px; }
#pl-j1 { flex-direction: row-reverse; text-align: right; }
.joueur canvas { width: 36px; height: 36px; border-radius: 50%; background: var(--feuille-claire); flex: none; }
.joueur span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.joueur.actif canvas { box-shadow: 0 0 0 3px var(--soleil); }
.pion { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.p4 .pion.x { background: #ff7a59; } .p4 .pion.o { background: #ffd34d; }
.morpion .pion.x { background: #ff7a59; } .morpion .pion.o { background: #3f8fd6; }
#pl-etat { font-size: 16px; font-weight: 800; text-align: center; color: var(--feuille-fonce); }
#pl-grille { display: grid; gap: 6px; justify-self: center; }
.morpion #pl-grille { grid-template-columns: repeat(3, 72px); }
.morpion #pl-grille button {
  height: 72px; border-radius: 16px; background: var(--creme-2); display: grid; place-items: center;
  font-size: 40px; font-weight: 800; line-height: 1;
}
.morpion #pl-grille button:disabled { cursor: default; }
.morpion #pl-grille .x { color: #ff7a59; } .morpion #pl-grille .o { color: #3f8fd6; }
.morpion #pl-grille .gagne { background: #fff1b8; }
.p4 #pl-grille { grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 8px; background: #4c84de; border-radius: 16px; width: 100%; }
.p4 #pl-grille button { display: grid; gap: 4px; background: transparent; padding: 0; border-radius: 10px; }
.p4 #pl-grille button:not(:disabled):active { background: rgba(255,255,255,.18); }
.p4 .trou { aspect-ratio: 1; border-radius: 50%; background: #cfe3ff; box-shadow: inset 0 2px 3px rgba(20, 50, 120, .35); }
.p4 .trou.x { background: #ff7a59; } .p4 .trou.o { background: #ffd34d; }
.p4 .trou.gagne { box-shadow: 0 0 0 3px #fff; }
.p4 .trou.tombe { animation: tombe .32s cubic-bezier(.4, 0, .6, 1); }
@keyframes tombe { from { transform: translateY(-260%); } }
.plateau-pied { display: flex; gap: 8px; justify-content: space-between; }
.plateau-pied button { padding: 9px 16px; border-radius: 999px; background: var(--creme-2); font-weight: 700; font-size: 15px; }

/* ---------- les classements ---------- */
.jeux-onglets { padding: 0; margin-bottom: 8px; flex-wrap: wrap; }
.jeux-onglets button { flex: 1 1 auto; background: var(--creme-2); }
#cl-podium { width: 100%; height: 170px; display: block; }
#cl-resume { margin: 6px 0 4px; text-align: center; font-weight: 700; font-size: 15px; color: var(--brun-doux); }
#cl-resume b { color: var(--feuille-fonce); }
#cl-liste { margin: 0; padding: 0 0 0 1.6em; font-size: 15px; font-weight: 600; }
#cl-liste li { padding: 3px 0; }
#cl-liste li span { float: right; font-variant-numeric: tabular-nums; color: var(--brun-doux); }
#cl-liste li.moi { color: var(--feuille-fonce); font-weight: 800; }

/* ---------- le nom du lieu, qui apparaît à l'arrivée ---------- */
#titre-lieu {
  position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%);
  font-size: clamp(30px, 7vw, 52px); font-weight: 800; color: #fffaee; letter-spacing: -.01em;
  text-shadow: 0 3px 0 rgba(43, 90, 40, .55), 0 10px 30px rgba(20, 50, 20, .35);
  pointer-events: none; opacity: 0; white-space: nowrap;
}
#titre-lieu.montre { animation: titre 2.6s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes titre {
  0% { opacity: 0; transform: translate(-50%, -40%) scale(.92); filter: blur(4px); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -56%); }
}

/* ---------- discussion ---------- */
#journal {
  position: absolute; left: calc(12px + var(--sal)); bottom: calc(76px + var(--sab) + var(--clavier));
  margin: 0; padding: 0; list-style: none; width: min(420px, calc(100% - 100px));
  display: flex; flex-direction: column; gap: 4px; pointer-events: none;
}
#journal li {
  align-self: flex-start; max-width: 100%;
  background: rgba(255, 250, 238, .92); border-radius: 14px; padding: 4px 11px;
  font-size: 15px; font-weight: 500; line-height: 1.3; box-shadow: 0 2px 8px rgba(40, 30, 20, .14);
  overflow-wrap: anywhere; transition: opacity .6s ease;
}
#journal li b { font-weight: 800; color: var(--feuille-fonce); }
#journal li.systeme { background: rgba(43, 127, 58, .88); color: #fffaee; font-weight: 600; }
#journal li.vieux { opacity: 0; }

#barre {
  position: absolute; left: 0; right: 0; bottom: var(--clavier);
  display: flex; gap: 8px; align-items: center;
  padding: 8px calc(12px + var(--sar)) calc(10px + var(--sab)) calc(12px + var(--sal));
}
#saisie {
  flex: 1; min-width: 0; height: 48px; padding: 0 18px;
  border: 0; border-radius: 999px; background: var(--creme);
  box-shadow: var(--ombre-douce); outline: none;
}
#saisie::placeholder { color: var(--brun-doux); opacity: 1; }
#saisie:focus-visible { box-shadow: var(--ombre-douce), 0 0 0 3px var(--soleil); }
.rond {
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center;
  background: var(--creme); color: var(--brun); box-shadow: var(--ombre-douce);
  transition: transform .12s ease-out;
}
.rond:active { transform: scale(.92); }
#b-envoyer { background: var(--feuille); color: #fff; box-shadow: var(--ombre-bouton); }
#b-envoyer svg { stroke-width: 2.6; }
#b-emotes[aria-expanded="true"] { background: var(--soleil); }

#emotes {
  position: absolute; left: calc(12px + var(--sal)); bottom: calc(70px + var(--sab) + var(--clavier));
  display: grid; grid-template-columns: repeat(4, 64px); gap: 6px;
  padding: 10px; background: var(--creme); border-radius: 22px; box-shadow: var(--ombre-douce);
  transform-origin: 24px 100%; animation: pop .22s cubic-bezier(.2, .9, .3, 1.2);
}
#emotes button {
  display: grid; justify-items: center; gap: 0; padding: 4px 0 2px; border-radius: 14px; background: transparent;
  font-size: 12.5px; font-weight: 700; color: var(--brun-doux);
}
#emotes button:active { background: var(--creme-2); transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { #emotes button:hover { background: var(--creme-2); } }
#emotes canvas { width: 46px; height: 46px; }
@keyframes pop { from { opacity: 0; transform: scale(.85) translateY(8px); } }

/* ---------- le bouton d'action (secouer, pêcher, sonner…) ---------- */
#b-action {
  position: absolute; right: calc(14px + var(--sar)); bottom: calc(78px + var(--sab) + var(--clavier));
  display: grid; justify-items: center; align-content: center; gap: 0;
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--soleil); color: var(--brun); box-shadow: var(--ombre-douce);
  font-weight: 800; font-size: 15px; line-height: 1.05;
  animation: pop .25s cubic-bezier(.2, .9, .3, 1.3);
  transition: transform .1s ease-out;
}
#b-action svg { width: 30px; height: 30px; stroke-width: 2.3; }
#b-action:active { transform: scale(.92); }
#b-action.discret { background: rgba(255, 250, 238, .78); color: var(--brun-doux); width: 72px; height: 72px; font-size: 14px; margin: 6px; }
#b-action.discret svg { width: 26px; height: 26px; }
#b-action.urgent { background: var(--corail); color: #fff; animation: tremble .35s ease-in-out infinite; }
@keyframes tremble { 0%, 100% { transform: rotate(0) scale(1.06); } 50% { transform: rotate(-4deg) scale(1.12); } }

/* ---------- la fiche d'un voisin ---------- */
#fiche {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(76px + var(--sab) + var(--clavier));
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px;
  background: var(--creme); border-radius: 22px; box-shadow: var(--ombre-douce);
  animation: pop .2s ease-out; max-width: calc(100% - 24px);
}
#fiche canvas { width: 48px; height: 48px; border-radius: 50%; background: var(--feuille-claire); }
#fiche div { display: grid; line-height: 1.15; min-width: 0; }
#fiche b { font-size: 17px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#fiche span { font-size: 13px; color: var(--brun-doux); font-weight: 600; }
#fiche button { padding: 8px 12px; border-radius: 999px; background: var(--feuille); color: #fff; font-weight: 700; font-size: 15px; white-space: nowrap; }
#fiche button + button { background: var(--rose); }

#etat-reseau {
  position: absolute; left: 50%; top: calc(64px + var(--sat)); transform: translateX(-50%);
  background: var(--brun); color: var(--creme); padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 15px;
}

/* ---------- panneaux (menu, lieux, collection) ---------- */
.panneau {
  position: fixed; z-index: 20; right: calc(12px + var(--sar)); top: calc(62px + var(--sat));
  width: min(360px, calc(100% - 24px)); max-height: calc(100dvh - 140px - var(--sat) - var(--sab));
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--creme); border-radius: 22px; box-shadow: var(--ombre-douce);
  padding: 12px 14px 16px; animation: pop .2s ease-out; transform-origin: 90% 0;
}
#lieux { left: calc(12px + var(--sal)); right: auto; transform-origin: 10% 0; }
.panneau-tete { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.panneau h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.panneau h3 { margin: 14px 0 6px; font-size: 16px; font-weight: 800; color: var(--brun-doux); }
.fermer { width: 40px; height: 40px; border-radius: 50%; background: var(--creme-2); font-size: 24px; line-height: 1; font-weight: 700; color: var(--brun-doux); }
.menu-liste { display: grid; gap: 6px; }
.menu-liste button, .lieu {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; min-height: 52px; padding: 8px 16px; border-radius: 16px;
  background: var(--creme-2); text-align: left; font-size: 17px; font-weight: 700;
}
.menu-liste button:active, .lieu:active { transform: scale(.98); background: #ece0c4; }
@media (hover: hover) and (pointer: fine) { .menu-liste button:hover, .lieu:hover { background: #efe4cb; } }
#liste-lieux { display: grid; gap: 6px; }
.lieu small { font-size: 14px; font-weight: 700; color: var(--feuille-fonce); background: var(--feuille-claire); border-radius: 999px; padding: 2px 10px; }
.lieu[aria-current="true"] { background: var(--feuille-claire); }
.lieu span { display: grid; line-height: 1.15; }
.lieu em { font-style: normal; font-size: 14px; font-weight: 600; color: var(--brun-doux); }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.grille figure { margin: 0; padding: 6px 4px 8px; border-radius: 14px; background: var(--creme-2); text-align: center; }
.grille canvas { width: 80px; height: 48px; display: block; margin: 0 auto; }
.grille figcaption { font-size: 13px; font-weight: 700; line-height: 1.15; }
.grille figcaption b { display: block; font-size: 12px; color: var(--brun-doux); font-weight: 700; }
.grille .inconnu figcaption { color: var(--brun-doux); }

/* ---------- la bulle de dialogue ---------- */
#dialogue {
  position: fixed; z-index: 30; inset: auto 0 0 0;
  display: flex; justify-content: center;
  padding: 0 calc(12px + var(--sar)) calc(16px + var(--sab)) calc(12px + var(--sal));
  pointer-events: none;
}
.dialogue-boite {
  position: relative; pointer-events: auto;
  width: min(560px, 100%); padding: 26px 22px 16px;
  background: var(--creme); border-radius: 34px 34px 30px 30px / 30px 30px 34px 34px;
  box-shadow: 0 10px 30px rgba(40, 30, 20, .3);
  animation: bulle .32s cubic-bezier(.2, .9, .3, 1.15);
  display: grid; gap: 10px;
}
@keyframes bulle { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.dialogue-nom {
  position: absolute; left: 22px; top: -16px; padding: 4px 16px; border-radius: 999px;
  background: var(--corail); color: #fff; font-weight: 800; font-size: 16px; transform: rotate(-3deg);
  box-shadow: 0 3px 8px rgba(120, 50, 30, .25);
}
#dialogue-image { width: 240px; height: 120px; justify-self: center; max-width: 100%; }
#dialogue-image.podium { width: 320px; height: 170px; }
#dialogue-texte { font-size: 18px; font-weight: 600; line-height: 1.4; text-wrap: pretty; }
#dialogue-texte p { margin: 0 0 6px; }
#dialogue-texte ol { margin: 4px 0 0; padding-left: 1.4em; }
#dialogue-texte strong { color: var(--feuille-fonce); }
#dialogue-ok { padding: 10px 22px; border-radius: 999px; background: var(--feuille); color: #fff; font-weight: 800; font-size: 17px; box-shadow: var(--ombre-bouton); }
#dialogue-ok:active { transform: scale(.95); }

/* ---------- l'accueil ---------- */
#accueil {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  padding: calc(14px + var(--sat)) calc(14px + var(--sar)) calc(14px + var(--sab)) calc(14px + var(--sal));
  overflow-y: auto; overscroll-behavior: contain;
  background: radial-gradient(120% 80% at 50% 110%, rgba(40, 90, 40, .45), rgba(40, 90, 40, 0) 60%);
}
.accueil-carte {
  width: min(440px, 100%); margin: auto;
  background: var(--creme); border-radius: 30px; box-shadow: 0 18px 50px rgba(20, 50, 20, .35);
  padding: 16px 18px 18px; display: grid; gap: 12px;
  animation: bulle .5s cubic-bezier(.2, .9, .3, 1.1);
}
.accueil-tete { display: flex; align-items: center; gap: 10px; }
.accueil-tete img { width: 40px; height: 40px; border-radius: 12px; }
.accueil-tete h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1; flex: 1; text-wrap: balance; }
.en-ligne {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 5px 11px; border-radius: 999px; background: var(--feuille-claire); color: var(--feuille-fonce);
  font-size: 14px; font-weight: 700;
}
.en-ligne::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--feuille); box-shadow: 0 0 0 3px rgba(63,163,77,.2); }
.apercu { position: relative; border-radius: 22px; overflow: hidden; background: linear-gradient(#bfe8f2, #dff3e0 62%); }
#apercu { display: block; width: 100%; height: 200px; }
#b-hasard { position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; }
.champ-nom { display: grid; gap: 4px; }
.champ-nom span { font-size: 15px; font-weight: 700; color: var(--brun-doux); padding-left: 6px; }
#nom {
  height: 52px; padding: 0 18px; border-radius: 16px; border: 2px solid var(--creme-2);
  background: #fff; font-weight: 700; font-size: 18px; outline: none;
}
#nom:focus { border-color: var(--feuille); }
#atelier { border-radius: 18px; background: var(--creme-2); }
#atelier summary {
  list-style: none; cursor: pointer; padding: 12px 16px; font-weight: 800; font-size: 16px;
  display: flex; justify-content: space-between; align-items: center; user-select: none;
}
#atelier summary::-webkit-details-marker { display: none; }
#atelier summary::after { content: ""; width: 10px; height: 10px; border: solid var(--brun-doux); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
#atelier[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.onglets { display: flex; gap: 4px; padding: 0 8px; overflow-x: auto; scrollbar-width: none; }
.onglets button { flex: 1; padding: 8px 10px; border-radius: 12px; background: transparent; font-weight: 700; font-size: 15px; color: var(--brun-doux); white-space: nowrap; }
.onglets button[aria-selected="true"] { background: var(--creme); color: var(--brun); box-shadow: 0 2px 6px rgba(60, 40, 20, .12); }
#options { padding: 8px 12px 14px; display: grid; gap: 10px; }
.rangee { display: grid; gap: 6px; }
.rangee > span { font-size: 14px; font-weight: 700; color: var(--brun-doux); padding-left: 2px; }
.choix { display: flex; flex-wrap: wrap; gap: 6px; }
.pastille-couleur {
  width: 36px; height: 36px; border-radius: 50%;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.12), 0 1px 3px rgba(0,0,0,.15);
  transition: transform .12s ease-out;
}
.pastille-couleur[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--creme), 0 0 0 6px var(--feuille); transform: scale(1.05); }
.vignette { width: 58px; height: 58px; border-radius: 16px; background: var(--creme); padding: 0; display: grid; place-items: center; }
.vignette canvas { width: 52px; height: 52px; }
.vignette[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--feuille); background: #fff; }
.puce { padding: 8px 14px; border-radius: 999px; background: var(--creme); font-weight: 700; font-size: 15px; }
.puce[aria-pressed="true"] { background: var(--feuille); color: #fff; }
.principal {
  height: 58px; border-radius: 999px; background: var(--feuille); color: #fff;
  font-size: 20px; font-weight: 800; letter-spacing: -.005em;
  box-shadow: var(--ombre-bouton); transition: transform .12s ease-out, background .2s;
}
.principal:active { transform: scale(.97); background: var(--feuille-fonce); }
@media (hover: hover) and (pointer: fine) { .principal:hover { background: #369445; } }
.principal:disabled { opacity: .6; }
.accueil-note { margin: -4px 0 0; text-align: center; font-size: 14px; font-weight: 600; color: var(--brun-doux); }

@media (min-width: 900px) {
  #accueil { justify-content: flex-start; padding-left: max(6vw, 40px); }
  .accueil-carte { margin: auto 0; }
}
@media (max-width: 400px) {
  .pastille { padding: 4px 11px 4px 8px; gap: 4px; font-size: 15px; }
  .hud-droite { gap: 5px; }
}
@media (max-height: 700px) and (max-width: 600px) {
  #apercu { height: 150px; }
  .accueil-carte { gap: 10px; padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- comment jouer ---------- */
#manche { cursor: pointer; }
.aide-jeu { display: block; font-size: 12.5px; font-weight: 700; color: var(--feuille-fonce); text-decoration: underline; text-underline-offset: 3px; }
#manche .aide-jeu { order: 3; margin-top: 2px; }
#manche { display: grid; }
#pl-regles { width: 40px; padding: 0; font-weight: 800; font-size: 18px; flex: none; }
.plateau-pied #pl-classement { margin-right: auto; }

/* ---------- la connexion ---------- */
#connexion {
  position: fixed; inset: 0; z-index: 45; display: flex; align-items: center; justify-content: center;
  padding: calc(14px + var(--sat)) calc(14px + var(--sar)) calc(14px + var(--sab)) calc(14px + var(--sal));
  overflow-y: auto; overscroll-behavior: contain;
  background: radial-gradient(120% 80% at 50% 110%, rgba(40, 90, 40, .45), rgba(40, 90, 40, 0) 60%);
}
@media (min-width: 900px) { #connexion { justify-content: flex-start; padding-left: max(6vw, 40px); } }
.accroche { margin: -2px 0 2px; font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--brun-doux); text-wrap: pretty; }
.google {
  display: flex; align-items: center; justify-content: center; gap: 10px; height: 54px; border-radius: 999px;
  background: #fff; border: 2px solid var(--creme-2); font-weight: 800; font-size: 17px; color: var(--brun);
  box-shadow: 0 2px 6px rgba(60, 40, 20, .1);
}
.google:active { transform: scale(.98); }
.separateur { display: flex; align-items: center; gap: 10px; color: var(--brun-doux); font-size: 14px; font-weight: 700; }
.separateur::before, .separateur::after { content: ""; flex: 1; height: 2px; background: var(--creme-2); border-radius: 2px; }
#connexion .onglets { padding: 4px; background: var(--creme-2); border-radius: 14px; }
#cx-form { display: grid; gap: 10px; }
.champ { display: grid; gap: 4px; }
.champ span { font-size: 15px; font-weight: 700; color: var(--brun-doux); padding-left: 6px; }
.champ input {
  height: 50px; padding: 0 16px; border-radius: 14px; border: 2px solid var(--creme-2);
  background: #fff; font-weight: 600; outline: none;
}
.champ input:focus { border-color: var(--feuille); }
#cx-erreur { margin: 0; padding: 8px 12px; border-radius: 12px; background: #ffe6de; color: #a3402a; font-weight: 700; font-size: 15px; }

/* ---------- le didacticiel ---------- */
#guide {
  position: fixed; z-index: 35; left: 0; right: 0; top: calc(64px + var(--sat));
  display: flex; justify-content: center; padding: 0 12px; pointer-events: none;
}
.guide-bulle {
  pointer-events: auto; width: min(420px, 100%);
  background: var(--brun); color: var(--creme); border-radius: 22px; padding: 12px 16px 12px;
  box-shadow: 0 10px 30px rgba(30, 20, 10, .35); animation: bulle .3s ease-out; display: grid; gap: 6px;
}
.guide-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.guide-tete b { font-size: 19px; font-weight: 800; color: var(--soleil); }
.guide-tete span { font-size: 13px; font-weight: 700; opacity: .75; font-variant-numeric: tabular-nums; }
#guide-texte { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.4; text-wrap: pretty; }
.guide-pied { display: flex; justify-content: space-between; gap: 8px; margin-top: 2px; }
.guide-pied button { padding: 8px 16px; border-radius: 999px; font-weight: 800; font-size: 15px; }
#guide-passer { background: transparent; color: var(--creme); opacity: .8; padding-left: 0; }
#guide-suivant { background: var(--soleil); color: var(--brun); }
.guide-cible { animation: cible 1.2s ease-in-out infinite !important; }
@keyframes cible { 0%, 100% { box-shadow: var(--ombre-douce), 0 0 0 0 rgba(255, 205, 74, .95); } 50% { box-shadow: var(--ombre-douce), 0 0 0 10px rgba(255, 205, 74, 0); } }

/* ---------- vélo, alerte de pêche ---------- */
#b-velo { position: absolute; right: calc(14px + var(--sar)); bottom: calc(172px + var(--sab) + var(--clavier)); background: #ff7a59; color: #fff; }
#alerte {
  position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%);
  display: grid; justify-items: center; gap: 0; pointer-events: none;
  padding: 12px 26px 14px; border-radius: 26px; background: var(--corail); color: #fff;
  box-shadow: 0 12px 30px rgba(160, 60, 30, .4); animation: alerte .5s cubic-bezier(.2, .9, .3, 1.4), vibre .18s ease-in-out .5s infinite;
}
#alerte b { font-size: clamp(30px, 8vw, 44px); font-weight: 800; line-height: 1.05; }
#alerte span { font-size: 16px; font-weight: 700; opacity: .9; }
@keyframes alerte { from { transform: translate(-50%, -50%) scale(.4); opacity: 0; } }
@keyframes vibre { 0%, 100% { transform: translate(-50%, -50%) rotate(-2deg); } 50% { transform: translate(-50%, -50%) rotate(2deg) scale(1.04); } }

/* ---------- la fête ---------- */
#fete { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(40, 60, 30, .45); animation: fondu .25s ease-out; }
@keyframes fondu { from { opacity: 0; } }
.fete-rayons {
  position: absolute; left: 50%; top: 44%; width: 160vmax; height: 160vmax; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(255, 236, 160, .38) 0 9deg, rgba(255, 236, 160, 0) 9deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 0 18%, transparent 52%); mask: radial-gradient(circle, #000 0 18%, transparent 52%);
  animation: rayons 14s linear infinite; pointer-events: none;
}
@keyframes rayons { to { transform: translate(-50%, -50%) rotate(360deg); } }
.fete-carte {
  position: relative; width: min(380px, 100%); background: var(--creme); border-radius: 30px; padding: 26px 20px 18px;
  display: grid; gap: 8px; justify-items: center; text-align: center; box-shadow: 0 20px 50px rgba(30, 20, 10, .35);
  animation: carte .55s cubic-bezier(.2, .9, .25, 1.25);
}
@keyframes carte { 0% { transform: scale(.3) rotate(-8deg); opacity: 0; } 60% { opacity: 1; } }
#fete-tag { position: absolute; top: -16px; padding: 5px 18px; border-radius: 999px; background: var(--soleil); color: var(--brun); font-weight: 800; font-size: 16px; transform: rotate(-3deg); box-shadow: 0 4px 10px rgba(120, 80, 20, .25); }
#fete-image { width: 240px; height: 130px; animation: flotte 2.6s ease-in-out infinite; }
@keyframes flotte { 50% { transform: translateY(-6px); } }
#fete-titre { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
#fete-texte { margin: 0; font-size: 17px; font-weight: 600; color: var(--brun-doux); line-height: 1.35; text-wrap: pretty; }
#fete-gains { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
#fete-gains span { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 999px; background: var(--feuille-claire); color: var(--feuille-fonce); font-weight: 800; font-size: 15px; animation: pop .4s cubic-bezier(.2, .9, .3, 1.4) both; }
#fete-gains span:nth-child(2) { animation-delay: .12s; } #fete-gains span:nth-child(3) { animation-delay: .24s; }
#fete-ok { width: 100%; margin-top: 4px; }
#confettis { position: fixed; inset: 0; width: 100vw; height: 100dvh; z-index: 55; pointer-events: none; }

/* ---------- la main qui montre ---------- */
#main-guide { position: fixed; z-index: 34; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
#main-guide svg { position: absolute; left: -6px; top: -4px; width: 46px; height: 46px; filter: drop-shadow(0 4px 6px rgba(40, 30, 20, .3)); animation: tape 1.3s cubic-bezier(.4, 0, .2, 1) infinite; transform-origin: 30% 10%; }
#main-guide .onde { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fffaee; opacity: 0; animation: onde 1.3s ease-out infinite; }
#main-guide .main-texte:not(:empty) { position: absolute; left: 50%; top: 50px; transform: translateX(-50%); white-space: nowrap; padding: 5px 12px; border-radius: 999px; background: var(--brun); color: var(--creme); font-size: 14px; font-weight: 800; }
@keyframes tape { 0%, 100% { transform: translate(14px, 18px) scale(1); } 35% { transform: translate(0, 0) scale(.92); } 50% { transform: translate(0, 0) scale(.86); } }
@keyframes onde { 0%, 30% { opacity: 0; transform: scale(.4); } 45% { opacity: .95; } 100% { opacity: 0; transform: scale(1.6); } }

/* ---------- le sac ---------- */
#sac-contenu { display: grid; gap: 8px; }
.mission { display: grid; grid-template-columns: 44px 1fr; gap: 4px 10px; align-items: center; padding: 8px 10px; border-radius: 16px; background: var(--creme-2); }
.mission canvas { grid-row: span 2; width: 44px; height: 44px; border-radius: 50%; background: var(--feuille-claire); }
.mission b { font-size: 15px; line-height: 1.15; }
.mission small { display: block; font-size: 13px; font-weight: 600; color: var(--brun-doux); }
.barre { height: 8px; border-radius: 99px; background: #e3d6b8; overflow: hidden; }
.barre i { display: block; height: 100%; border-radius: 99px; background: var(--feuille); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.mission.finie { background: var(--feuille-claire); }
.mission.prete { background: #fff1b8; }
.objets { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.objet { margin: 0; padding: 8px 6px; border-radius: 14px; background: var(--creme-2); text-align: center; display: grid; gap: 2px; justify-items: center; font-size: 13px; font-weight: 700; }
.objet canvas { width: 64px; height: 64px; }
.objet small { color: var(--brun-doux); font-weight: 600; }
.objet.verrou canvas { filter: grayscale(1) opacity(.45); }
.objet button { margin-top: 2px; padding: 5px 12px; border-radius: 999px; background: var(--feuille); color: #fff; font-weight: 800; font-size: 13px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badges span { padding: 5px 12px; border-radius: 999px; background: #fff1b8; font-weight: 800; font-size: 14px; }

/* ---------- le livre d'or ---------- */
.livre-intro { margin: 0 0 8px; font-weight: 600; color: var(--brun-doux); }
#livre-form { display: flex; gap: 6px; margin-bottom: 10px; }
#livre-form input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border-radius: 14px; border: 2px solid var(--creme-2); outline: none; }
#livre-form .principal { height: 46px; padding: 0 16px; font-size: 16px; }
#livre-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
#livre-liste li { padding: 8px 12px; border-radius: 14px; background: var(--creme-2); font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
#livre-liste li b { display: block; font-size: 13px; color: var(--feuille-fonce); }

/* ---------- dialogue avec un habitant ---------- */
#dialogue-image.portrait { width: 84px; height: 84px; justify-self: start; border-radius: 50%; background: var(--feuille-claire); position: absolute; left: 18px; top: -46px; box-shadow: 0 4px 12px rgba(40,30,20,.2); }
.dialogue-boite.avec-portrait .dialogue-nom { left: 112px; }
.dialogue-boite.avec-portrait { padding-top: 30px; }
#dialogue-texte .curseur::after { content: "▾"; display: inline-block; margin-left: 6px; color: var(--corail); animation: flotte 1s ease-in-out infinite; }
.compteur.bump { animation: bump .45s cubic-bezier(.2, .9, .3, 1.5); }
@keyframes bump { 40% { transform: scale(1.25); } }
.vol { position: fixed; z-index: 33; left: 0; top: 0; width: 36px; height: 36px; pointer-events: none; }

.vignette.verrou { position: relative; }
.vignette.verrou canvas { filter: grayscale(1) opacity(.45); }
.vignette.verrou::after { content: "à gagner"; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); padding: 0 6px; border-radius: 99px; background: var(--brun); color: var(--creme); font-size: 10px; font-weight: 800; white-space: nowrap; }

.dialogue-boutons { display: flex; justify-content: flex-end; gap: 8px; }
#dialogue-non { padding: 10px 18px; border-radius: 999px; background: var(--creme-2); font-weight: 800; font-size: 17px; }
.mission.jour { background: #d9f0ff; }
.mission.jour b::before { content: "Mission du jour · "; color: #2a7fa8; }
.objet.item canvas { width: 64px; height: 64px; }
.objet p { margin: 0; font-size: 12px; font-weight: 600; color: var(--brun-doux); line-height: 1.25; }

#b-skate { position: absolute; right: calc(14px + var(--sar)); bottom: calc(230px + var(--sab) + var(--clavier)); background: #5aa6e0; color: #fff; }
#b-skate[aria-pressed="true"] { background: #ff7a59; }
#c-pieces b { color: #a8730f; }
.porte-monnaie { margin: 0 0 8px; font-weight: 700; color: var(--brun-doux); }
.porte-monnaie b { font: 800 20px "Baloo 2", sans-serif; color: #a8730f; font-variant-numeric: tabular-nums; }
#bq-contenu { display: grid; gap: 8px; }
.article { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 16px; background: var(--creme-2); }
.article canvas { width: 64px; height: 64px; }
.article b { font-size: 15px; line-height: 1.15; }
.article small { display: block; font-size: 13px; font-weight: 700; color: #a8730f; }
.article button { padding: 8px 14px; border-radius: 999px; background: var(--feuille); color: #fff; font-weight: 800; font-size: 14px; white-space: nowrap; }
.article button:disabled { background: #d7cbb0; color: #8a7a62; }
.article.cher { background: #fff1b8; }
.gain-pieces { font-size: 20px !important; background: #fff1b8 !important; color: #a8730f !important; }

/* ---------- le joystick ---------- */
#joystick { position: fixed; z-index: 30; left: 0; top: 0; width: 132px; height: 132px; margin: -66px 0 0 -66px; pointer-events: none; opacity: .92; }
#joystick .fond { width: 132px; height: 132px; display: block; }
#joystick .bouton { position: absolute; left: 41px; top: 41px; width: 50px; height: 50px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.25)); }

/* ---------- les icônes « autocollant » (Fluent Emoji 3D) ---------- */
.sticker {
  filter: drop-shadow(1.5px 0 0 #fff) drop-shadow(-1.5px 0 0 #fff) drop-shadow(0 1.5px 0 #fff) drop-shadow(0 -1.5px 0 #fff) drop-shadow(0 3px 3px rgba(70, 50, 30, .25));
  -webkit-user-select: none; user-select: none; pointer-events: none;
}
.sticker.dore, .dore { filter: sepia(1) saturate(3.4) hue-rotate(-14deg) brightness(1.1) drop-shadow(1.5px 0 0 #fff) drop-shadow(-1.5px 0 0 #fff) drop-shadow(0 1.5px 0 #fff) drop-shadow(0 -1.5px 0 #fff) drop-shadow(0 3px 3px rgba(70, 50, 30, .25)); }
.pastille img.ic { width: 24px; height: 24px; margin: -2px 0; }
.rond img.ic { width: 28px; height: 28px; }
.objet img.sticker { width: 58px; height: 58px; margin: 4px auto 2px; display: block; }
.objet.verrou img { filter: grayscale(1) opacity(.4); }
.article img.sticker { width: 52px; height: 52px; justify-self: center; }
.mission .recompense { position: absolute; right: 10px; top: 8px; display: flex; gap: 2px; }
.mission { position: relative; }
.mission .recompense img { width: 26px; height: 26px; }
.menu-liste button img { width: 30px; height: 30px; margin-right: 4px; }
.menu-liste button { justify-content: flex-start; }
.badges span { display: inline-flex; align-items: center; gap: 6px; }
.badges span img { width: 26px; height: 26px; }
#fete-gains span img { width: 22px; height: 22px; }
.fete-carte::before, .fete-carte::after { content: ""; position: absolute; width: 46px; height: 46px; background: url(../img/icones/sakura.webp) center / contain no-repeat; filter: drop-shadow(0 3px 3px rgba(70, 50, 30, .2)); }
.fete-carte::before { left: -10px; top: 18px; transform: rotate(-18deg); }
.fete-carte::after { right: -8px; bottom: 70px; transform: rotate(14deg); width: 36px; height: 36px; }

.hud-haut { flex-wrap: nowrap; }
#b-place { margin-right: auto; margin-left: -2px; flex: none; }
/* les portraits des habitants */
.mission .portrait-pnj { grid-row: span 2; width: 44px; height: 44px; filter: drop-shadow(0 2px 3px rgba(70, 50, 30, .22)); }
#dialogue-image.portrait { background: radial-gradient(circle at 50% 40%, #fff 0 55%, var(--feuille-claire) 56%); }

/* ---------- le suivi : mission du jour, Halloween ---------- */
#suivi { position: absolute; left: calc(12px + var(--sal)); top: calc(60px + var(--sat)); display: grid; gap: 6px; justify-items: start; }
.suivi { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 5px; border-radius: 999px; background: rgba(255, 250, 238, .94); box-shadow: var(--ombre-douce); text-align: left; max-width: 230px; }
.suivi img { width: 30px; height: 30px; flex: none; }
.suivi span { display: grid; line-height: 1.1; min-width: 0; }
.suivi b { font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suivi small { font-size: 12px; font-weight: 700; color: var(--brun-doux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suivi .barre { height: 5px; margin-top: 3px; width: 120px; }
#suivi-jour.pret { background: #fff1b8; animation: tremble .5s ease-in-out 2; }
#suivi-halloween b { color: #e07a1f; }
@media (max-width: 400px) { .suivi { max-width: 190px; } }
@media (max-width: 600px) {
  #suivi { grid-auto-flow: column; }
  .suivi { max-width: 168px; padding-right: 10px; }
  .suivi b { display: none; }
  .suivi small { font-size: 12.5px; color: var(--brun); }
  #manche { top: calc(106px + var(--sat)); }
}
/* le joystick : discret, presque transparent */
#joystick { opacity: .38; }
#joystick .bouton { filter: none; }
/* les visages dans la discussion */
#journal li canvas.tete-mini { width: 22px; height: 22px; vertical-align: -6px; margin-right: 5px; border-radius: 50%; background: var(--feuille-claire); }

/* ---------- moins de texte à l'écran : discussion et bandeau, semi-transparents ---------- */
#journal li { background: rgba(36, 28, 20, .5); color: #fffaee; box-shadow: none; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); font-weight: 600; font-size: 14px; padding: 3px 10px; }
#journal li b { color: #c9f7a6; }
#journal li.systeme { background: rgba(36, 28, 20, .42); color: #fff4d6; font-weight: 600; }
#bandeau {
  position: absolute; left: 50%; top: calc(108px + var(--sat)); transform: translateX(-50%);
  display: grid; gap: 1px; justify-items: center; text-align: center; max-width: min(340px, calc(100% - 24px));
  padding: 8px 16px 9px; border-radius: 18px; background: rgba(36, 28, 20, .58); color: #fffaee;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fondu .3s ease-out;
}
#bandeau b { font-size: 16px; font-weight: 800; color: #ffd65a; }
#bandeau span { font-size: 14px; font-weight: 600; line-height: 1.3; }
#bandeau em { font-style: normal; font-size: 12.5px; font-weight: 800; color: #c9f7a6; margin-top: 2px; }
@media (max-width: 600px) { #bandeau { top: calc(150px + var(--sat)); } }

/* ---------- l'écran de jeu épuré (23/10/2026) : le monde d'abord, l'interface en retrait ---------- */
/* les pastilles du haut : plus petites, translucides */
.pastille { background: rgba(255, 250, 238, .74); backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2); box-shadow: 0 2px 10px rgba(40, 30, 20, .12); min-height: 38px; font-size: 15px; }
.pastille.rond { width: 40px; height: 40px; }
@media (hover: hover) and (pointer: fine) { .pastille:hover { background: rgba(255, 255, 255, .92); } }
/* le suivi (mission du jour, Halloween) : sur téléphone, juste un rond qui se remplit */
.suivi { background: rgba(255, 250, 238, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 2px 10px rgba(40, 30, 20, .1); }
@media (max-width: 600px) {
  #suivi { top: calc(56px + var(--sat)); gap: 6px; }
  .suivi { width: 40px; height: 40px; padding: 3px; border-radius: 50%; justify-content: center;
    background: conic-gradient(var(--feuille) calc(var(--p, 0) * 1%), rgba(255, 250, 238, .72) 0); }
  .suivi > span { display: none; }
  .suivi > img, .suivi > canvas { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 250, 238, .96); }
  #suivi-halloween { background: conic-gradient(#e07a1f calc(var(--p, 0) * 1%), rgba(255, 250, 238, .72) 0); }
}
/* la cueillette : un petit compteur en haut, au verger seulement */
#manche { padding: 5px 14px; min-width: 0; border-radius: 999px; background: rgba(36, 28, 20, .5); color: #fffaee; box-shadow: none;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; align-items: center; gap: 10px; }
.manche-tete { font-size: 15px; }
.manche-tete svg { color: #ffd65a; width: 18px; height: 18px; }
.manche-tete b { color: #ffd65a; }
#manche .aide-jeu, #manche-top li:nth-child(n+2) { display: none; }
#manche-top { margin: 0; font-size: 14px; }
#manche-top li { gap: 6px; }
#manche-top:empty::before { content: "Ramasse les fruits\00a0!"; color: #fff4d6; }
@media (max-width: 600px) { #manche { top: calc(104px + var(--sat)); } }
/* le bouton d'action : moins gros */
#b-action { width: 68px; height: 68px; font-size: 13px; box-shadow: 0 4px 14px rgba(40, 30, 20, .18); }
#b-action svg { width: 26px; height: 26px; }
#b-action.discret { width: 54px; height: 54px; font-size: 11.5px; margin: 7px; background: rgba(255, 250, 238, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
#b-action.discret svg { width: 22px; height: 22px; }
/* la discussion : en bas, translucide ; sur un écran tactile, repliée en un bouton */
#barre .rond { background: rgba(255, 250, 238, .74); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); width: 44px; height: 44px; }
#b-envoyer { background: var(--feuille) !important; }
#saisie { height: 44px; background: rgba(255, 250, 238, .8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
#b-discuter { display: none; }
@media (pointer: fine) { #barre { left: 50%; right: auto; transform: translateX(-50%); width: min(560px, 100%); } }
@media (pointer: coarse) {
  #barre { right: auto; }
  #barre:not(.ouverte) #saisie, #barre:not(.ouverte) #b-envoyer { display: none; }
  #barre:not(.ouverte) #b-discuter { display: inline-grid; }
  #barre.ouverte { right: 0; }
  #journal { bottom: calc(66px + var(--sab) + var(--clavier)); width: min(330px, calc(100% - 96px)); }
}
#journal li { font-size: 13px; padding: 2px 9px; }

/* ---------- mes amis ---------- */
.point-rouge { position: absolute; top: 4px; right: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--corail); box-shadow: 0 0 0 2px var(--creme); }
#b-menu { position: relative; }
#amis-contenu { display: grid; gap: 8px; }
#amis-contenu h3 { margin: 10px 0 2px; }
#amis-contenu .vide { margin: 4px 0; color: var(--brun-doux); font-weight: 600; line-height: 1.4; }
.ami { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 16px; background: var(--creme-2); }
.ami-tete { width: 44px; height: 44px; border-radius: 50%; background: var(--feuille-claire); flex: none; }
.ami-nom { flex: 1; min-width: 0; display: grid; line-height: 1.15; }
.ami-nom b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ami-nom small { font-size: 13px; font-weight: 700; color: var(--brun-doux); }
.ami.connecte .ami-nom small { color: var(--feuille-fonce); }
.ami.connecte .ami-nom small::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--feuille); vertical-align: 1px; }
.ami button { padding: 8px 13px; border-radius: 999px; font-weight: 800; font-size: 14px; white-space: nowrap; min-height: 38px; }
.ami button.principal { width: auto; background: var(--feuille); color: #fff; }
.ami button.secondaire { background: #e8dcc2; color: var(--brun); }
.ami button.lien { background: transparent; color: var(--brun-doux); padding: 8px 6px; }
#fiche-ami { background: var(--feuille); color: #fff; }
#fiche-ami:disabled { background: #d7cbb0; color: #8a7a62; }

/* ---------- le texte en grand (menu : « Texte : grand ») ---------- */
html.texte-grand #journal li { font-size: 16px; }
html.texte-grand .pastille { font-size: 17px; }
html.texte-grand .panneau { font-size: 17px; }
html.texte-grand .panneau h2 { font-size: 25px; }
html.texte-grand .article b, html.texte-grand .ami-nom b { font-size: 18px; }
html.texte-grand .article small, html.texte-grand .ami-nom small { font-size: 15px; }
html.texte-grand #dialogue-texte { font-size: 21px; }
html.texte-grand #bandeau span { font-size: 16px; }
html.texte-grand .menu-liste button { font-size: 18px; }
html.texte-grand #b-action { font-size: 15px; }
.ami button.retirer { width: 34px; min-height: 34px; padding: 0; font-size: 22px; line-height: 1; flex: none; }
.ami { min-width: 0; }
