/* Feuille de style principale pour le site d’entraînement Math Sup */

/* Variables de couleurs pour une personnalisation aisée */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #2980b9;
  --accent-color: #1abc9c;
  --background-color: #f5f7fa;
  --text-color: #333;
  --white: #ffffff;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* En‑tête avec image d’arrière‑plan */
.hero {
  position: relative;
  background-image: url('images/header.png');
  background-size: cover;
  background-position: center;
  height: 280px;
  color: var(--white);
}

/* Variante de la bannière pour les pages internes (hauteur réduite) */
.hero.small {
  height: 180px;
}

/* Voile sombre pour améliorer la lisibilité du texte sur l’image */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1rem;
}

.hero-overlay h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
}

.hero-overlay p {
  margin-top: 0.5rem;
  font-size: 1.1rem;
  max-width: 600px;
}

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.selection {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 4px 8px var(--shadow-color);
  padding: 2rem;
  max-width: 450px;
  width: 100%;
}

.selection h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: var(--primary-color);
}

.form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.form-group select {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
  color: var(--white);
  background-color: var(--secondary-color);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn:hover {
  background-color: var(--primary-color);
}

footer {
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
  background-color: var(--primary-color);
  color: var(--white);
}

/* Quiz page styles */
#timer {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

#quiz-container {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 4px 8px var(--shadow-color);
  padding: 1.5rem;
  max-width: 600px;
  width: 100%;
}

.question {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.options {
  list-style: none;
  padding: 0;
}

.options li {
  margin-bottom: 0.5rem;
}

.options input[type="radio"] {
  margin-right: 0.5rem;
}

#next-btn, #finish-btn {
  margin-top: 1rem;
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
  color: var(--white);
  background-color: var(--accent-color);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#next-btn:hover, #finish-btn:hover {
  background-color: var(--secondary-color);
}

.result {
  text-align: center;
}