/* L'Horloge (Clock Patience) board — same green-baize texture as the other
   Réussites (per-game texture allowed, ARCHITECTURE.md §6), scoped under
   .cl-root. Twelve piles laid out as the hours of a clock around a central
   King pile (absolute positioning). Reuses the shared card SVGs. */

.cl-root {
  --felt: #1b6b49; --felt-hi: #2a7f5b; --gold: #d8b65c;
  --line: rgba(253, 252, 247, 0.22);
  --cw: 48px;
  --ch: calc(var(--cw) * 1.45);
  --r: calc(var(--cw) * 0.05);
  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% 42%, 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) { .cl-root { --felt: #144d36; --felt-hi: #1d6046; } }
.cl-root.mode-dark { --felt: #144d36; --felt-hi: #1d6046; }

.cl-board { position: relative; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.cl-clock { position: relative; margin: 0 auto; }

.cl-pile { position: absolute; border-radius: var(--r); }
.cl-pile .card {
  position: absolute; inset: 0; width: var(--cw); height: var(--ch); border-radius: var(--r);
  user-select: none; touch-action: manipulation;
  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);
}
.cl-pile .cf { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; object-fit: fill; z-index: 2; border-radius: var(--r); }

/* the pile you draw from next glows gold and is clickable; a completed rank
   pile dims slightly; the central King pile keeps a faint marker ring. */
.cl-pile.cl-current { cursor: pointer; }
.cl-pile.cl-current .card:last-of-type { box-shadow: 0 0 0 2px var(--gold), 0 2px 8px rgba(0, 0, 0, 0.35); }
.cl-pile.cl-current:hover .card { transform: translateY(-2px); }
.cl-pile.cl-done { filter: brightness(0.9) saturate(0.92); }
.cl-pile.cl-centre::before {
  content: ""; position: absolute; inset: -5px; border-radius: calc(var(--r) + 5px);
  border: 1.5px dashed rgba(216, 182, 92, 0.45); pointer-events: none; z-index: 0;
}
.cl-pile.cl-hint { outline: 3px solid var(--gold); outline-offset: 2px; z-index: 40; animation: cl-hint 0.6s ease-in-out 2; }

.cl-count {
  position: absolute; inset-block-start: 3px; inset-inline-end: 4px; z-index: 25;
  font-size: calc(var(--cw) * 0.26); font-weight: 700; color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}
.cl-label {
  position: absolute; inset-block-end: 2px; inset-inline-start: 4px; z-index: 25;
  font-size: calc(var(--cw) * 0.22); font-weight: 700; color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); pointer-events: none;
}

.cl-foot { display: flex; align-items: center; gap: clamp(12px, 4vw, 30px); margin-top: clamp(12px, 3vw, 22px); flex-wrap: wrap; justify-content: center; }
.cl-reveal {
  border: 1.5px solid rgba(216, 182, 92, 0.5); background: rgba(216, 182, 92, 0.18);
  color: #f6efdb; font-weight: 700; font-size: 0.95rem; line-height: 1;
  padding: 0.6em 1.4em; border-radius: 999px; cursor: pointer;
}
.cl-reveal:hover:not(:disabled) { background: rgba(216, 182, 92, 0.3); }
.cl-reveal:disabled { opacity: 0.45; cursor: default; }
.cl-msg { font-size: 0.92rem; opacity: 0.9; align-self: center; }

.cl-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;
}
.cl-sound:hover { opacity: 1; }
.cl-sound.on { background: rgba(216, 182, 92, 0.22); border-color: rgba(216, 182, 92, 0.5); opacity: 1; }

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