/*
 * The club's « Courtside » charter, as on the Performance Center: black header
 * with the yellow accent, content on a light background. Light theme only: the
 * form is read on a phone, often outdoors. Self-hosted Urbanist.
 */

@font-face {
  font-family: Urbanist;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/urbanist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Urbanist;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/urbanist-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --yellow: #ffd24d;
  --ink: #121212;
  --bg: #f4f3ef;
  --card: #fff;
  --muted: #5f5f59;
  --rule: #e3e1d9;
  --line: #c9c6bb;
  --red: #b3261e;
  --green: #1d7c32;
  --selected: #fffbea;
  --notice: #fff3c4;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Urbanist, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--ink);
}

/* ---- Header ---- */
.header { background: #000; color: #fff; position: sticky; top: 0; z-index: 2; }
.header-inner {
  max-width: 600px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 12px;
}
.logo { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.brand { font-weight: 800; font-size: 1.05rem; letter-spacing: 0.01em; }
.brand span { color: var(--yellow); }
.progress { height: 4px; background: #2a2a2a; }
.progress > div { height: 100%; background: var(--yellow); transition: width 0.2s ease; }

/* ---- Content ---- */
main { max-width: 600px; margin: 0 auto; padding: 20px 16px 56px; }
h1 { font-size: 1.65rem; line-height: 1.2; margin: 0 0 1rem; font-weight: 800; }
h1::after { content: ""; display: block; width: 3.2rem; height: 4px; background: var(--yellow); margin-top: 0.4rem; }
h2 { font-size: 1.15rem; line-height: 1.3; margin: 2rem 0 0.5rem; font-weight: 800; }
p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.2rem; }
li + li { margin-top: 0.25rem; }
.step-count { color: var(--muted); font-size: 0.92rem; font-weight: 700; margin: 0 0 0.25rem; }
.muted { color: var(--muted); }
.intro { color: var(--muted); }
.checklist { list-style: none; padding: 0; }
.checklist li { padding-left: 1.6rem; position: relative; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.45em; width: 0.85rem; height: 0.85rem;
  border-radius: 50%; background: var(--yellow); box-shadow: inset 0 0 0 2px #000;
}

/* ---- Fields ---- */
.field { margin: 1.25rem 0; }
.field > label:not(.option), legend { display: block; font-weight: 700; margin: 0 0 0.4rem; padding: 0; }
.help { color: var(--muted); font-size: 0.93rem; margin: -0.2rem 0 0.5rem; }
fieldset { border: 0; padding: 0; margin: 1.25rem 0; min-width: 0; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"], textarea {
  font: inherit;
  /* 16 px or more: below that, iOS zooms into the field. */
  font-size: 17px;
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  appearance: none;
}
input[type="date"] { display: block; }
textarea { min-height: 100px; resize: vertical; }
input:disabled, textarea:disabled { background: var(--bg); color: var(--muted); }
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--yellow); outline-offset: 0; border-color: var(--ink); }

