/* Accordéon (Accordion) board — same green-baize texture as the other Réussites
   (per-game texture allowed, ARCHITECTURE.md §6), scoped under .ac-root. A single
   wrapping grid of card-sized cells holds every pile; each pile shows its top
   card. Click-to-play, no drag. Reuses the shared card SVGs. */

.ac-root {
  --felt: #1b6b49; --felt-hi: #2a7f5b; --gold: #d8b65c;
  --line: rgba(253, 252, 247, 0.22);
  --cw: 52px;
  --ch: calc(var(--cw) * 1.45);
  --r: calc(var(--cw) * 0.05);
  --gap: clamp(4px, 1vw, 10px);
  position: relative;
  padding: clamp(12px, 3vw, 26px) clamp(6px, 2vw, 18px);
  border-radius: var(--radius-md);
  background: var(--felt);
  background-image: radial-gradient(ellipse 82% 70% at 50% 24%, var(--felt-hi), var(--felt) 74%);
  color: #eaf3ed; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(20, 17, 14, 0.25), var(--shadow-sm);
}
@media (prefers-color-scheme: dark) { .ac-root { --felt: #144d36; --felt-hi: #1d6046; } }
.ac-root.mode-dark { --felt: #144d36; --felt-hi: #1d6046; }

.ac-board { position: relative; margin: 0 auto; }
.ac-grid { display: flex; flex-wrap: wrap; align-content: flex-start; gap: var(--gap); justify-content: center; }

.ac-pile {
  position: relative; width: var(--cw); height: var(--ch);
  user-select: none; touch-action: manipulation; cursor: pointer;
}
.ac-root .card {
  position: relative; width: var(--cw); height: var(--ch); border-radius: var(--r);
  user-select: none;
  box-shadow: 0 -1px 0 rgba(20, 17, 14, 0.16), 0 -3px 6px rgba(0, 0, 0, 0.2), 0 2px 3px rgba(0, 0, 0, 0.12);
}
.ac-root .cf { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; object-fit: fill; z-index: 2; border-radius: var(--r); }

/* piles that can move somewhere get a gold ring and a lift on hover */
.ac-pile.ac-can .card { box-shadow: 0 0 0 2px var(--gold), 0 2px 8px rgba(0, 0, 0, 0.3); }
.ac-pile.ac-can:hover .card { transform: translateY(-2px); }
.ac-pile.ac-hint .card { outline: 3px solid var(--gold); outline-offset: 1px; animation: ac-hint 0.6s ease-in-out 2; }

/* depth badge shown once a pile holds more than one card */
.ac-depth {
  position: absolute; inset-block-start: 2px; inset-inline-start: 3px; z-index: 5;
  min-inline-size: calc(var(--cw) * 0.32); padding: 0 calc(var(--cw) * 0.06);
  font-size: calc(var(--cw) * 0.24); font-weight: 700; line-height: 1.5;
  text-align: center; color: #fff; border-radius: 999px;
  background: rgba(20, 17, 14, 0.62); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.ac-foot { display: flex; align-items: center; margin-top: clamp(12px, 3vw, 24px); }
.ac-msg { margin-inline-start: auto; font-size: 0.92rem; opacity: 0.9; }

.ac-sound {
  position: absolute; inset-block-start: 4px; inset-inline-end: 4px; z-index: 55;
  inline-size: 30px; block-size: 30px; border-radius: 50%; padding: 0;
  border: 1px solid rgba(253, 252, 247, 0.22); background: rgba(0, 0, 0, 0.18);
  color: #eaf3ed; font-size: 15px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; opacity: 0.65;
}
.ac-sound:hover { opacity: 1; }
.ac-sound.on { background: rgba(216, 182, 92, 0.22); border-color: rgba(216, 182, 92, 0.5); opacity: 1; }

@keyframes ac-hint { 0%, 100% { outline-color: var(--gold); } 50% { outline-color: transparent; } }
@media (prefers-reduced-motion: reduce) { .ac-pile.ac-can:hover .card { transform: none; } .ac-pile.ac-hint .card { animation: none; } }
