/* CSS Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Typographie de base */
body {
  font-family: Quicksand, Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.5px;
  color: #3e4749;
  background-color: #ffffff;
}

/* Titres */
h1, h2, h3 {
  font-family: Montserrat, 'Arial Black', Gadget, sans-serif;
}

h1 {
  color: #333;
  font-size: 20px;
  font-weight: 400;
  text-align: center;
  margin-bottom: 30px;
}

h2 {
  color: #29baf1;
  font-size: 30px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 20px;
}

h3 {
  color: #376187;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

/* Éléments de formulaire */
button {
  font-family: Montserrat, 'Arial Black', Gadget, sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  margin: 4px;
  padding: 8px 16px;
  border: none;
  border-radius: 3px;
  background-color: #005d82;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: #29baf1;
}

button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

select {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

/* Classes utilitaires */
.hidden {
  display: none !important;
}

/* Header */
header {
  text-align: center;
  margin: 20px 0 10px 0;
}

header img {
  width: 240px;
  height: auto;
}

/* Section Panels */
.panels {
  display: flex;
  justify-content: center;
  align-items: center;
}

.box-panel {
  background-color: #f4f7fc;
  width: 90%;
  min-width: 320px;
  max-width: 1000px;
  padding: 60px 20px;
}

.panels h2 {
  text-align: center;
}

.panel-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.panel {
  border: 1px solid #005d82;
  min-height: 120px;
  width: 48%;
  padding: 15px;
  background-color: #ffffff;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.panel:hover {
  background-color: #e6f7ff;
}

.panel.filled-panel {
  background-color: #e6f7ff;
  border-color: #1976d2;
}

.panel-number {
  font-size: 2em;
  font-weight: bold;
  color: #1976d2;
}

.hidden-question,
.question-content {
  font-style: italic;
  padding: 10px;
  text-align: left;
  font-size: 0.9em;
  line-height: 1.4;
}

/* Boutons spécialisés */
.button-container {
  text-align: center;
}

.panels button:first-child {
  background-color: #31b094;
}

.panels button:nth-child(2) {
  background-color: #e65858;
}

.panels button:hover {
  background-color: #29baf1 !important;
}

.play-button-container {
  text-align: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 2px solid #e6f7ff;
  display: none;
}

.play-btn {
  background-color: #005d82 !important;
  font-size: 14px;
  padding: 12px 24px;
}

.edit-btn {
  background-color: #e65858;
  color: #ffffff;
}

.delete-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background-color: #005d82;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: background-color 0.2s ease, transform 0.1s ease;
  padding: 0;
}

.delete-btn:hover {
  background-color: #cc0000;
}

/* Section Bank */
.categories {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-top: 20px;
  gap: 20px;
}

.box-bank {
  width: 50%;
  min-width: 400px;
  max-width: 800px;
}

.box-bank h3 {
  text-align: center;
}

.box-bank p.legend {
  text-align: center;
  margin-bottom: 10px;
}

#category-select {
  width: 80%;
  display: block;
  margin: 0 auto;
  border: 1px solid #333;
  color: #333;
  height: 48px;
  font-size: 16px;
}

.question-list {
  display: block;
}

.question {
  border: 1px solid #ddd;
  padding: 12px;
  margin: 8px 0;
  cursor: grab;
  background-color: #f9f9f9;
  border-radius: 3px;
  transition: background-color 0.2s ease;
  font-size: 14px;
}

.question:hover {
  background-color: #f0f0f0;
}

.question:active {
  cursor: grabbing;
}

.surprise-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
  border-radius: 3px;
  border: 1px solid rgba(0, 93, 130, 0.28);
  padding: 20px;
}

.surprise-container p.hasard {
  text-align: center;
  margin: 0;
  font-weight: 700;
  text-transform: uppercase;
}

.surprise-container .select-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.surprise-container p {
  margin: 0;
  font-style: italic;
}

/* Section Submit */
.submit-section {
  text-align: center;
  margin: 40px 0;
}

.submit-section a {
  margin: 4px;
  font-size: 12px;
  text-transform: uppercase;
  font-family: Montserrat, 'Arial Black', Gadget, sans-serif;
  color: #005d82;
  text-decoration: none;
  transition: color 0.2s ease;
}

.submit-section a:hover {
  color: #29baf1;
}

/* Media Queries */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  
  .panel {
    width: 90%;
    min-height: 100px;
  }
  
  .panel-number {
    font-size: 1.5em;
  }
  
  .hidden-question,
  .question-content {
    font-size: 0.8em;
  }
  
  .categories {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  
  .box-bank {
    width: 100%;
    min-width: 320px;
  }
}