@font-face { font-family: 'Fredoka'; src: url('/fredoka.ttf') format('truetype'); font-weight: 300 700; font-display: swap; }

:root {
  --ink: #3a2614; --cream: #fff6e0; --paper: #fffaf0; --wood: #c98d4b; --wood-d: #9b6431; --wood-l: #e2b277;
  --red: #e8322b; --yellow: #ffd34d; --green: #46a35a; --blue: #2f8fd6; --pink: #ff7c9c; --sky: #7cc8f5;
  --shadow: 0 5px 0 var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: 'Fredoka', 'Trebuchet MS', 'Comic Sans MS', system-ui, sans-serif; color: var(--ink); font-size: 16px;
  background: #7cc8f5 url('/scene.svg') center bottom / cover fixed no-repeat;
}
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.15; }
small { opacity: .8; }

/* ---------- HUD ---------- */
.hud {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 8px 14px; background: linear-gradient(#d99a55, #b97636); border-bottom: 4px solid var(--ink);
  box-shadow: 0 4px 0 rgba(58, 38, 20, .35);
}
.logo { display: flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 700; font-size: 26px; color: #fff; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; letter-spacing: .5px; }
.logo .artbox { width: 48px; height: 44px; display: inline-flex; }
.logo .artbox svg { width: 100%; height: 100%; }
.hud-items { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 3px solid var(--ink); border-radius: 999px;
  background: var(--cream); font-weight: 600; text-decoration: none; box-shadow: 0 3px 0 var(--ink); white-space: nowrap;
}
.chip-btn { cursor: pointer; }
.coins { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.coin-i { display: inline-flex; }

/* ---------- Mise en page ---------- */
.main { max-width: 1200px; margin: 0 auto; padding: 18px 14px 120px; }
.artbox { display: inline-block; line-height: 0; }
.artbox svg { width: 100%; height: auto; overflow: visible; }

/* ---------- Accueil ---------- */
.home { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 24px; align-items: center; padding-top: 10px; }
.welcome { position: relative; text-align: center; }
.home-hen { width: 100%; max-width: 300px; filter: drop-shadow(0 6px 0 rgba(58, 38, 20, .25)); }
.bubble {
  position: relative; display: inline-block; background: #fff; border: 4px solid var(--ink); border-radius: 24px; padding: 10px 16px;
  font-weight: 600; box-shadow: var(--shadow); margin-bottom: 14px;
}
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -16px; border: 12px solid transparent; border-top-color: var(--ink); transform: translateX(-50%); }
.signs { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; }
.sign {
  position: relative; display: flex; flex-direction: column; align-items: center; text-decoration: none; padding: 12px 10px 0;
  background: linear-gradient(#fff9ea, #f7e6c2); border: 4px solid var(--ink); border-radius: 20px; box-shadow: 0 7px 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.sign:nth-child(odd) { transform: rotate(-1.5deg); }
.sign:nth-child(even) { transform: rotate(1.2deg); }
.sign:hover, .sign:focus-visible { transform: translateY(-4px) rotate(0) scale(1.03); box-shadow: 0 11px 0 var(--ink); outline: none; }
.sign:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--ink); }
.sign-art { width: 100%; max-width: 130px; height: 100px; display: flex; align-items: center; justify-content: center; }
.sign-art svg { max-height: 100px; width: auto; max-width: 100%; }
.plank {
  width: calc(100% + 8px); margin: 8px -4px -4px; padding: 10px 8px; text-align: center; font-weight: 700; font-size: 19px; color: #fff;
  background: repeating-linear-gradient(90deg, #c98d4b 0 38px, #bf8341 38px 40px); border: 4px solid var(--ink); border-radius: 0 0 18px 18px;
  -webkit-text-stroke: 1.2px var(--ink); paint-order: stroke fill; letter-spacing: .3px;
}
.plank::before, .plank::after { content: ''; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #6d4a28; margin-top: 7px; }
.plank::before { left: 12px; } .plank::after { right: 12px; }
.badge {
  position: absolute; top: -12px; right: -10px; z-index: 2; min-width: 32px; height: 32px; padding: 0 6px; display: grid; place-items: center;
  background: var(--red); color: #fff; font-weight: 700; border: 3px solid var(--ink); border-radius: 999px; animation: wobble 1.6s ease-in-out infinite;
}

/* ---------- Panneau (page) ---------- */
.board {
  position: relative; background: var(--paper); border: 5px solid var(--ink); border-radius: 26px;
  box-shadow: 0 8px 0 var(--ink), inset 0 0 0 8px var(--wood-l), inset 0 0 0 12px var(--wood);
  padding: 14px 18px 22px;
}
.board.full { min-height: calc(100vh - 140px); }
.board-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin: 6px 4px 14px; }
.back {
  justify-self: start; padding: 8px 14px 8px 12px; background: var(--wood); color: #fff; font-weight: 700; text-decoration: none; border: 3px solid var(--ink);
  border-radius: 8px 20px 20px 8px; box-shadow: 0 4px 0 var(--ink); -webkit-text-stroke: .8px var(--ink); paint-order: stroke fill;
}
.back:hover { background: var(--wood-d); }
.spacer { width: 110px; }
.ribbon { justify-self: center; margin: 0; text-align: center; }
.ribbon span {
  position: relative; display: inline-block; padding: 8px 30px; background: var(--red); color: #fff; font-size: clamp(22px, 3.4vw, 32px);
  border: 4px solid var(--ink); border-radius: 10px; box-shadow: 0 5px 0 var(--ink); -webkit-text-stroke: 1.2px var(--ink); paint-order: stroke fill;
}
.board-body { padding: 4px; }
.card { background: #fff; border: 4px solid var(--ink); border-radius: 18px; padding: 14px 16px; box-shadow: 0 5px 0 var(--ink); }
.center { text-align: center; }
.hint { opacity: .85; font-size: 15px; }
.muted { opacity: .7; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tag { display: inline-block; padding: 2px 10px; border: 2.5px solid var(--ink); border-radius: 999px; background: #f3e3c3; font-size: 14px; font-weight: 600; }
.tag.ok { background: #bfe8a8; } .tag.love { background: #ffd1dc; }
.pill { display: inline-block; padding: 3px 10px; margin: 3px; border: 2.5px solid var(--ink); border-radius: 999px; background: #fff4dc; font-size: 14px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 10px 16px; cursor: pointer; text-decoration: none;
  background: var(--yellow); border: 3.5px solid var(--ink); border-radius: 14px; box-shadow: 0 5px 0 var(--ink); font-weight: 700; font-size: 16px;
  transition: transform .08s ease, box-shadow .08s ease, filter .1s;
}
.btn:hover:not(:disabled) { filter: brightness(1.07); transform: translateY(-1px); box-shadow: 0 6px 0 var(--ink); }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn:disabled { cursor: not-allowed; filter: grayscale(.85); opacity: .55; }
.b-feed { background: #ffcf6b; } .b-water { background: #8fd3ff; } .b-wash { background: #d6c6ff; } .b-heal { background: #a6e3a1; }
.b-buy { background: #7fd16a; } .b-harvest { background: #ffb347; } .b-love { background: #ff8fab; color: #fff; -webkit-text-stroke: .8px var(--ink); paint-order: stroke fill; }
.b-sell { background: #ffe066; } .b-seed { background: #fff4dc; flex-direction: column; padding: 6px 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.pulse { animation: pulse 1.2s ease-in-out infinite; }

/* ---------- Jauges ---------- */
.gauge { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.g-icon { font-size: 26px; width: 34px; text-align: center; }
.g-main { flex: 1; }
.g-label { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; margin-bottom: 3px; }
.bar { position: relative; height: 18px; background: #f1e3c8; border: 3px solid var(--ink); border-radius: 999px; overflow: hidden; }
.bar.thin { height: 11px; border-width: 2px; }
.bar.big { height: 34px; margin: 12px 0; }
.bar-t { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; }
.fill { height: 100%; border-radius: 999px; transition: width .6s ease; background-image: linear-gradient(rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 60%); }
.fill.good { background-color: #6cc24a; } .fill.mid { background-color: #ffb935; } .fill.bad { background-color: #ef4b3f; } .fill.weight { background-color: #e8a04a; }
.bar.w { overflow: visible; }
.bar.w .mark { position: absolute; right: 2px; top: -3px; font-size: 15px; line-height: 1; }
.status { padding: 8px 12px; margin: 8px 0; border: 3px solid var(--ink); border-radius: 12px; font-weight: 600; }
.status.good { background: #d8f3c8; } .status.mid { background: #ffe8b0; } .status.bad { background: #ffc9c2; animation: shake 2.5s ease-in-out infinite; } .status.love { background: #ffd9e2; }

/* ---------- Ma cocotte ---------- */
.hen-page { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; align-items: start; }
.yard {
  position: relative; min-height: 460px; border: 4px solid var(--ink); border-radius: 22px; overflow: hidden; display: flex; align-items: flex-end; justify-content: center;
  background: radial-gradient(ellipse at 50% 115%, #e9c66e 0 34%, transparent 35%), linear-gradient(#bfe6ff 0 40%, #8fd16a 40% 100%);
  box-shadow: inset 0 -12px 0 rgba(58, 38, 20, .1);
}
.yard::before { /* clôture */
  content: ''; position: absolute; left: 0; right: 0; top: 30%; height: 60px;
  background: linear-gradient(transparent 14px, #dca361 14px 26px, transparent 26px 36px, #dca361 36px 48px, transparent 48px),
    repeating-linear-gradient(90deg, transparent 0 46px, #c98d4b 46px 62px);
  border-top: none; opacity: .95;
}
.big-hen { position: relative; width: min(100%, 400px); margin-bottom: 30px; filter: drop-shadow(0 6px 0 rgba(58, 38, 20, .2)); }
.thought {
  position: absolute; top: 18px; right: 18%; z-index: 2; font-size: 38px; background: #fff; border: 4px solid var(--ink); border-radius: 50%;
  width: 76px; height: 76px; display: grid; place-items: center; animation: floaty 2.4s ease-in-out infinite;
}
.thought::after { content: ''; position: absolute; left: -6px; bottom: -14px; width: 18px; height: 18px; background: #fff; border: 3px solid var(--ink); border-radius: 50%; }
.yard-props { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 8px; }
.trough, .feeder { padding: 4px 10px; background: #fff4dc; border: 3px solid var(--ink); border-radius: 10px; font-weight: 700; }
.nameplate {
  position: absolute; top: 12px; left: 14px; padding: 6px 16px; background: var(--wood); color: #fff; font-weight: 700; font-size: 22px; border: 3px solid var(--ink);
  border-radius: 8px; box-shadow: 0 4px 0 var(--ink); -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; transform: rotate(-3deg);
}
.hen-info { background: #fff; border: 4px solid var(--ink); border-radius: 22px; padding: 16px 18px; box-shadow: 0 5px 0 var(--ink); }
.hen-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hen-title h2 { margin: 0; font-size: 30px; }
.weight small { display: block; margin-top: 4px; }
.meal-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0; font-weight: 600; }
.meal-line .next { width: 100%; font-weight: 500; }
.ok { color: #2e7d32; font-weight: 700; }
.meals { display: inline-flex; gap: 2px; }
.meals .dot { filter: grayscale(1); opacity: .3; font-size: 18px; }
.meals .dot.on { filter: none; opacity: 1; }
.foods { display: flex; flex-wrap: wrap; gap: 8px; }
.food {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: #fff4dc; border: 3px solid var(--ink); border-radius: 12px; cursor: pointer; box-shadow: 0 3px 0 var(--ink);
}
.food.on { background: var(--yellow); transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }
.food b { background: #fff; padding: 0 6px; border-radius: 6px; border: 2px solid var(--ink); }
.f-emo { font-size: 20px; }

/* ---------- Mes petits ---------- */
.petits-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.stats { font-weight: 700; font-size: 18px; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; }
.pg { padding: 6px 12px; border: 3px solid var(--ink); border-radius: 10px; background: #fff4dc; cursor: pointer; font-weight: 600; box-shadow: 0 3px 0 var(--ink); }
.pg.on { background: var(--wood); color: #fff; }
.bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0; padding: 10px 14px; background: #fff; border: 4px dashed var(--ink); border-radius: 16px; }
.bulk-t { font-weight: 700; }
.bulk .actions { margin: 0; }
.cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 14px; padding: 14px; border: 5px solid var(--ink); border-radius: 18px;
  background: repeating-linear-gradient(0deg, #a9a2b6 0 4px, #c7c1d3 4px 30px); /* grillage de la batterie */ }
.case {
  position: relative; display: flex; flex-direction: column; align-items: center; padding: 8px; min-height: 270px;
  background: linear-gradient(transparent 70%, #f2cf7a 70%), #fff7e6; border: 4px solid var(--ink); border-radius: 12px;
  box-shadow: inset 0 0 0 5px #d9a35e, 0 4px 0 var(--ink);
}
.case.sick { background: linear-gradient(transparent 70%, #d7e7a0 70%), #f0fbe2; }
.case.empty, .case.locked { justify-content: center; gap: 6px; opacity: .8; font-weight: 600; }
.case.locked { background: repeating-linear-gradient(45deg, #ddd 0 10px, #eee 10px 20px); font-size: 26px; }
.case.locked small { font-size: 13px; }
.straw { width: 70%; height: 22px; background: repeating-linear-gradient(80deg, #f2cf7a 0 4px, #d9a648 4px 6px); border: 3px solid var(--ink); border-radius: 999px; }
.case-head { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 4px; }
.pname { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sex { font-weight: 700; font-size: 18px; padding: 0 6px; border-radius: 6px; border: 2px solid var(--ink); }
.sex.f { background: #ffd1dc; } .sex.m { background: #cfe6ff; }
.flags { position: absolute; top: 34px; right: 6px; display: flex; flex-direction: column; gap: 2px; z-index: 1; }
.flag { font-size: 18px; animation: wobble 1.8s ease-in-out infinite; }
.case-hen { width: 110px; height: 100px; display: flex; justify-content: center; }
.case-hen svg { height: 100%; width: auto; }
.case-info { width: 100%; font-size: 14px; text-align: center; }
.stage { font-weight: 600; }
.sm small { font-size: 12px; }
.mini-g { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; font-weight: 600; }
.mini-g .bad { color: #c62828; }
.mini-g .meals .dot { font-size: 11px; }
.danger { color: #c62828; font-weight: 700; }
.case-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; margin-top: auto; padding-top: 6px; }
.case-actions .btn { padding: 4px 7px; border-width: 2.5px; border-radius: 10px; box-shadow: 0 3px 0 var(--ink); font-size: 15px; }
.empty-note { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; text-align: center; padding: 10px; }
.mini { width: 90px; }

/* ---------- Champs ---------- */
.plots { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin: 12px 0; }
.plot { background: #fff; border: 4px solid var(--ink); border-radius: 18px; padding: 10px; box-shadow: 0 5px 0 var(--ink); text-align: center; }
.plot-n { font-weight: 700; font-size: 18px; }
.plot-art { width: 100%; }
.plot-body { min-height: 60px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.seeds { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; align-items: center; }
.seeds > small { width: 100%; font-weight: 600; }
.stock { margin-top: 10px; }

/* ---------- Grange ---------- */
.grange { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.shelf-box { grid-column: 1 / -1; padding: 14px; border: 4px solid var(--ink); border-radius: 18px; background: #a8301f; color: #fff; box-shadow: 0 5px 0 var(--ink); }
.shelf-box h3 { -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; padding: 12px; background: #7a2014; border: 3px solid var(--ink); border-radius: 12px; }
.item { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; background: #fff4dc; color: var(--ink); border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 4px 0 var(--ink); }
.i-emo { font-size: 30px; line-height: 1.1; }
.item b { font-size: 20px; }
.shop-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 2px dashed #e0cfa9; }
.shop-row:last-child { border-bottom: none; }
.shop-row.owned { opacity: .75; }
.sr-t { flex: 1; display: flex; flex-direction: column; }
.water-tank { position: relative; height: 110px; margin: 6px 0 12px; border: 4px solid var(--ink); border-radius: 12px 12px 30px 30px; background: #e8d9bd; overflow: hidden; display: grid; place-items: center; }
.water-tank .water { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(#8fd3ff, #3ba3e8); transition: height .6s ease; }
.water-tank span { position: relative; font-weight: 700; font-size: 20px; background: rgba(255, 255, 255, .8); padding: 2px 10px; border-radius: 10px; border: 2px solid var(--ink); }
.trough-card small { display: block; margin-top: 8px; }

/* ---------- Coq ---------- */
.coq-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; font-weight: 600; }
.coq-top .status { margin: 0; flex: 1; min-width: 240px; }
.hen-select { padding: 8px 10px; border: 3px solid var(--ink); border-radius: 12px; background: #fff4dc; font-weight: 600; }
.coqs { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin-bottom: 16px; }
.coq-card { position: relative; text-align: center; padding: 14px; border: 4px solid var(--ink); border-radius: 20px; box-shadow: 0 6px 0 var(--ink); background: #fff; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.coq-card.t-gaston { background: linear-gradient(#e9e3d8, #fff); }
.coq-card.t-marcel { background: linear-gradient(#ffe2c4, #fff); }
.coq-card.t-napoleon { background: linear-gradient(#fff1a8, #fff); box-shadow: 0 6px 0 var(--ink), 0 0 0 6px #ffd34d; }
.coq-card.locked { filter: grayscale(.6); }
.coq-art { width: 190px; }
.coq-title { font-style: italic; opacity: .85; }
.coq-petits { font-weight: 700; font-size: 18px; }
.coq-card p { flex: 1; }
.price-tag { position: absolute; top: 10px; right: 10px; padding: 4px 10px; background: var(--yellow); border: 3px solid var(--ink); border-radius: 10px; transform: rotate(6deg); box-shadow: 0 3px 0 var(--ink); }

/* ---------- Mission ---------- */
.levels { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.lvl { display: flex; flex-direction: column; align-items: center; width: 130px; text-align: center; font-weight: 600; opacity: .6; }
.lvl-n { width: 54px; height: 54px; display: grid; place-items: center; border: 4px solid var(--ink); border-radius: 50%; background: #fff; font-size: 24px; font-weight: 700; box-shadow: 0 4px 0 var(--ink); margin-bottom: 6px; }
.lvl.done { opacity: 1; } .lvl.done .lvl-n { background: #7fd16a; }
.lvl.cur { opacity: 1; } .lvl.cur .lvl-n { background: var(--yellow); animation: pulse 1.6s ease-in-out infinite; }
.races { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 16px; }
.race-card { text-align: center; padding: 16px; border: 4px solid var(--ink); border-radius: 20px; box-shadow: 0 6px 0 var(--ink); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.race-card.r-ponte { background: linear-gradient(#ffe2c4, #fff); }
.race-card.r-chair { background: linear-gradient(#e8f0ff, #fff); }
.race-art { width: 180px; }
.goal { font-weight: 700; font-size: 18px; margin: 4px 0 10px; }
.mission-card { max-width: 640px; margin: 0 auto; }
.seal { font-size: 54px; }
.big-goal { font-size: 24px; font-weight: 700; margin: 6px 0; }
.trophy { font-size: 90px; animation: floaty 2s ease-in-out infinite; }

/* ---------- Journal, comice, règles ---------- */
.journal { list-style: none; padding: 0; margin: 0; }
.journal li { display: flex; gap: 12px; padding: 10px 12px; margin-bottom: 8px; background: #fff; border: 3px solid var(--ink); border-radius: 12px; }
.journal time { flex: none; width: 110px; font-weight: 600; opacity: .7; text-transform: capitalize; }
.journal .j-mauvais { background: #ffe3de; } .journal .j-oeuf { background: #fffbe6; } .journal .j-coeur { background: #ffe6ee; } .journal .j-piece { background: #fff4c2; }
.comice { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.comice th { text-align: left; padding: 6px 10px; }
.comice td { padding: 6px 10px; background: #fff; border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.comice td:first-child { border-left: 3px solid var(--ink); border-radius: 12px 0 0 12px; font-weight: 700; }
.comice td:last-child { border-right: 3px solid var(--ink); border-radius: 0 12px 12px 0; }
.comice tr.me td { background: #fff1a8; }
.td-hen { display: flex; align-items: center; gap: 6px; }
.tiny { width: 34px; }
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.rules .intro { grid-column: 1 / -1; font-size: 18px; background: #fff4dc; border: 3px dashed var(--ink); border-radius: 14px; padding: 12px 16px; margin: 0; }
.rule { background: #fff; border: 4px solid var(--ink); border-radius: 18px; padding: 12px 16px; box-shadow: 0 5px 0 var(--ink); }
.rule ul { margin: 0; padding-left: 20px; } .rule li { margin: 5px 0; }
.food-table { display: block; margin-top: 4px; }

/* ---------- Connexion ---------- */
.auth { max-width: 760px; margin: 0 auto; padding: 30px 14px 140px; }
.title-board { text-align: center; margin-bottom: 18px; }
.game-title {
  font-size: clamp(64px, 14vw, 120px); margin: 0; color: #ffd34d; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; letter-spacing: 2px;
  text-shadow: 0 8px 0 var(--ink); transform: rotate(-3deg); animation: floaty 3s ease-in-out infinite;
}
.title-board p { display: inline-block; margin-top: 18px; background: #fff; padding: 6px 16px; border: 3px solid var(--ink); border-radius: 999px; font-weight: 600; font-size: 18px; box-shadow: 0 4px 0 var(--ink); }
.tabs { display: flex; gap: 8px; margin: 8px 0 16px; }
.tab { flex: 1; padding: 10px; cursor: pointer; border: 3.5px solid var(--ink); border-radius: 14px; background: #f3e3c3; font-weight: 700; font-size: 18px; }
.tab.on { background: var(--yellow); box-shadow: 0 4px 0 var(--ink); }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.form input { padding: 10px 12px; border: 3px solid var(--ink); border-radius: 12px; background: #fffdf6; font-size: 17px; }
.form input:focus { outline: 4px solid #ffd34d; }
.signup-grid { display: grid; grid-template-columns: 1fr 220px; gap: 16px; }
.signup-grid > div:first-child { display: flex; flex-direction: column; gap: 12px; }
.plum-pick { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.preview { width: 190px; }
.plums { display: flex; gap: 8px; }
.plum { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--ink); cursor: pointer; }
.plum.on { outline: 4px solid var(--red); outline-offset: 2px; }
.p-rousse { background: #e07b39; } .p-blanche { background: #fffaf0; } .p-noire { background: #45434f; } .p-grise { background: #b3b3c0; } .p-doree { background: #f5c54f; }
.auth-hens { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin-top: 20px; }
.auth-hens .artbox { width: 140px; }
.auth-hens .artbox:nth-child(2) { width: 90px; }

/* ---------- Modale, toasts, effets ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(58, 38, 20, .45); display: grid; place-items: center; padding: 16px; }
.modal { width: min(420px, 100%); padding: 22px; }
.modal hr { border: none; border-top: 3px dashed #d8c39b; margin: 16px 0; }
#toasts { position: fixed; z-index: 60; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(560px, 94vw); pointer-events: none; }
.toast { padding: 10px 18px; background: #fff; border: 3.5px solid var(--ink); border-radius: 16px; font-weight: 600; box-shadow: 0 5px 0 var(--ink); animation: pop .3s ease; text-align: center; }
.toast.ok { background: #e3f8d4; } .toast.err { background: #ffd9d2; }
.toast.out { opacity: 0; transform: translateY(10px); transition: all .5s ease; }
.particle { position: fixed; z-index: 55; pointer-events: none; font-size: 28px; }
.particle.fall { animation: fall 1.2s cubic-bezier(.4, 0, .9, .6) forwards; }
.particle.rise { animation: rise 1.4s ease-out forwards; }
.particle.pop { animation: eggpop 1.6s ease-out forwards; font-size: 40px; }
.confetti { position: fixed; z-index: 55; top: -20px; width: 12px; height: 18px; border: 2px solid var(--ink); border-radius: 3px; animation: confetti 2.8s linear forwards; pointer-events: none; }

.bob { animation: bob 2.6s ease-in-out infinite; transform-origin: 50% 100%; }
.d1 { animation-delay: -.8s; } .d2 { animation-delay: -1.6s; }
.fly { animation: buzz 1.1s ease-in-out infinite; transform-box: fill-box; }
.fly.f2 { animation-duration: .9s; animation-direction: reverse; }
.smoke circle { animation: smoke 4s ease-in-out infinite; }
.float-feather { animation: feather 3s ease-in-out infinite; transform-box: fill-box; }
.sparkle { animation: twinkle 1.4s ease-in-out infinite; }

@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-4px) rotate(-1.5deg); } 50% { transform: translateY(0) rotate(0); } 75% { transform: translateY(-2px) rotate(1.5deg); } }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(-1deg); } }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-10deg); } 75% { transform: rotate(10deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes shake { 0%, 92%, 100% { transform: translateX(0); } 94% { transform: translateX(-4px); } 96% { transform: translateX(4px); } 98% { transform: translateX(-2px); } }
@keyframes buzz { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(8px, -6px); } 50% { transform: translate(-4px, 4px); } 75% { transform: translate(6px, 6px); } }
@keyframes feather { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(8px, 10px) rotate(25deg); } }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fall { from { transform: translate(0, -40px) rotate(0); opacity: 1; } to { transform: translate(var(--dx), 160px) rotate(220deg); opacity: 0; } }
@keyframes rise { from { transform: translate(0, 0) scale(.8); opacity: 1; } to { transform: translate(var(--dx), -140px) scale(1.3); opacity: 0; } }
@keyframes eggpop { 0% { transform: translate(0, 0) scale(.3); opacity: 0; } 20% { transform: translate(0, -60px) scale(1.3); opacity: 1; } 70% { transform: translate(var(--dx), -90px) scale(1); opacity: 1; } 100% { transform: translate(var(--dx), -150px) scale(.8); opacity: 0; } }
@keyframes confetti { to { transform: translateY(110vh) rotate(720deg); } }
@keyframes smoke { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-10px); opacity: .7; } }

@media (max-width: 860px) {
  .home { grid-template-columns: 1fr; }
  .home-hen { max-width: 200px; }
  .hen-page { grid-template-columns: 1fr; }
  .yard { min-height: 340px; }
  .signup-grid { grid-template-columns: 1fr; }
  .board-top { grid-template-columns: 1fr; justify-items: center; }
  .back { justify-self: start; }
  .spacer { display: none; }
  .board { padding: 10px 10px 18px; border-radius: 20px; }
  .signs { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
  .cases { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); padding: 8px; gap: 8px; }
  .journal li { flex-direction: column; gap: 2px; }
  .logo { font-size: 20px; }
  .logo .artbox { width: 36px; height: 34px; }
  .hud { position: static; padding: 6px 8px; gap: 6px; }
  .hud-items { gap: 5px; }
  .chip { padding: 3px 8px; font-size: 14px; border-width: 2.5px; box-shadow: 0 2px 0 var(--ink); }
  .chip-btn .uname { display: none; }
  .main { padding: 12px 8px 100px; }
  .cases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case { min-height: 240px; padding: 6px 4px; }
  .case-hen { width: 84px; height: 76px; }
  .case-actions .btn { padding: 3px 5px; font-size: 13px; }
  .ribbon span { padding: 6px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