.options { display: grid; gap: 8px; }
.options.grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.option {
  display: flex; align-items: center; gap: 12px;
  min-height: 50px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; font-weight: 600;
}
.option input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: #000; }
.option:has(input:checked) { border-color: #000; box-shadow: inset 0 0 0 1px #000; background: var(--selected); }
.option:has(input:focus-visible) { outline: 3px solid var(--yellow); outline-offset: 1px; }
.option.inline { margin-top: 8px; min-height: 44px; font-weight: 600; }
.option-help { display: block; font-weight: 500; color: var(--muted); font-size: 0.92rem; }
/* Short answers (sizes, yes or no) as chips: without the radio circle, « 10/12 ans »
   fits three to a row on a phone. The input stays, hidden, for keyboard and
   screen readers. */
.options.grid .option { position: relative; justify-content: center; text-align: center; padding: 10px 6px; }
.options.grid .option input { position: absolute; opacity: 0; pointer-events: none; }
.options.grid .option:has(input:checked) { background: #000; color: var(--yellow); }

.consent { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 16px; margin: 1rem 0; }
.consent p, .consent ul { font-size: 0.95rem; }
.consent .option { margin-top: 0.75rem; }

.notice {
  background: var(--notice); border-left: 5px solid var(--yellow); border-radius: 8px;
  padding: 12px 14px; margin: 1rem 0; font-size: 0.97rem;
}
.error-text { color: var(--red); font-size: 0.93rem; font-weight: 700; margin: 0.4rem 0 0; }
.has-error input[type="text"], .has-error input[type="email"], .has-error input[type="tel"],
.has-error input[type="date"], .has-error textarea, .has-error .option { border-color: var(--red); }

.tariff { background: #000; color: #fff; border-radius: 12px; padding: 16px; margin: 1.5rem 0; }
.tariff .label { color: #bdbdb6; font-size: 0.92rem; font-weight: 700; }
.tariff strong { display: block; color: var(--yellow); font-size: 1.7rem; line-height: 1.2; }
.tariff p { margin: 0.5rem 0 0; font-size: 0.95rem; }

/* ---- Buttons ---- */
.actions { display: flex; gap: 10px; margin-top: 2.25rem; }
.button {
  font: inherit; font-weight: 800; cursor: pointer;
  min-height: 52px; padding: 12px 22px;
  border: 2px solid #000; border-radius: 999px;
}
.button.primary { background: #000; color: var(--yellow); flex: 1; }
.button.secondary { background: transparent; color: #000; }
.button:disabled { opacity: 0.55; cursor: default; }
.button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
a.button { display: inline-flex; align-items: center; text-decoration: none; color: #000; }
.link { font: inherit; background: none; border: 0; padding: 8px 0; color: var(--ink); text-decoration: underline; cursor: pointer; }

/* ---- Documents ---- */
.doc { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 16px; margin: 1rem 0; }
.doc.has-error { border-color: var(--red); }
.doc h2 { margin: 0 0 0.25rem; font-size: 1.05rem; }
/* minmax(0, …): without it the column grows to a long file name, and the
   ellipsis below never gets a chance to cut it. */
.files { list-style: none; padding: 0; margin: 0.75rem 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.file { display: flex; align-items: center; gap: 12px; margin: 0; }
.thumb {
  width: 52px; height: 52px; flex: none; border-radius: 8px; object-fit: cover;
  background: var(--bg); display: grid; place-items: center; font-size: 0.75rem; font-weight: 800;
}
.file .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.95rem; }
.add-file {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 10px 14px; margin-top: 0.5rem;
  border: 2px dashed var(--line); border-radius: 10px; font-weight: 700; cursor: pointer;
}
.add-file:has(input:focus-visible) { outline: 3px solid var(--yellow); }
.add-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sending { margin-top: 1rem; font-weight: 700; }
.alert { background: #fde8e6; color: var(--red); border-radius: 10px; padding: 12px 14px; margin: 1rem 0; font-weight: 600; }
.done-mark {
  width: 56px; height: 56px; border-radius: 50%; background: var(--yellow);
  display: grid; place-items: center; font-size: 1.8rem; font-weight: 900; margin-bottom: 1rem;
}

/* ---- Back office ---- */
.admin main { max-width: 1180px; }
.admin .header-inner { max-width: 1180px; }
.toolbar { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.switch {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px;
  background: var(--card); border: 1px solid var(--rule); border-left: 6px solid var(--red);
  border-radius: 12px; padding: 12px 16px; margin: 0 0 1rem;
}
.switch.open { border-left-color: var(--green); }
.switch-state { font-weight: 800; }
.summary { font-weight: 700; color: var(--muted); }
.exports, .dossier-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 1rem; }
.exports .button.small, .dossier-actions .button.small { margin-top: 0; }
.small { font-size: 0.85rem; }
.button.small { min-height: 36px; padding: 4px 14px; font-size: 0.88rem; margin-top: 6px; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; }
table.registrations { border-collapse: collapse; width: 100%; min-width: 860px; font-size: 0.95rem; }
.registrations th, .registrations td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.registrations thead th { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: var(--bg); }
.registrations tbody tr:last-child > * { border-bottom: 0; }
.registrations .name { font-weight: 800; text-align: left; padding: 0; }
.registrations .button.small { display: block; }
.pill { display: inline-block; font-size: 0.82rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: var(--rule); white-space: nowrap; }
.payment-received, .signature-signed { background: #dcefdf; color: var(--green); }
.payment-to_receive, .signature-sent { background: var(--notice); color: #6d5400; }
.payment-not_completed { background: #fde8e6; color: var(--red); }
.installments { list-style: none; padding: 0; margin: 0; font-size: 0.85rem; white-space: nowrap; }
.installments li + li { margin-top: 2px; }
.installment-paid { color: var(--green); }
.installment-refused { color: var(--red); font-weight: 800; }
.installment-upcoming { color: var(--muted); }

.dossier { width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 24px); border: 0; border-radius: 14px; padding: 20px; }
.dossier::backdrop { background: rgb(0 0 0 / 0.55); }
.dossier-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dossier h2 { margin: 0; }
.dossier h3 { font-size: 1rem; margin: 1.5rem 0 0.5rem; border-bottom: 3px solid var(--yellow); display: inline-block; }
.dossier-doc { margin: 0.5rem 0 1rem; }
.doc-label { font-weight: 700; margin: 0 0 0.35rem; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumb-link {
  width: 96px; height: 96px; border-radius: 8px; border: 1px solid var(--rule); background: var(--bg);
  display: grid; place-items: center; overflow: hidden; font-weight: 800; color: var(--ink); text-decoration: none;
}
.thumb-link img { width: 100%; height: 100%; object-fit: cover; }
.answers { display: grid; grid-template-columns: minmax(140px, 38%) 1fr; gap: 6px 16px; margin: 0; font-size: 0.93rem; }
.answers dt { color: var(--muted); }
.answers dd { margin: 0; overflow-wrap: anywhere; }

@media (min-width: 640px) {
  main { padding-top: 36px; }
}
