/* Moulin (Nine Men's Morris) — plateau family (design/Jeu - Moulin). Three nested
   squares on a parchment board set in a wooden frame, the whole thing on the warm
   leather surface, the same in light and dark. Ivory vs ebony pieces, gold rules.
   A side panel carries the turn, the phase and the piece counts. Scoped .moulin-root. */

.moulin-root { display: flex; flex-direction: column; align-items: stretch; inline-size: 100%; color: var(--color-text); }

.moulin-surface {
  inline-size: 100%; box-sizing: border-box;
  background: #43302b; border-block: 1px solid #2c1f1b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  padding: var(--space-6) 0; color: #f4ece5;
}
.moulin-inner { max-inline-size: 1000px; margin-inline: auto; padding-inline: var(--space-4); box-sizing: border-box; display: flex; flex-wrap: wrap; gap: var(--space-6); align-items: center; justify-content: center; }

.moulin-planche {
  flex: 0 1 auto; padding: 22px; border-radius: 4px; box-sizing: border-box;
  background: linear-gradient(152deg, #7b5638 0%, #603f2e 40%, #4c3427 78%, #5d3f2d 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -2px 6px rgba(0, 0, 0, 0.4), 0 22px 44px rgba(0, 0, 0, 0.40);
}
.moulin-board-wrap { inline-size: min(78vw, 420px); max-inline-size: 100%; }
.moulin-svg { display: block; inline-size: 100%; block-size: auto; border-radius: 3px; }

.moulin-bg { fill: #e8d9b5; }
.moulin-line { fill: none; stroke: #8a6a34; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.moulin-point {
  fill: #d8c49a; stroke: #a5895a; stroke-width: 1.6; cursor: pointer;
  transition: fill 0.18s ease, stroke 0.18s ease, r 0.18s ease;
}
.moulin-point.p-human { fill: #241d1a; stroke: #0f0d0c; }
.moulin-point.p-ai { fill: #f4ecdd; stroke: #cbbda3; }
.moulin-point.dest { fill: #a9c79f; stroke: #5f8a55; stroke-width: 2.4; }
.moulin-point.selected { stroke: var(--color-accent); stroke-width: 3.4; }
.moulin-point.last { stroke: var(--color-accent); stroke-width: 3; }
.moulin-point.removable { stroke: #c0533f; stroke-width: 3.4; cursor: pointer; }
.moulin-point.captured { animation: moulin-cap 0.9s ease; }
@keyframes moulin-cap { 0% { stroke: #c0533f; stroke-width: 5; } 100% { stroke: #a5895a; stroke-width: 1.6; } }
.moulin-root:not(.no-motion) .moulin-point.removable { animation: moulin-pulse 1.1s ease-in-out infinite; }
@keyframes moulin-pulse { 0%, 100% { stroke-width: 2.4; } 50% { stroke-width: 4; } }

/* Side panel: turn, phase, piece counts. */
.moulin-panel { flex: 0 1 220px; display: flex; flex-direction: column; gap: var(--space-3); color: #f4ece5; }
.moulin-turn { border-inline-start: 2px solid var(--color-accent-400); padding-inline-start: var(--space-3); font-family: var(--font-heading); font-weight: 600; font-size: 15px; min-block-size: 1.4em; }
.moulin-turn.over { color: var(--color-accent-300); }
.moulin-turn.alert { color: #e79a8c; }
.moulin-phase { font-size: 12px; color: rgba(244, 236, 229, 0.66); padding-inline-start: var(--space-3); min-block-size: 1.2em; }
.moulin-head { display: flex; flex-direction: column; gap: var(--space-2); border-block-start: 1px solid rgba(244, 236, 229, 0.2); padding-block-start: var(--space-3); margin-block-start: var(--space-2); }
.moulin-side { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.moulin-side b { font-weight: 600; }
.moulin-dot { inline-size: 14px; block-size: 14px; border-radius: 50%; display: inline-block; }
.moulin-dot.human { background: radial-gradient(circle at 38% 32%, #4a3c35, #241d1a 72%); }
.moulin-dot.ai { background: radial-gradient(circle at 38% 32%, #fffaf1, #f4ecdd 72%); }

.moulin-hint { text-align: center; font-size: 12px; color: var(--color-neutral-600); max-inline-size: 560px; margin-inline: auto; padding-block-start: var(--space-3); }
.lz-variants.moulin-inline-chips { margin: 0; }

.moulin-root.no-motion .moulin-point, .moulin-root.no-motion .moulin-point.captured { transition: none; animation: none; }
@media (prefers-reduced-motion: reduce) { .moulin-point { transition: none; } .moulin-point.captured, .moulin-root .moulin-point.removable { animation: none; } }
