/* ====== STYLE GLOBAL ====== */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #f4f4f4;
    text-align: center;
    font-size: 16px;
    padding: 0;
}

.hero {
    padding: 5px 20px;
    background: linear-gradient(to right, #007bff, #00c6ff);
    color: black;
    text-align: center;
}

.form-box {
    background: #fff;
    margin-top: 50px;
    margin-left: auto;
    margin-right: auto;
    padding: 15px; 
    border-radius: 10px;
    width: 300px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

button {
    padding: 10px 14px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover { 
    background: #0056b3;
}

input {
    width: 100%;
    padding: 10px; 
    margin: 8px 0; 
    box-sizing: border-box;
}

a {
    text-decoration: none;
}

.main-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    gap: 20px;
}

.left-column, .right-column {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.left-column {
    flex: 2; /* colonne principale */
}

.right-column {
    flex: 1; /* colonne secondaire */
}

@media (max-width: 800px) {
.main-container {
    flex-direction: column;
}
        }

/* ====== TABLES ====== */
table {
    border-collapse: collapse;
    margin: 20px auto;
    font-size: 14px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

th, td {
    padding: 5px 8px;
    border: 1px solid #ddd;
}

/* ====== BOUTONS ET LIENS ====== */
.buttons, .games {
    margin-top: 20px;
}

.buttons a, .games a {
    display: inline-block;
    margin: 5px;
    padding: 8px 8px;
    background: white;
    color: #007bff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.buttons a:hover, .games a:hover {
    background: #e0e0e0;
}

/* ====== CONTAINERS ====== */
.container {
    width: 90%;
    max-width: 800px;
    margin: 30px auto;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.game-box {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    padding: 20px;
    width: 220px;
    box-sizing: border-box;
}

.game-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 30px auto;
    max-width: 1000px;
}

/* ====== GRILLE (5x6) pour div.cell ====== */
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 20px auto;
  max-width: 300px;
}

/* cases */
.grid .cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 6px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 8px;
  border: 1px solid #cfcfcf;
  background: #fff;
  color: #000;
  cursor: pointer;
  user-select: none;
  transition: background .15s, color .15s, transform .08s;
}

/* hover (disponible) */
.grid .cell:not(.taken):hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* case disponible (optionnel si tu veux vert) */
.grid .cell.available {
  background: #49ab07;
  border-color: #9bd59b;
}

/* case prise */
.grid .cell.taken {
  background-color: #F55838 !important;  /* rouge */
  color: #fff !important;
  border-color: #b92b2b !important;
  cursor: not-allowed;
  pointer-events: none;
}

/* petite info du propriétaire (optionnel) */
.grid .cell.taken::after {
  content: attr(data-owner);
  display: block;
  font-size: 10px;
  opacity: 0.9;
  margin-top: 4px;
  color: rgb(242, 0, 0);
}

/* ====== LOTTO (7 colonnes) ====== */
/* Cadre global de la grille loto */
/* Grille style FDJ */
.loto-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  column-gap: 0px;  /* espace horizontal minimal */
  row-gap: 5px;     /* espace vertical minimal */
  padding: 10px;
  border: 3px solid red;
  border-radius: 10px;
  background: #fff;
  max-width: 200px;            /* limite la largeur si besoin — ajuste ou supprime */
  margin: 20px auto;
}

/* Cases compactes */
.loto-cell {
  width: 25px;
  height: 25px;
  line-height: 25px;
  text-align: center;
  font-weight: bold;
  color: black;
  background: white;
  border: 2px solid red;
  border-radius: 0;
  cursor: pointer;
  position: relative; /* utile pour la croix */
  user-select: none;
}

/* Case sélectionnée = ajout croix rouge centrée */
.loto-cell.selected::after {
  content: "X";
  color: red;
  font-weight: bold;
  font-size: 20px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Désactivation bouton validate */
#validateBtn:disabled {
    background: #ccc;      /* gris */
    color: #666;           /* texte atténué */
    cursor: not-allowed;   /* curseur bloqué */
    opacity: 0.7;
}

/* Désactivation bouton loto */
.loto-grid button:disabled,
.loto-cell:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.draw-days {
    display: inline;
    align-items: center; /* Aligne les éléments verticalement au centre */
    font-weight: bold;
}
.draw-days label {
    margin-right: 20px; /* Espace entre les cases à cocher */
}
#resetBtn {
  background: #f44336;   /* rouge */
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}
#resetBtn:hover {
  background: #d32f2f;
}
/* ====== DIVERS ====== */
.success {
    color: green;
    font-weight: bold;
}

h2 { 
    margin-bottom: 10px; 
}

.draw {
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 10px #ccc;
    max-width: 600px;
    margin: 30px auto;
    padding: 20px;
}

.draw h3 {
    margin-top: 5px;
}

#message {
    margin-top: 20px;
    font-size: 16px;
    color: #2e7d32; /* vert foncé */
}

/* ====== COMPTEURS ====== */
.countdowns {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.countdown-box {
    background: linear-gradient(145deg, #1e3c72, #2a5298); /* dégradé bleu */
    color: #fff;
    padding: 20px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    font-family: "Trebuchet MS", Arial, sans-serif;
    transition: transform 0.2s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
}

.countdown-box:hover {
    transform: scale(1.05);
}

.countdown-box h3 {
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timer {
    font-size: 2em;
    font-weight: bold;
    letter-spacing: 2px;
}
/* Cadre rouge arrondi 3px autour de la grille (s'applique à .grid et .loto-grid) */
.grid,
.loto-grid {
  padding: 10px;               /* espace entre bord et cases */
  border: 3px solid #c92b2b;   /* bord rouge 3px */
  border-radius: 12px;         /* coins arrondis (ajuste si tu veux plus/moins) */
  background: #ffffff;         /* fond blanc (optionnel) */
  box-shadow: 0 6px 18px rgba(0,0,0,0.06); /* léger relief (optionnel) */

  margin: 20px auto;           /* centre la grille */
  box-sizing: border-box;      /* pour que padding soit inclus dans la largeur */
}

/* ====== LOTTO GRID FIX ====== */
.loto-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);  /* 7 colonnes pour 49 numéros */
  gap: 6px;                               /* espace régulier entre cases */
  padding: 12px;
  border: 3px solid #c92b2b;
  border-radius: 12px;
  background: #fff;
  max-width: 420px;                       /* largeur adaptée */
  margin: 20px auto;
  box-sizing: border-box;
}

.loto-cell, .loto-grid button {
  width: 45px;
  height: 45px;
  line-height: 45px;
  text-align: center;
  font-weight: bold;
  border: 2px solid #c92b2b;
  border-radius: 6px;
  background: #fff;
  color: #000;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s, transform 0.1s;
}

.loto-cell:hover, .loto-grid button:hover {
  background: #ffeaea;
  transform: translateY(-2px);
}

.loto-cell.selected, .loto-grid button.selected {
  background: #ffcccc;
  color: #b30000;
  font-weight: bold;
}

@media (max-width: 500px) {
  .loto-grid {
    grid-template-columns: repeat(5, 1fr); /* réduit sur mobile */
    max-width: 300px;
  }
  .loto-cell, .loto-grid button {
    width: 40px;
    height: 40px;
    line-height: 40px;
  }
}
