/* =====================================
   Grille des concerts
   ===================================== */

/* --- Conteneur scrollable --- */
#grid-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* --- Table --- */
table#schedule {
  border-collapse: separate;
  border-spacing: 0 10px;
  width: 100%;
  table-layout: fixed;
  font-family: Arial Narrow, sans-serif;
}

/* --- Cellules de base --- */
th, td {
  border: 0;
  padding: 2px;
  text-align: center;
  vertical-align: middle;
  border-radius: 4px;
  background-clip: padding-box;
}

table tr { height: 50px; }

/* Alternance de fond sur les cellules vides */
table tr:nth-child(even) td:not(.concert-cell, .day-label) { background-color: #FFF; opacity: 0.2; }
table tr:nth-child(odd)  td:not(.concert-cell, .day-label) { background-color: #FFF; opacity: 0.5; }

/* --- Séparateurs horaires --- */
td.hour-border, th.hour-border { border-left: 1px dotted #CCC; border-radius: 0; }
td.end-hole,    th.end-hole    { border-left: 4px dashed #FFF; border-right: none; border-radius: 0; }

/* --- Label jour --- */
.day-label {
  font-weight: bold;
  font-size: 1.3em;
  line-height: 0.8em;
  color: #fff;
  opacity: 1;
}

/* --- Cellule concert --- */
.concert-cell {
  background: linear-gradient(#DbF523, #bbC500);
  color: #250;
  font-size: 0.65rem;
  line-height: 1rem;
  overflow: hidden;
}

.concert-artist {
  font-weight: bold;
  text-transform: uppercase;
  font-size: 1rem;
}

.concert-venue { font-size: 0.8rem; }

.concert-cell a {
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.concert-cell:hover               { color: #000; background: linear-gradient(#EEFF23, #cbd503); }
.concert-cell a:hover             { transform: scale(1.1); z-index: 10; }

/* =====================================
   Mobile : colonnes fixes + sticky jour
   ===================================== */
@media (max-width: 768px) {
  table#schedule { width: max-content; }

  table tr { height: 40px; }

  th, td {
    width: 22px;
    min-width: 22px;
    max-width: 22px;
    padding: 1px;
  }


  .concert-cell {
    color: #000;
    line-height: 0.55rem;
    padding: 1px;
  }

  .concert-artist { font-size: 0.65rem; }
  .concert-venue  { font-size: 0.5rem; }
  .day-label      { font-size: 0.8em; }
  /* Colonne jour : zéro largeur, label sticky flottant par-dessus */
  th:first-child,
  td:first-child {
    width: 0;
    min-width: 0;
    max-width: 0;
    padding: 0;
    overflow: visible;
    white-space: nowrap;
    position: sticky;
    left: 0;
    z-index: 2;
    pointer-events: none;
  }

  table#schedule { border-spacing: 0 10px; }
}

/* Concerts passés */
.concert-cell.is-past { filter: grayscale(100%) contrast(0.8); }
