/* Styles pour WC Edit Inscriptions */
.wc-edit-inscriptions {
  max-width: 100%;
  margin: 0 auto;
}

.wc-edit-inscriptions h3 {
  color: #333;
  font-size: 24px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e0e0e0;
}

.instructions {
  color: #666;
  font-size: 16px;
  margin-bottom: 30px;
}

.no-inscriptions {
  text-align: center;
  color: #999;
  font-style: italic;
  padding: 40px 20px;
}

.inscriptions-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.inscription-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inscription-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: #007cba;
  transform: translateY(-2px);
}

.inscription-info {
  flex: 1;
}

.product-name {
  font-weight: 600;
  color: #333;
  font-size: 16px;
  margin-bottom: 8px;
  line-height: 1.3;
}

.inscription-details {
  display: flex;
  gap: 15px;
  align-items: center;
}

.inscription-id {
  background: #f0f0f0;
  color: #666;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-family: monospace;
}

.inscription-date {
  color: #888;
  font-size: 14px;
}

.inscription-actions {
  margin-left: 20px;
}

.edit-button {
  background: #007cba;
  color: white !important;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
  min-width: 80px;
  text-align: center;
  border: none;
}

.edit-button:hover {
  background: #005a87 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,123,186,0.3);
  color: white !important;
}

/* Éliminer TOUS les espaces créés par JetForm Builder */
.wc-edit-inscriptions .jet-form-builder br,
.wc-edit-inscriptions .jet-form-builder .jet-form-builder__field-wrap br,
.wc-edit-inscriptions .jet-form-builder .jet-form-builder__label br,
.wc-edit-inscriptions .jet-form-builder .jet-form-builder-row br,
.wc-edit-inscriptions .jet-form-builder .checkradio-wrap br,
.wc-edit-inscriptions .jet-form-builder .radio-wrap br,
.wc-edit-inscriptions .jet-form-builder .wp-block-column br,
.wc-edit-inscriptions .jet-form-builder .wp-block-group br,
.wc-edit-inscriptions .jet-form-builder .jet-sm-gb-wrapper br {
  display: none !important;
  height: 0 !important;
  line-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.wc-edit-inscriptions .jet-form-builder .hidden-field {
  display: none !important;
}

/* Réduire l'espacement en haut */
.wc-edit-inscriptions {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.wc-edit-inscriptions h3 {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Optimiser l'espacement des champs cachés */
.wc-edit-inscriptions input[type="hidden"] {
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Réduire l'espacement des conteneurs JetForm */
.wc-edit-inscriptions .jet-form-builder {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.wc-edit-inscriptions .jet-form-builder .form-group {
  margin-top: 10px !important;
}

/* Éliminer seulement les balises br, pas les paragraphes */

/* Éliminer les espaces des champs cachés */
.wc-edit-inscriptions .jet-form-builder .hidden-field {
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  line-height: 0 !important;
}

/* Optimiser l'espacement des labels des boutons radio */
.wc-edit-inscriptions .jet-form-builder .jet-form-builder__field-label {
  margin-bottom: 5px !important;
}

/* Réduire l'espacement entre les groupes de champs */
.wc-edit-inscriptions .jet-form-builder .jet-form-builder-row {
  margin-bottom: 15px !important;
}

/* Éliminer les espaces des conteneurs vides */
.wc-edit-inscriptions .jet-form-builder .wp-block-column:empty {
  display: none !important;
}

/* Styles pour le repeater "coureurs" - Masquer les boutons d'ajout/suppression */
.wc-edit-inscriptions .jet-form-builder-repeater[data-field-name="coureurs"] .jet-form-builder-repeater__actions,
.wc-edit-inscriptions .jet-form-builder-repeater[data-field-name="coureurs"] .jet-form-builder-repeater__new,
.wc-edit-inscriptions .jet-form-builder-repeater[data-field-name="coureurs"] .jet-form-builder-repeater__row-remove,
.wc-edit-inscriptions .jet-form-builder-repeater[data-field-name="coureurs"] .jet-form-builder-repeater__remove {
  display: none !important;
  pointer-events: none !important;
}

/* Numérotation automatique: "Coureur 2, 3, ..." (offset +1) */
.wc-edit-inscriptions .jet-form-builder-repeater[data-field-name="coureurs"] .jet-form-builder-repeater__items {
  counter-reset: coureurs 1; /* <- démarre à 2 au premier row */
}

.wc-edit-inscriptions .jet-form-builder-repeater[data-field-name="coureurs"] .jet-form-builder-repeater__row {
  counter-increment: coureurs;
  position: relative;
  padding-top: 2em; /* espace pour le titre */
}

.wc-edit-inscriptions .jet-form-builder-repeater[data-field-name="coureurs"] .jet-form-builder-repeater__row::before {
  content: "Coureur " counter(coureurs);
  font-weight: 600;
  font-size: 18px;
  position: absolute;
  top: 0;
  left: 0;
  color: #333;
}

@media (max-width: 768px) {
  .inscriptions-grid {
    grid-template-columns: 1fr;
  }
  
  .inscription-card {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .inscription-actions {
    margin-left: 0;
  }
}
