/* Styles de base pour l'écran */
body {
  font-family: Arial, sans-serif;
  background: #f7f7f7;
  margin: 0;
  padding: 20px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

h1, h2 {
  text-align: center;
}

.form-group {
  margin-bottom: 15px;
}

label {
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
}

textarea, input[type="number"] {
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
}

button {
  padding: 10px 15px;
  font-size: 16px;
  cursor: pointer;
  display: block;
  margin: 0 auto;
}

#messages {
  margin: 15px 0;
  color: red;
  text-align: center;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

table, th, td {
  border: 1px solid #ddd;
}

th, td {
  padding: 8px;
  text-align: center;
}

/* Styles pour les cartes de parcours */
#parcoursDisplay {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.participant-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
  padding: 10px;
  /* Ajustez la largeur pour obtenir environ 3 colonnes sur écran */
  flex: 0 0 250px;
  margin: 10px;
}

.participant-card h3 {
  font-size: 1.1em;
  margin-top: 0;
  text-align: center;
}

.participant-card ol {
  padding-left: 20px;
}

/* Styles d'impression pour obtenir environ 12 cartes par page (format lettre) */
@media print {
  body {
    margin: 0;
    padding: 0;
  }
  .container {
    box-shadow: none;
    max-width: none;
    margin: 0;
    padding: 10mm;
  }
  /* Pour la section des cartes, on passe en mode bloc et on centre les inline-block */
  #parcoursDisplay {
    display: block;
    text-align: center;
  }
  .participant-card {
    display: inline-block;
    /* Fixer une largeur en mm afin de pouvoir avoir environ 3 cartes par ligne */
    width: 50mm;
    margin: 2mm;
    vertical-align: top;
    page-break-inside: avoid;
  }
  /* Pour les tableaux, éviter les sauts de page internes */
  table, tr, td, th {
    page-break-inside: avoid;
  }
}

