/* ---------- Connexion ---------- */
.login-wrap { min-height: 100%; display: grid; place-items: center; padding: 40px 16px; }
.login { width: min(460px, 100%); padding: 40px 32px; display: grid; }
.sun-zone { display: grid; justify-items: center; margin: 0 auto 22px; }
.sun-zone .soleil { width: 96px; height: 96px; display: block; color: var(--gold); animation: flotte 4.2s ease-in-out infinite; filter: drop-shadow(0 2px 3px rgba(156,122,43,.18)); }
.sun-zone .ombre { width: 53px; height: 8px; margin-top: 10px; border-radius: 50%; background: radial-gradient(closest-side, rgba(156,122,43,.28), rgba(156,122,43,0)); animation: ombre 4.2s ease-in-out infinite; }
@keyframes flotte { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes ombre { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.78); opacity: .55; } }
@media (max-width: 480px) { .sun-zone .soleil { width: 84px; height: 84px; } .sun-zone .ombre { width: 46px; } }
@media (prefers-reduced-motion: reduce) { .sun-zone .soleil, .sun-zone .ombre { animation: none; } }
.code-input { text-align: center; font-size: 26px; letter-spacing: .4em; font-weight: 600; height: 60px; }
.login-err { margin: 16px 0 0; padding: 12px 16px; border-radius: 14px; background: var(--neutral); font-size: 14px; text-align: center; }

/* ---------- Admin ---------- */
.apercu-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 16px; background: var(--ink); color: var(--surface); font-size: 14px; }
.apercu-bar button { color: var(--surface); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.tab-admin { display: inline-flex; align-items: center; gap: 6px; }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kpi { padding: 22px 24px; display: grid; gap: 2px; }
.kpi b { font-family: var(--font-display); font-weight: 400; font-size: 48px; line-height: 1; letter-spacing: -0.02em; }
.kpi span { font-weight: 600; margin-top: 6px; }
.kpi small { color: var(--ink-muted); font-size: 13px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 28px; gap: 12px; align-items: center; padding: 7px 0; font-size: 14px; }
.bar-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row b { text-align: right; }
.bar { height: 10px; border-radius: 999px; background: var(--neutral); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--progress-fill); border-radius: 999px; }
.mini-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; font-size: 14px; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.mini-row span:first-child { min-width: 0; overflow-wrap: anywhere; }
.add-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; }
.field.sm { height: 38px; padding: 0 14px; font-size: 14px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 860px; }
.tbl th { text-align: left; font-weight: 600; padding: 14px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.tbl tr.inactif td { opacity: .55; }
.tbl select.field { width: auto; min-width: 90px; }
.toggle { width: 44px; height: 26px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .15s; }
.toggle i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-1); transition: transform .15s; }
.toggle.on { background: var(--accent); }
.toggle.on i { transform: translateX(18px); }
.admin-cours { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.grid-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.grid-form label, .lbl { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-muted); }
.grid-form .full { grid-column: 1 / -1; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex: 1; }
.inline-form .field { flex: 1; min-width: 160px; width: auto; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.check-row input { width: 18px; height: 18px; accent-color: var(--accent); }
button:disabled { opacity: .6; cursor: progress; }
@media (max-width: 980px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 16px; }
  .kpi span { font-size: 14px; }
  .admin-actions { width: 100%; }
  .admin-actions .btn { flex: 1; padding: 0 12px; font-size: 14px; }
  .admin-head + .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; }
  .admin-head + .chips .chip { flex: none; }
  .apercu-bar { flex-wrap: wrap; font-size: 13px; padding-top: calc(10px + env(safe-area-inset-top)); }
  .login { padding: 32px 22px; }
  /* tableau des participantes en fiches */
  .tbl { min-width: 0; }
  .tbl thead { display: none; }
  .tbl tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 16px; border-bottom: 1px solid var(--border); position: relative; }
  .tbl td { padding: 0; border: 0; font-size: 13px; }
  .tbl td::before { content: attr(data-l); display: block; font-size: 11px; color: var(--ink-muted); margin-bottom: 4px; }
  .tbl td[data-l="Adresse"] { grid-column: 1 / -1; padding-right: 48px; font-size: 14px; }
  .tbl td.td-del { position: absolute; top: 10px; right: 8px; }
  .tbl td.td-del::before, .tbl td[data-l=""]::before { display: none; }
  .tbl select.field { min-width: 0; width: 100%; }
  .bar-row { grid-template-columns: minmax(0, 1fr) 80px 24px; }
  .add-row, .grid-form, .two { grid-template-columns: 1fr; }
  .kpi b { font-size: 40px; }
}
