/* =========================================================
   Musiclic - Le Défi Chronologique
   V2.1 - CSS nettoyé
   ========================================================= */

.musiclic-chrono {
  max-width: 980px;
  margin: 30px auto;
  padding: 24px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 16px;
  color: #222;
  font-family: inherit;
  box-sizing: border-box;
}

.musiclic-chrono * {
  box-sizing: border-box;
}

/* En-tête */

.chrono-header {
  text-align: center;
  margin-bottom: 22px;
}
/* Sélection du thème */

.chrono-theme-select {
  margin-bottom: 14px;
  text-align: center;
}

.chrono-theme-select label {
  margin-right: 8px;
  font-weight: 700;
  color: #222;
}

.chrono-theme-select select {
  min-width: 260px;
  padding: 8px 12px;
  border: 1px solid #cccccc;
  border-radius: 6px;
  background: #ffffff;
  color: #222222;
  font-family: inherit;
  font-size: 0.95rem;
}

.chrono-theme-select select:hover {
  border-color: #336699;
}

.chrono-theme-select select:focus {
  outline: none;
  border-color: #336699;
  box-shadow: 0 0 0 3px rgba(51,102,153,0.15);
}
.chrono-theme-title {
  margin: 0 0 8px;
  color: #336699;
  font-size: 1.65rem;
  font-weight: 800;
}

.chrono-instruction {
  margin: 0 auto;
  max-width: 680px;
  color: #555;
  font-size: 1rem;
}

/* Options */

.chrono-controls {
  display: grid;
  grid-template-columns: 35% 65%;
  gap: 30px;
  margin: 20px 0;
  padding: 18px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
}

.chrono-control-group {
  margin: 0;
  text-align: center;
}

.chrono-control-group strong {
  display: block;
  margin-bottom: 12px;
  color: #222;
}

.chrono-button-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.chrono-choice,
.chrono-main-button,
.chrono-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
}

.chrono-choice {
  background: #f2f2f2;
  color: #222;
  border: 1px solid #ccc;
}

.chrono-choice:hover,
.chrono-choice.is-active {
  background: #336699;
  border-color: #336699;
  color: #fff;
}

/* Zone de jeu */

.chrono-game-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: stretch;
}

.chrono-panel {
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
}

.chrono-panel h3 {
  margin: 0 0 12px;
  color: #336699;
  font-size: 1.15rem;
}

.chrono-help {
  min-height: 38px;
  margin: -6px 0 14px;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.35;
}

.chrono-card-pool,
.chrono-slots {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Cartes */

.chrono-card {
  position: relative;
  min-height: 58px;
  padding: 13px 14px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  color: #111;
  font-weight: 800;
  text-align: center;
  cursor: grab;
  user-select: none;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chrono-card:hover {
  border-color: #336699;
}

.chrono-card:active {
  cursor: grabbing;
}

.chrono-card.is-selected {
  outline: 3px solid rgba(51, 102, 153, 0.25);
  border-color: #336699;
}

.chrono-card.is-locked {
  cursor: default;
}

/* Cases */

.chrono-slot {
  display: grid;
  grid-template-columns: 42px 1fr;
  min-height: 58px;
  background: #fafafa;
  border: 2px dashed #ccc;
  border-radius: 8px;
  overflow: hidden;
}

.chrono-slot-number {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eee;
  color: #336699;
  font-weight: 900;
}

.chrono-slot-content {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 8px;
}

.chrono-slot.is-hover {
  border-color: #336699;
  background: #f4f8fb;
}

.chrono-slot .chrono-card {
  width: 100%;
  min-height: 40px;
  margin: 0;
}

.chrono-empty {
  color: #777;
  font-style: italic;
}

/* Actions */

.chrono-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.chrono-main-button {
  background: #336699;
  color: #fff;
  border: 1px solid #336699;
}

.chrono-main-button:hover {
  background: #265d8c;
  border-color: #265d8c;
}

.chrono-secondary-button {
  background: #f2f2f2;
  color: #222;
  border: 1px solid #ccc;
}

.chrono-secondary-button:hover {
  background: #e6e6e6;
}

.chrono-message {
  min-height: 24px;
  margin-top: 14px;
  text-align: center;
  color: #333;
  font-weight: 700;
}

/* Résultats */

.chrono-results {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: stretch;
}

.chrono-result-block {
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
}

.chrono-result-block h3 {
  margin: 0 0 12px;
  color: #336699;
  font-size: 1.15rem;
}

#chrono-user-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.chrono-score-inline {
  margin-left: auto;
  color: #222;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  text-align: right;
}

.chrono-answer-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chrono-answer-item {
  min-height: 132px;
  padding: 12px 14px;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.chrono-answer-item strong {
  display: block;
  color: #111;
}

.chrono-answer-item span {
  display: block;
  margin-top: 3px;
  color: #555;
  font-size: 0.94rem;
}

.chrono-answer-item em {
  display: block;
  margin-top: 7px;
  color: #666;
  font-size: 0.92rem;
  font-style: normal;
  line-height: 1.35;
}

.chrono-answer-item.is-good {
  border-color: #77aa77;
  background: #f3fbf3;
}

.chrono-answer-item.is-bad {
  border-color: #cc7777;
  background: #fff5f5;
}

/* Responsive */

@media (max-width: 760px) {
  .musiclic-chrono {
    padding: 18px;
    border-radius: 12px;
  }

  .chrono-controls,
  .chrono-game-area,
  .chrono-results {
    grid-template-columns: 1fr;
  }

  .chrono-button-row,
  .chrono-actions {
    flex-direction: column;
  }

  .chrono-choice,
  .chrono-main-button,
  .chrono-secondary-button {
    width: 100%;
  }

  .chrono-answer-item {
    min-height: auto;
  }
}