/* Agenda Planet Padel Academy — feuille de style commune.
   Polices système (aucune police Google chargée : plus léger et plus simple côté RGPD). */
:root {
  color-scheme: light dark;
  --bg: light-dark(#f4f6f3, #0e1714);
  --card: light-dark(#ffffff, #16221e);
  --ink: light-dark(#0f1d19, #e9f0ec);
  --muted: light-dark(#5b6b65, #9fb1aa);
  --line: light-dark(#dfe5e1, #26352f);
  --court: light-dark(#0b5d45, #3fbf8f);      /* vert terrain */
  --court-ink: light-dark(#ffffff, #06130e);
  --ball: #d7f23f;                            /* jaune balle, une seule touche */
  --danger: light-dark(#b42318, #ff8a80);
  --radius: 14px;
}
* { box-sizing: border-box; min-width: 0; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; overflow-x: clip; }
a { color: var(--court); }
h1, h2, h3 { line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(28px, 5vw, 42px); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 20px; font-weight: 700; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 max(4vw, 16px); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.hidden { display: none !important; }

/* En-tête : bande « terrain » avec lignes blanches */
.top { background: var(--court); color: var(--court-ink); position: relative; overflow: hidden; }
.top::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .14;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), currentColor calc(50% - 1px), currentColor calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(0deg, transparent 10px, currentColor 10px, currentColor 12px, transparent 12px); }
.top .wrap { position: relative; z-index: 1; padding-top: 28px; padding-bottom: 28px; display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.brand { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.ballmark { width: 18px; height: 18px; border-radius: 50%; background: var(--ball); box-shadow: inset -3px -3px 0 rgba(0,0,0,.15); flex: none; }
.top p { margin: 6px 0 0; opacity: .9; }

.demo-banner { background: var(--ball); color: #1b2400; font-size: 14px; padding: 8px 16px; text-align: center; }

/* Contrôles */
button, .btn { font: inherit; font-weight: 600; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); min-height: 44px; padding: 8px 16px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
button:hover, .btn:hover { border-color: var(--court); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible { outline: 3px solid var(--ball); outline-offset: 2px; }
button.primary, .btn.primary { background: var(--court); color: var(--court-ink); border-color: var(--court); }
button.danger { color: var(--danger); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.link { border: 0; background: none; color: var(--court); padding: 4px 6px; min-height: 36px; text-decoration: underline; }
input, select, textarea { font: inherit; font-size: 16px; width: 100%; padding: 10px 12px; min-height: 44px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); }
textarea { min-height: 80px; resize: vertical; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; }
.check input { width: 20px; height: 20px; min-height: 0; flex: none; margin-top: 2px; accent-color: var(--court); }

/* Filtres en pastilles */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border-radius: 999px; min-height: 40px; padding: 6px 14px; font-weight: 600; font-size: 15px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }

/* Navigation semaine */
.weeknav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 18px 0 8px; }
.weeknav strong { font-size: 18px; text-align: center; }

/* Liste des jours et créneaux */
.day { padding: 18px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 150px 1fr; gap: 12px 20px; }
.day h3 { font-size: 16px; padding-top: 10px; }
.day h3 span { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.slot { text-align: left; display: block; padding: 12px 14px; border-radius: var(--radius); background: var(--card);
  border: 1px solid var(--line); border-left: 5px solid var(--c, var(--court)); width: 100%; min-height: 0; }
.slot .time { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.slot .meta { font-size: 14px; color: var(--muted); font-weight: 500; display: block; }
.slot .places { font-size: 13px; font-weight: 700; margin-top: 6px; display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--court) 14%, transparent); color: var(--court); }
.slot .coach { font-size: 14px; font-weight: 700; display: block; margin-top: 2px; }
.coachchips { margin-top: 10px; }
.coachchips .chip { min-height: 36px; font-size: 14px; }
.slot.full { opacity: .55; cursor: not-allowed; }
.slot.full .places { background: none; color: var(--muted); }
.empty { padding: 40px 0; text-align: center; color: var(--muted); }

/* Boîtes de dialogue */
dialog { max-height: calc(100dvh - 24px); overflow: auto; border: 0; border-radius: 18px; padding: 0; width: min(520px, calc(100vw - 24px)); background: var(--card); color: var(--ink);
  box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(5, 20, 15, .55); }
.dlg-head { padding: 18px 20px; background: var(--court); color: var(--court-ink); }
.dlg-head .time { font-size: 26px; font-weight: 800; }
.dlg-body { padding: 20px; }
.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }
.error { color: var(--danger); font-weight: 600; font-size: 14px; min-height: 1em; margin: 4px 0 0; }
.notice { background: color-mix(in srgb, var(--court) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--court) 30%, transparent);
  border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
footer { padding: 32px 0 48px; color: var(--muted); font-size: 14px; }

@media (max-width: 640px) {
  .day { grid-template-columns: 1fr; gap: 8px; }
  .day h3 { padding-top: 0; }
  .day h3 span { display: inline; margin-left: 6px; }
  .weeknav strong { font-size: 16px; }
  .weeknav button { padding: 8px 12px; }
  .sm-hide { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .slot { transition: transform .12s ease, border-color .12s ease; }
  .slot:not(.full):hover { transform: translateY(-2px); }
}
