/* === Reset simple === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === Polices système modernes (Apple-like) === */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  background: #f5f5f7; /* Gris clair Apple */
  color: #1d1d1f; /* Noir doux Apple */
}

/* === Titres sobres avec accent violet/rose === */
h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #1d1d1f;
}
h1 {
  font-size: 2.4rem;
  background: linear-gradient(90deg, #d63384, #6f42c1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #6f42c1;
}
h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: #d63384;
}

/* === Header === */
header {
  background: #fff;
  padding: 40px 20px;
  text-align: center;
  border-bottom: 1px solid #e5e5ea;
}
header h1 {
  margin-bottom: 10px;
}
header p {
  font-size: 1.1rem;
  color: #6e6e73;
}

/* === Navigation === */
nav {
  background: #fff;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 12px 0;
  border-bottom: 1px solid #e5e5ea;
}
nav a {
  color: #1d1d1f;
  text-decoration: none;
  margin: 0 18px;
  font-weight: 500;
  font-size: 1rem;
  position: relative;
  transition: color 0.3s;
}
nav a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: linear-gradient(90deg, #d63384, #6f42c1);
  transition: width 0.3s;
}
nav a:hover {
  color: #6f42c1;
}
nav a:hover::after {
  width: 100%;
}

/* === Main content === */
main {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
}

/* === Quiz list === */
.quiz-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}
.quiz-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  padding: 25px;
  transition: transform 0.25s, box-shadow 0.25s;
}
.quiz-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(111, 66, 193, 0.25);
}
.quiz-card h3 {
  margin-bottom: 12px;
}
.quiz-card p {
  font-size: 0.95rem;
  margin-bottom: 18px;
  color: #6e6e73;
}
.quiz-card a {
  display: inline-block;
  background: linear-gradient(90deg, #d63384, #6f42c1);
  color: #fff;
  padding: 10px 18px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity 0.3s;
}
.quiz-card a:hover {
  opacity: 0.85;
}

/* === Formulaires === */
input[type="text"],
textarea {
  width: 100%;
  padding: 10px 14px;
  margin-top: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #fff;
  color: #1d1d1f;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: #6f42c1;
  box-shadow: 0 0 4px rgba(111, 66, 193, 0.3);
}

/* Boutons */
button,
input[type="submit"] {
  background: linear-gradient(90deg, #d63384, #6f42c1);
  border: none;
  padding: 12px 25px;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 30px;
  cursor: pointer;
  transition: opacity 0.3s;
}
button:hover,
input[type="submit"]:hover {
  opacity: 0.85;
}

/* Radios et checkboxes */
input[type="radio"],
input[type="checkbox"] {
  accent-color: #6f42c1;
  transform: scale(1.1);
  margin-right: 6px;
}

/* === Footer === */
footer {
  margin-top: 60px;
  text-align: center;
  padding: 25px;
  background: #f9f9fb;
  border-top: 1px solid #e5e5ea;
  color: #6e6e73;
  font-size: 0.9rem;
}
/* Bloc connexion/déconnexion */
.auth-box {
  margin-top: 10px;
  text-align: center;
}

/* Message de bienvenue */
.auth-box .welcome {
  font-size: 18px;
  font-weight: bold;
  color: #6a1b9a;
  margin-bottom: 8px;
}

/* Bouton principal */
.auth-box a,
.auth-box .btn {
  display: inline-block;
  margin: 5px;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

/* Déconnexion */
.auth-box .logout {
  background: #f44336;
  color: #fff;
}

.auth-box .logout:hover {
  background: #d32f2f;
}

/* Connexion */
.auth-box .login {
  background: #6a1b9a;
  color: #fff;
}

.auth-box .login:hover {
  background: #ff4da6;
}

/* Créer un profil */
.auth-box .register {
  background: #2196f3;
  color: #fff;
}

.auth-box .register:hover {
  background: #1976d2;
}
.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f9f9f9;
  border-bottom: 1px solid #ddd;
  padding: 12px 20px;
}

.main-nav a {
  text-decoration: none;
  margin: 0 8px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: #ff4da6;
}

/* Partie droite */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.welcome {
  font-weight: bold;
  color: #6a1b9a;
  margin-right: 5px;
}

/* Boutons */
.logout, .login, .register {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
}

.logout {
  background: #f44336;
  color: #fff;
}

.logout:hover {
  background: #d32f2f;
}

.login {
  background: #6a1b9a;
  color: #fff;
}

.login:hover {
  background: #ff4da6;
}

.register {
  background: #2196f3;
  color: #fff;
}

.register:hover {
  background: #1976d2;
}
.uncompleted-quizzes {
  list-style: none;
  padding-left: 0;
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.uncompleted-quizzes li {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.uncompleted-quizzes li:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.uncompleted-quizzes a {
  font-weight: 600;
  color: #6a1b9a;
  text-decoration: none;
  background: none;     /* 🔹 supprime le fond bouton */
  padding: 0;           /* 🔹 supprime le padding du bouton */
  border-radius: 0;     /* 🔹 pas d'arrondi */
  display: inline;      /* 🔹 reste du texte normal */
}

.uncompleted-quizzes a:hover {
  text-decoration: underline;
  color: #ff4da6;
}


.uncompleted-quizzes .quiz-meta {
  font-size: 14px;
  color: #777;
  margin-left: 12px;
  white-space: nowrap;
}

/* === Responsive === */
@media (max-width: 768px) {
  header h1 { font-size: 1.8rem; }
  nav { flex-direction: column; }
  nav a { margin: 8px 0; }
  main { margin: 20px auto; }
}
@media (max-width: 768px) {
  .quiz-card {
    padding: 14px;
    margin-bottom: 24px; /* encore plus d’air entre les questions */
  }

  .quiz-card h3 {
    font-size: 1.1em; /* taille adaptée petit écran */
    margin-bottom: 12px;
  }

  .quiz-card input[type="text"],
  .quiz-card textarea,
  .quiz-card input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
  }
}