@charset "UTF-8";
/* Image affichée avant le lancement de la partie */
#BineroImage {
  position: relative;
  width: 100%;
  margin-inline: auto;
}

/* Même logique de largeur que la grille HTML */
#BineroImage[data-size="4"] {
  max-width: 360px;
}

#BineroImage[data-size="6"] {
  max-width: 420px;
}

#BineroImage[data-size="8"] {
  max-width: 480px;
}

#BineroImage[data-size="10"] {
  max-width: 500px;
}

#BineroImage[data-size="12"] {
  max-width: 522px;
}

#BineroImage img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.5;
}

/* Bouton superposé à l'image */
#BineroImage > button {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px 40px;
}

/* Contrôles sous l'image d'attente */
#BineroImage #BineroControls {
  width: 100%;
}

/* Conteneur recevant la grille */
#GamingGrid2 {
  width: 100%;
}

/* Grille Binero */
.binero-grid {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  margin-inline: auto;
  border: 2px solid #64748b;
  background: #fff;
}

/* Taille des différentes grilles */
.binero-grid[data-size="4"] {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  max-width: 360px;
}

.binero-grid[data-size="6"] {
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
  max-width: 420px;
}

.binero-grid[data-size="8"] {
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  max-width: 480px;
}

.binero-grid[data-size="10"] {
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(10, 1fr);
  max-width: 500px;
}

.binero-grid[data-size="12"] {
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(12, 1fr);
  max-width: 522px;
}

/* Cellules */
.binero-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-right: 1px solid #d9dee7;
  border-bottom: 1px solid #d9dee7;
  border-radius: 0;
  background: #fff;
  font: inherit;
  font-weight: 500;
  line-height: 1;
  color: #334155;
  cursor: pointer;
  touch-action: manipulation;
}

/* Suppression des bordures à droite */
.binero-grid[data-size="4"] .binero-cell[data-col="3"],
.binero-grid[data-size="6"] .binero-cell[data-col="5"],
.binero-grid[data-size="8"] .binero-cell[data-col="7"],
.binero-grid[data-size="10"] .binero-cell[data-col="9"],
.binero-grid[data-size="12"] .binero-cell[data-col="11"] {
  border-right: 0;
}

/* Suppression des bordures du bas */
.binero-grid[data-size="4"] .binero-cell[data-row="3"],
.binero-grid[data-size="6"] .binero-cell[data-row="5"],
.binero-grid[data-size="8"] .binero-cell[data-row="7"],
.binero-grid[data-size="10"] .binero-cell[data-row="9"],
.binero-grid[data-size="12"] .binero-cell[data-row="11"] {
  border-bottom: 0;
}

/*
 * Valeurs initiales
 *
 * Le chiffre réel est conservé dans le bouton mais masqué
 * visuellement. La bulle est générée avec ::before.
 */
.binero-cell.is-fixed[data-value] {
  color: transparent;
  cursor: default;
}

/* Bulle des valeurs initiales */
.binero-cell.is-fixed[data-value]::before {
  content: attr(data-value);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1/1;
  border-radius: 50%;
  background-color: #4f5d70;
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
}

/*
 * Valeurs saisies par le joueur
 *
 * Pas de bulle : chiffre bleu directement dans la cellule.
 */
.binero-cell.is-player {
  color: #3273dc;
  font-weight: 500;
}

/* Ligne / colonne associée */
.binero-cell.is-related {
  background-color: #f3f6fa;
}

/* Cellule active */
.binero-cell.is-selected {
  position: relative;
  z-index: 1;
  background-color: #dce8f8;
  outline: 2px solid #3273dc;
  outline-offset: -2px;
}

/* Navigation clavier */
.binero-cell:not(.is-fixed):focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid #3273dc;
  outline-offset: -2px;
}

/*
 * Taille des chiffres et des bulles
 * selon la taille de la grille
 */
/* 4×4 */
.binero-grid[data-size="4"] .binero-cell {
  font-size: clamp(2rem, 8vw, 3rem);
}

.binero-grid[data-size="4"] .binero-cell.is-fixed[data-value]::before {
  width: 52%;
  font-size: clamp(1.8rem, 7vw, 2.6rem);
}

/* 6×6 */
.binero-grid[data-size="6"] .binero-cell {
  font-size: clamp(1.7rem, 6vw, 2.5rem);
}

.binero-grid[data-size="6"] .binero-cell.is-fixed[data-value]::before {
  width: 58%;
  font-size: clamp(1.4rem, 5vw, 2rem);
}

/* 8×8 */
.binero-grid[data-size="8"] .binero-cell {
  font-size: clamp(1.4rem, 5vw, 2rem);
}

.binero-grid[data-size="8"] .binero-cell.is-fixed[data-value]::before {
  width: 60%;
  font-size: clamp(1.15rem, 4vw, 1.6rem);
}

/* 10×10 */
.binero-grid[data-size="10"] .binero-cell {
  font-size: clamp(1.15rem, 4vw, 1.7rem);
}

.binero-grid[data-size="10"] .binero-cell.is-fixed[data-value]::before {
  width: 62%;
  font-size: clamp(1rem, 3.2vw, 1.35rem);
}

/* 12×12 */
.binero-grid[data-size="12"] .binero-cell {
  font-size: clamp(1rem, 3.5vw, 1.5rem);
}

.binero-grid[data-size="12"] .binero-cell.is-fixed[data-value]::before {
  width: 64%;
  font-size: clamp(0.85rem, 2.8vw, 1.15rem);
}

/* Sélection 0 / 1 */
.binero-numbers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  width: 100%;
  max-width: 300px;
  margin-inline: auto;
}

/* Boutons 0 / 1 */
.binero-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
  padding: 0;
  border: 1px solid #d9dee7;
  border-radius: 6px;
  background-color: #fff;
  font-family: inherit;
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1;
  color: #27364d;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* Valeur actuellement sélectionnée */
.binero-number.is-selected {
  border-color: #3273dc;
  background-color: #3273dc;
  color: #fff;
}

.binero-number:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Navigation clavier */
.binero-number:focus-visible {
  outline: 2px solid #3273dc;
  outline-offset: 2px;
}

/* Hover */
@media (hover: hover) {
  .binero-number:hover {
    border-color: #3273dc;
    background-color: #f3f6fa;
  }
  .binero-number.is-selected:hover {
    background-color: #3273dc;
    color: #fff;
  }
}
/* Mobile */
@media screen and (max-width: 768px) {
  .binero-numbers {
    gap: 0.5rem;
    max-width: 260px;
  }
  .binero-number {
    min-height: 64px;
    border-radius: 5px;
    font-size: 1.5rem;
  }
}
/* Chronomètre */
.timer-value {
  letter-spacing: 0.2em;
}

/*# sourceMappingURL=binero.css.map */
