/* Tentes (Tents & Trees) board — archetype 06, "marquer la grille". Scoped under
   .tents-root. One CSS grid holds the n×n board plus a clue rail on the right
   (row counts) and along the bottom (column counts). Shared design tokens: gold
   accent + warm neutrals; light + dark via .mode-dark. */

.tents-root {
  --cell: 46px;
  --line: #cfc8b8; --ink: #2a2620; --paper: #fbf9f3; --paper-2: #f2eee3;
  --gold: #b68235; --gold-soft: #e7d3a3; --bad: #c8503b;
  --tree-bg: #e7efe0; --grass: #a9b89a;
  display: flex; justify-content: center;
  padding: clamp(10px, 2.5vw, 22px) 0;
  color: var(--ink);
}
/* Board tonality is fixed by the surface panel (BOARD_SURFACES.md): the board
   follows our .mode-dark class only, never the OS colour-scheme. */
.tents-root.mode-dark {
  --line: #3a4030; --ink: #ece8e2; --paper: #232620; --paper-2: #1c1f19;
  --gold: #d8b65c; --gold-soft: #4a4126; --bad: #d9694f;
  --tree-bg: #232f22; --grass: #566b4c;
}

.tents-board {
  display: grid; justify-content: center;
  gap: 3px; padding: 3px; background: var(--line); border-radius: 10px;
}

.tents-cell {
  inline-size: var(--cell); block-size: var(--cell);
  display: grid; place-items: center;
  background: var(--paper); border-radius: 5px;
  font-size: calc(var(--cell) * 0.56); line-height: 1;
  cursor: pointer; user-select: none; transition: background 0.1s, box-shadow 0.1s;
}
.tents-cell.open:hover { background: var(--paper-2); }
.tents-cell.tree { background: var(--tree-bg); cursor: default; }
.tents-cell.tent { background: var(--gold-soft); }
.tents-cell.grass { cursor: pointer; }
.tents-cell.grass::after {
  content: ""; inline-size: 28%; block-size: 28%;
  background: var(--grass); border-radius: 50%; transform: rotate(45deg);
}
.tents-cell.sel { outline: 3px solid var(--gold); outline-offset: -2px; z-index: 2; }
.tents-cell.conflict { box-shadow: inset 0 0 0 3px var(--bad); }

/* Clue rail: row counts on the right, column counts along the bottom. */
.tents-clue {
  inline-size: var(--cell); block-size: var(--cell);
  display: grid; place-items: center;
  font-weight: 700; font-variant-numeric: tabular-nums;
  font-size: calc(var(--cell) * 0.42); color: var(--ink);
}
.tents-clue.done { color: var(--grass); }
.tents-clue.over { color: var(--bad); }

.tents-corner {
  inline-size: var(--cell); block-size: var(--cell);
  display: grid; place-items: center;
  font-size: calc(var(--cell) * 0.3); font-weight: 600;
  font-variant-numeric: tabular-nums; color: var(--gold);
}

.tents-root.solved .tents-cell.tent { background: var(--gold); }

@media (prefers-reduced-motion: reduce) { .tents-cell { transition: none; } }
.tents-root.no-motion .tents-cell { transition: none; }
