.admin-races-container {
    max-width: 1180px;
    margin: 2rem auto;
    padding: 0 1rem;
  }

  .admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
  }

  .admin-header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 500;
    color: #1f2937;
  }

  .btn-new {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--admin-blue-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s;
  }

    .btn-del {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: red;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s;
  }


    .btn-del:hover {
    background: rgb(221, 2, 2);
  }
  .btn-new:hover {
    background: var(--admin-hover-blue-color);
  }

  .races-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08),
                0 1px 2px rgba(0,0,0,0.06);
  }

  .races-table th,
  .races-table td {
    padding: 0.95rem 1.1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
  }

  .races-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #4b5563;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .races-table tr:hover {
    background: #f9fafb;
  }

  .races-table td a {
    color: var(--admin-blue-color);
    text-decoration: none;
    font-weight: 500;
  }

  .races-table td a:hover {
    text-decoration: underline;
    color: var(--admin-hover-blue-color);
  }

  .gpx-yes  { color: #16a34a; font-weight: 600; }
  .gpx-no   { color: #dc2626; font-weight: 500; }
  .empty-list {
    padding: 3rem;
    text-align: center;
    color: #6b7280;
    font-size: 1.1rem;
  }



  .admin-form-container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.admin-header h1 {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 500;
  color: #1f2937;
}

.btn-delete {
  padding: 0.6rem 1.2rem;
  background: #dc2626;
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
}

.btn-delete:hover {
  background: #b91c1c;
}

.form-section {
  margin-bottom: 2.2rem;
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.form-section h2 {
  margin: 0 0 1.2rem 0;
  font-size: 1.25rem;
  color: #374151;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem 2rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field label {
  font-weight: 500;
  color: #4b5563;
  font-size: 0.95rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 0.65rem 0.9rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--admin-blue-color);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.full-width {
  grid-column: 1 / -1;
}

.price-wrapper {
  position: relative;
}

.price-hint {
  font-size: 0.9rem;
  color: #6b7280;
  margin-left: 0.8rem;
}

.current-file {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.form-actions {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
}

.btn-primary {
  padding: 0.8rem 1.8rem;
  background: var(--admin-blue-color)
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
}

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

.btn-secondary {
  padding: 0.8rem 1.8rem;
  background: #6b7280;
  color: white;
  border-radius: 6px;
  text-decoration: none;
}

.form-message {
  margin-top: 1.5rem;
  min-height: 1.2rem;
}





.tab-link {
    padding: 10px 18px;
    text-decoration: none;
    font-weight: 500;
    color: #6b7280;
    border: 1px solid transparent;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
}

/* Hover */
.tab-link:hover {
    background-color: #f3f4f6;
    color: #111827;
}

/* Onglet actif */
.tab-link.active {
    background-color: #ffffff;
    color: #111827;
    border: 1px solid #e5e7eb;
    border-bottom: 2px solid white;
}


  @media (max-width: 768px) {
    .races-table th:nth-child(3),
    .races-table td:nth-child(3) { display: none; } /* event caché sur mobile */
  }




















.errorlist {
    list-style: none;
    margin: 0 0 5px 0;
    padding: 0;
    color: #d9534f;
    font-size: 14px;
}

/* style des erreurs */
.errorlist {
    list-style: none;
    margin: 0;
    padding: 0;
    color: #d9534f;
    font-size: 13px;
}

/* met l'erreur après l'input visuellement */
form li {
    flex-wrap: wrap;
}

.errorlist {
    order: 3;
}
.errorlist li {
    margin: 0;
}


  .form-clean ul {
    list-style: none;     /* enlève les puces */
    padding: 0;
    margin: 0;
}

.form-clean li {
    display: flex;        /* aligne label + input */
    align-items: center;
    margin-bottom: 12px;
}

.form-clean label {
    width: 300px;         /* largeur fixe pour aligner */
    font-weight: 600;
}

.form-clean input,
.form-clean select,
.form-clean textarea {
    flex: 1;              /* prend toute la place restante */
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
}




/* Cache les textes moches */
.clearable-file-input label,
.clearable-file-input br,
.clearable-file-input span {
    display: none;
}

/* Style global du file input */
input[type="file"] {
    font-size: 14px;
}

/* Bouton moderne */
input[type="file"]::file-selector-button {
    background: var(--admin-blue-color);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 12px;
    transition: 0.2s ease;
}

input[type="file"]::file-selector-button:hover {
    background: var(--admin-hover-blue-color);
}

.current-image-preview {
    margin-bottom: 20px;
}

.current-image-preview p {
    font-weight: 600;
    margin-bottom: 8px;
}

.preview-image {
    max-width: 120px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: block;
}

.gpx-link {
    margin-bottom: 10px;
}

.gpx-link a {
    color: var(--admin-blue-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.gpx-link a:hover {
    color: var(--admin-hover-blue-color);
    border-bottom: 1px solid var(--admin-hover-blue-color);
}






.pagination {
  margin-top: 20px;
  text-align: center;
}
.pagination a, .pagination span {
  display: inline-block;
  padding: 6px 12px;
  margin: 0 2px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
}
.pagination .current {
  background-color: var(--admin-blue-color);
  color: white;
  border-color: var(--admin-blue-color);
}
.pagination a:hover {
  background-color: #f0f0f0;
}
