#quiz-header {
  position: sticky;
  top: 0;
  background-color: white;
  padding: 10px 0;
  z-index: 10;
}

/*Pour home-quiz.html*/
.quiz-wrapper {
  background-color: #fff8f0;
  border: 2px solid #ec8f05;
  border-radius: 16px;
  padding: 20px;
  margin: 16px auto;
  max-width: 1200px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.quiz-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  /*grid-template-columns: repeat(3, 1fr);*/ /*Pour forcer 3 colonnes fixes, à l'affichage des quizs*/
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.quiz-list:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.quiz-list h3 {
  margin: 0 0 8px;
  color: #333;
}

.quiz-list p {
  margin: 0;
  color: #555;
  font-size: 0.95em;
}

/*Quiz*/
body {
  font-family: 'Segoe UI', sans-serif;
  background: #f9f9f9;
  color: #333;
  margin: 0;
  padding: 2rem;
}

.quiz-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
  background: white;
  border: 2px solid #ec8f05;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.quiz-container:hover {
  transform: scale(1.02);
}

.quiz-container button {
  margin-top: 10px;
  padding: 0.6rem 1.2rem;
  background-color: #ec8f05;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.quiz-container button:hover {
  background-color: #d37d03;
}

.quiz-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  border: 2px solid #ec8f05;
  border-radius: 12px;
  background-color: #fff8e6;
}

.quiz-filter label {
  font-weight: bold;
  margin-right: 5px;
}

.quiz-filter select {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background-color: #fff;
  font-size: 1em;
}

.quiz-result {
  background-color: #f9f9f9;
  border: 2px solid #ec8f05;
  border-radius: 20px;
  padding: 24px;
  margin: 24px auto;
  max-width: 600px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-align: center;
  margin-top: 2rem;
  font-size: 1.2rem;
  animation: popResult 0.4s ease-in-out;
}

.quiz-result h2 {
  color: #333;
  margin-bottom: 16px;
}

.quiz-result p {
  color: #444;
  font-size: 1.1em;
  margin: 8px 0;
}

#quiz-container,
#quiz-result {
  display: none;
}

.btn-result {
  background-color: #ec8f05; /* ton orange stylé */
  color: white;
  border: none;
  padding: 10px 20px;
  margin: 8px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-result:hover {
  background-color: #cf7c04;
  transform: scale(1.05);
}

.quiz-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: linear-gradient(145deg, #cf7c04, #fdd08c);/*#cf7c04);*/
  background-color: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 16px rgba(236, 143, 5, 0.1);
  padding: 16px;
  text-align: center;
  transition: transform 0.2s ease;
}

.quiz-card-title-color {
  color: #ffffff
}

.quiz-card::before {
  content: "";
  display: block;
  height: 6px;
  width: 100%;
  background-color: #ec8f05;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  margin: -16px -16px 8px -16px; /* étend à l'extérieur */
}

.quiz-card:hover {
  transform: scale(1.02);
}

.quiz-card .btn-start {
  display: inline-block;
  margin-top: 12px;
  background-color: #ec8f05;
  color: white;
  padding: 10px 18px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.2s ease;
}

.quiz-card .btn-start:hover {
  background-color: #cf7902;
}

.btn-start {
  display: inline-block;
  background-color: #ec8f05;
  color: white;
  border: none;
  padding: 12px 24px;
  margin: 8px;
  font-size: 1em;
  font-weight: bold;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.btn-start:hover {
  background-color: #d87700;
  transform: scale(1.05);
}

#progress-container {
  width: 100%;
  background-color: #e0e0e0;
  height: 12px;
  border-radius: 6px;
  margin: 1rem 0;
  overflow: hidden;
}

#progress-bar {
  height: 100%;
  width: 0%;
  background-color: #ec8f05;
  transition: width 0.3s ease-in-out;
}

#timer {
  font-weight: bold;
  font-size: 1.2rem;
  text-align: right;
  margin-bottom: 1rem;
}

#time-bar-container {
  width: 100%;
  background-color: #eee;
  height: 10px;
  margin: 8px 0 16px;
  margin-bottom: 16px;
  border-radius: 8px;
  overflow: hidden;
}

#time-bar {
  height: 100%;
  width: 0%;
  background-color: #2dd000; /* ou ton orange personnalisé #ec8f05 */
  transition: width 1s linear;
}

.bar-label {
  margin: 8px 0 4px;
  font-size: 14px;
  font-weight: bold;
  color: #333;
}

/* Animation de clignotement */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Animation de vibration */
@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-2px); }
  40% { transform: translateX(2px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
  100% { transform: translateX(0); }
}

/* Classe à ajouter dynamiquement */
.time-alert {
  animation: blink 1s infinite, shake 0.3s infinite;
}

#fireworks-canvas {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  width: 100vw;
  height: 100vh;
  display: none;
}

.fail-mark {
  font-size: 100px;
  color: red;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  z-index: 1000;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.fail-mark.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

body.success {
  background-color: #eaffea;
}

body.fail {
  background-color: #ffecec;
}

.quiz-illustration {
  max-width: 300px;
  display: block;
  margin: 10px auto 5px auto;
  border-radius: 8px;
}

.quiz-caption {
  font-size: 0.9em;
  font-style: italic;
  text-align: center;
  color: #555;
  margin-bottom: 15px;
}

.quiz-item p {
  margin-top: 10px;
  font-size: 1.1em;
}

.btn-next {
  margin-top: 15px;
  background-color: #ec8f05;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 6px;
  cursor: pointer;
}