/* Fayots — terre de potager, papier kraft et moutarde */
body[data-theme="fayots"] {
  --bg: #1b1a11;
  --bg-glow: #3b4a1b;
  --surface: #272619;
  --fg: #f4efdf;
  --muted: #b8b198;
  --line: rgba(244, 239, 223, .15);
  --glass: rgba(244, 239, 223, .05);
  --accent: #f0b429;
  --accent-ink: #2c1d00;
  --hot: #e4572e;
  --hot-ink: #ffffff;
  --paper: #fbf3df;
  --ink: #2a2416;
  --ink-soft: #6e6450;
  --f-display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --f-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.tile-fayots { background: linear-gradient(160deg, #2f3a17, #1b1a11); color: #f4efdf; }
.tile-fayots h2 { font-family: "Lilita One", system-ui, sans-serif; color: #f0b429; font-size: 34px; }
.tile-fayots .btn.primary { background: #f0b429; color: #2c1d00; }

/* Un haricot dessiné en CSS */
.fy-bean {
  --bc: #888;
  display: inline-block; width: 34px; height: 22px; flex: none;
  border-radius: 55% 45% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(ellipse at 32% 28%, rgba(255, 255, 255, .55) 0 18%, transparent 32%), var(--bc);
  box-shadow: inset -3px -4px 0 rgba(0, 0, 0, .18), 0 1px 0 rgba(0, 0, 0, .3);
  transform: rotate(-14deg); position: relative;
}
.fy-bean::after { content: ""; position: absolute; left: 44%; top: 4%; width: 18%; height: 26%; border-radius: 50%; background: rgba(0, 0, 0, .18); }
.fy-bean.lg { width: 50px; height: 32px; }
.fy-bean.sm { width: 18px; height: 12px; }

.fy-coin { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, #ffe28f, #e0a72e 60%, #a8751c); color: #3a2600; font: 800 12px/1 var(--f-body);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .35); font-variant-numeric: tabular-nums; flex: none; }
.fy-coin.big { min-width: 32px; height: 32px; font-size: 16px; }

/* Cartes haricot */
.fy-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.fy-card {
  --bc: #888; --bi: #fff;
  appearance: none; border: 0; padding: 0; margin: 0; font: inherit; color: var(--ink);
  width: 74px; height: 106px; border-radius: 10px; background: var(--paper); flex: none; position: relative;
  display: flex; flex-direction: column; align-items: center; overflow: hidden;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .35); transition: transform .15s, box-shadow .15s;
}
button.fy-card { cursor: pointer; }
.fy-card .band { width: 100%; background: var(--bc); color: var(--bi); font: 800 10px/1 var(--f-body); letter-spacing: .05em; text-transform: uppercase; padding: 5px 0 4px; text-align: center; }
.fy-card .fy-bean { margin: 12px 0 8px; }
.fy-meter { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; padding: 0 4px 5px; gap: 1px; margin-top: auto; }
.fy-meter span { text-align: center; font: 800 10px/1.2 var(--f-body); font-variant-numeric: tabular-nums; }
.fy-meter span.no { opacity: .3; }
.fy-meter .c { color: #9a6a10; font-size: 9px; }
.fy-card.sel { transform: translateY(-9px); box-shadow: 0 0 0 3px var(--accent), 0 10px 16px rgba(0, 0, 0, .45); }
.fy-card.next { box-shadow: 0 0 0 3px var(--hot), 0 3px 0 rgba(0, 0, 0, .35); }
.fy-card .pos { position: absolute; top: 4px; left: 5px; font: 800 9px/1 var(--f-body); color: var(--bi); opacity: .8; }
.fy-card.want { box-shadow: 0 0 0 3px var(--hot), 0 10px 16px rgba(0, 0, 0, .45); transform: translateY(-9px); }

/* Champs */
.fy-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.fy-field { border-radius: 14px; border: 2px dashed color-mix(in srgb, var(--fg) 25%, transparent); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 118px; background: linear-gradient(180deg, transparent, rgba(110, 80, 30, .18)); }
.fy-field.full { border-style: solid; border-color: color-mix(in srgb, var(--bc) 70%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--bc) 14%, transparent), rgba(110, 80, 30, .22)); }
.fy-field .top { display: flex; align-items: center; gap: 8px; }
.fy-field .count { font: 400 26px/1 var(--f-display); margin-left: auto; font-variant-numeric: tabular-nums; }
.fy-field .nm { font-weight: 800; }
.fy-field .info { font-size: 12px; color: var(--muted); }
.fy-field .beans { display: flex; flex-wrap: wrap; gap: 2px 0; min-height: 14px; }
.fy-field .actions .btn { flex: 1; }
.fy-field.mini { min-height: 0; padding: 7px 9px; gap: 4px; }
.fy-field.mini .nm { font-size: 13px; }
.fy-field.mini .count { font-size: 20px; }

/* Joueurs */
.fy-players { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.fy-player { border-radius: 14px; border: 1px solid var(--line); background: var(--glass); padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fy-player.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.fy-player .head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.fy-player .who { font-weight: 800; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: auto; }
.fy-player .stats { font-size: 13px; color: var(--muted); }
.fy-player .stats b { color: var(--fg); }

/* Échanges */
.fy-offer { border-radius: 12px; border: 1px solid var(--line); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--glass); }
.fy-offer.incoming { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.fy-offer .line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fy-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 6px; border-radius: 999px; background: var(--paper); color: var(--ink); font-size: 12.5px; font-weight: 800; }
.fy-chip .fy-bean { transform: rotate(-14deg) scale(.9); }
.fy-steppers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.fy-step { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 10px; background: var(--glass); border: 1px solid var(--line); }
.fy-step .nm { flex: 1; font-weight: 700; font-size: 13px; }
.fy-step .n { min-width: 16px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.fy-step .btn { padding: 2px 9px; font-size: 15px; }
.fy-targets { display: flex; flex-wrap: wrap; gap: 6px; }
.fy-targets .btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
details.fy-more summary { cursor: pointer; font-weight: 700; color: var(--muted); }
details.fy-more[open] summary { margin-bottom: 8px; }

@media (max-width: 420px) {
  .fy-card { width: 68px; height: 100px; }
}
