/* ─── Mini-grid preview (onglet Grilles) ─── */
.bingo-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  table-layout: fixed;
}

.bingo-grid td {
  border: 1px solid var(--border);
  padding: 5px 4px;
  text-align: center;
  vertical-align: middle;
  position: relative;
  overflow: hidden;
  transition: background .1s;
}

.bingo-grid tbody tr:hover td { background: var(--bg-hover); }

.bingo-grid .free-cell {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .5px;
}

.bingo-grid .cell-label {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  word-break: break-word;
}

.bingo-grid .cell-pts {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 2px;
  opacity: .7;
}

.bingo-grid .cell-pts.cell-gage-ref {
  color: var(--accent);
  opacity: 1;
  font-weight: 600;
}

/* ─── Cellules éditables ─── */
.bingo-grid .editable-cell {
  cursor: grab;
  user-select: none;
}
.bingo-grid .editable-cell:hover {
  background: var(--bg-hover);
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}
.bingo-grid .editable-cell:active { cursor: grabbing; }

.bingo-grid .cell-dragging {
  opacity: .35;
  cursor: grabbing;
}
.bingo-grid .cell-drag-over {
  background: var(--accent-dim) !important;
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
}

/* ─── Modal remplacement de case ─── */
.cell-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.cell-picker-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-l);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: min(420px, 92vw);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cell-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
}
.cell-picker-title { font-weight: 600; font-size: 14px; }
.cell-picker-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}
.cell-picker-close:hover { background: var(--bg-hover); color: var(--text); }

.cell-picker-current {
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cpc-label { margin-right: 6px; }
.cpc-value { color: var(--text); font-style: italic; }

.cell-picker-search { padding: 10px 12px 6px; }
.cell-picker-filter {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-l);
  border-radius: var(--radius);
  color: var(--text);
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
}
.cell-picker-filter:focus { border-color: var(--accent); }

.cell-picker-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  padding: 4px 0 8px;
}
.cell-picker-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  border-left: 3px solid transparent;
}
.cell-picker-item:hover {
  background: var(--bg-hover);
  border-left-color: var(--accent);
}
.cell-picker-item.current {
  background: var(--accent-dim);
  border-left-color: var(--accent);
  color: var(--accent);
}
.cpi-label { flex: 1; line-height: 1.35; }
.cpi-pts {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
