/* ============================================================
   ADMIN · Événements — inscriptions, agenda et résultats (admin/modules/events/events.js)
   ============================================================
   Déplacé tel quel de dashboard.css. Chargé après admin/shell/shell.css (ex-dashboard.css).
   ============================================================ */

/* ============================================================
   COMPÉTITIONS — agenda & résultats (admin)
   ============================================================ */
.event-admin-section { margin-bottom: 28px; }
/* Titre au-dessus d'un tableau (sections d'un même écran). */
.admin-table-title { margin: 0 0 12px; font-family: var(--f-display); font-size: 20px; font-weight: 500; color: var(--c-deep); display: flex; align-items: center; gap: 10px; }
.data-table-agenda .data-table-row { grid-template-columns: 72px minmax(0, 1fr) minmax(0, 220px) 74px; }
.data-table-agenda .cell-actions { justify-content: flex-end; }
.event-admin-row .event-date { width: 56px; min-height: 56px; }
.event-admin-row .event-date strong { font-size: 21px; }
.event-admin-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.event-admin-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.event-admin-title strong { font-size: 15px; color: var(--c-deep); }
.event-admin-meta { font-size: 13px; color: var(--c-mute); }
.event-admin-results { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* Fenêtre d'édition : formulaire long → c'est le fond qui défile (le corps
   reste en overflow visible pour ne pas couper le calendrier). */
.app-modal-overlay--top:has(.event-modal) { overflow-y: auto; padding-bottom: 6vh; }
.event-modal { max-width: 620px; max-height: none; }
.event-kind { display: flex; gap: 0; border: 1px solid var(--c-line); }
.event-kind label { flex: 1; cursor: pointer; }
.event-kind input { position: absolute; opacity: 0; pointer-events: none; }
.event-kind span {
  display: block;
  padding: 10px 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-mute);
}
.event-kind input:checked + span { background: var(--c-deep); color: #fff; }
.event-kind input:focus-visible + span { outline: 2px solid var(--c-blue); outline-offset: -2px; }
.event-form .event-textarea {
  font-family: var(--f-body);
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--c-line);
  resize: none;
  height: 88px;
  overflow-y: auto;
}
.event-results { border: 1px solid var(--c-line); padding: 12px 16px 16px; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.event-results[hidden], .event-only-competition[hidden] { display: none; }
.event-results legend { padding: 0 6px; font-weight: 600; color: var(--c-deep); }
.event-results legend small { font-weight: 400; color: var(--c-mute); }
.event-medal-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) {
  .data-table-agenda .event-admin-main { align-items: flex-start; }
}

/* ============================================================
   ÉVÉNEMENTS — inscriptions (admin)
   ============================================================ */
.evreg-section-title { font-family: var(--f-display); font-weight: 500; font-size: 20px; margin: 8px 0 12px; color: var(--c-deep); }
.evreg-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.evreg-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-left: 3px solid var(--c-blue);
}
.evreg-card.is-draft { border-left-color: var(--c-gold); background: color-mix(in srgb, var(--c-paper) 85%, var(--c-cream)); }
.evreg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.evreg-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.evreg-title a { font-size: 16px; font-weight: 600; color: var(--c-deep); text-decoration: none; }
.evreg-title a:hover { color: var(--c-blue); }
.evreg-meta { font-size: 13px; color: var(--c-mute); }
.evreg-gauge { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; color: var(--c-mute); }
.evreg-count strong { color: var(--c-deep); font-size: 15px; }
.evreg-bar { width: 160px; height: 6px; background: var(--c-cream); border: 1px solid var(--c-line); }
.evreg-bar i { display: block; height: 100%; background: var(--c-blue); }
.evreg-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.evreg-kpis { margin-bottom: 20px; }
.kpi-value small { font-size: 18px; color: var(--c-mute); }
.evreg-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.evreg-subtabs { margin: 0; border-bottom: none; }
.evreg-toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.evreg-toolbar-actions .btn svg { width: 14px; height: 14px; }
.data-table-evreg .data-table-row {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 0.8fr) 122px;
}
.evreg-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.evreg-who > span { display: flex; flex-direction: column; min-width: 0; }
.evreg-who strong { color: var(--c-deep); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evreg-kind { font-size: 12px; color: var(--c-mute); }
.evreg-rank {
  flex-shrink: 0; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-cream); font-size: 12px; font-weight: 700; color: var(--c-deep);
}
.evreg-contact { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.evreg-contact a { color: var(--c-blue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evreg-contact span { color: var(--c-mute); }
.evreg-pay { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.evreg-amount { font-size: 12px; color: var(--c-mute); }
.evreg-row-actions { justify-content: flex-end; }
.evreg-empty { padding: 24px 18px; margin: 0; }

/* Formulaire : section inscriptions */
.event-registration { border: 1px solid var(--c-line); padding: 12px 16px 16px; margin: 0; }
.event-registration legend { padding: 0 6px; }
.event-reg-toggle { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--c-deep); cursor: pointer; }
.event-reg-toggle input { width: 16px; height: 16px; accent-color: var(--c-blue); }
.event-reg-fields { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.event-reg-fields[hidden] { display: none; }
.event-reg-hint { margin: 0; font-size: 12px; color: var(--c-mute); }
.evreg-message { height: 150px; }
@media (max-width: 760px) {
  .evreg-card { flex-wrap: wrap; }
  .evreg-actions { width: 100%; justify-content: flex-end; }
}

/* Tableaux sur téléphone : une colonne (ex-fin de dashboard.css, doit suivre
   les grilles ci-dessus). */
@media (max-width: 760px) {
  .data-table-evreg .data-table-row,
  .data-table-agenda .data-table-row { grid-template-columns: minmax(0, 1fr); }
}
