/* Couleurs du club : rose du logo et noir. Polices système (rien chargé depuis Google, plus simple pour le RGPD). */
:root {
  --bg: #F4EFF2; --surface: #FFFFFF; --surface-2: #FAF6F8; --fg: #1C1A1F; --muted: #6A6070; --line: #E8DEE4;
  --on-brand: #FFFFFF; --brand: #C93D8A; --brand-soft: #FBE4F0; --ink: #1C1A1F; --ink-soft: #E9E6EC;
  --ok: #1E8A55; --ok-soft: #DDF3E7; --no: #C23B3B; --no-soft: #F8E1E1; --wait: #9A6A00; --wait-soft: #FBF0D5;
  --display: "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141115; --surface: #1D191E; --surface-2: #242027; --fg: #F2EEF1; --muted: #A79CA8; --line: #352E37;
    --on-brand: #1C1A1F; --brand: #F27DBB; --brand-soft: #3A1C2E; --ink: #ECEEF7; --ink-soft: #2E2A36;
    --ok: #5BD08F; --ok-soft: #163626; --no: #FF7B7B; --no-soft: #3C1E22; --wait: #E8C062; --wait-soft: #3A3018;
    color-scheme: dark;
  }
}
/* Parkour : le rose devient bleu (licenciés, familles et coachs dont tous les groupes sont du Parkour) */
:root[data-club="parkour"] {
  --bg: #EDF1F7; --surface-2: #F5F8FC; --line: #DCE3EE; --muted: #5E6878;
  --brand: #1F64C8; --brand-soft: #E0EBFB; --ink-soft: #E4E8F0;
}
@media (prefers-color-scheme: dark) {
  :root[data-club="parkour"] {
    --bg: #10141A; --surface: #171C24; --surface-2: #1C222C; --line: #2C3442; --muted: #9AA6B8;
    --brand: #6FA8FF; --brand-soft: #172A47; --ink-soft: #283040;
  }
}
* { box-sizing: border-box }
html, body { height: 100% }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 15px; line-height: 1.45 }
button { font: inherit; color: inherit; cursor: pointer }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px }
[hidden] { display: none !important }

.app { max-width: 560px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; background: var(--surface-2) }
.top { position: sticky; top: 0; z-index: 5; background: var(--brand); color: var(--on-brand); display: flex; align-items: center; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)) }
.top-txt { flex: 1; min-width: 0 }
.insta { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff;
  background: radial-gradient(circle at 30% 107%, #FDF497 0%, #FD5949 45%, #D6249F 60%, #285AEB 90%) }
.insta:active { transform: scale(.94) }
.logo { width: 44px; height: 44px; border-radius: 50%; background: #fff; flex: none }
.logo-link { display: block; flex: none; border-radius: 50% }
.logo-link .logo { display: block }
.top .t { font-family: var(--display); font-size: 1.3rem; font-weight: 700; line-height: 1 }
.top .s { font-size: .8rem; opacity: .85 }
.screen { flex: 1; padding: 16px max(16px, env(safe-area-inset-right, 0px)) 96px max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 14px }
.nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; display: grid; grid-template-columns: repeat(5, 1fr); max-width: 560px; margin: 0 auto;
  background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px) }
.nav button { border: none; background: none; padding: 10px 2px 12px; min-width: 0; display: grid; justify-items: center; gap: 3px; font-size: .74rem; font-weight: 600; color: var(--muted); position: relative }
.nav button[aria-current="page"] { color: var(--brand) }
.nav svg { width: 22px; height: 22px }
.nav .dot { position: absolute; top: 6px; left: calc(50% + 8px); background: var(--brand); color: var(--on-brand); font-size: .62rem; min-width: 15px; height: 15px; border-radius: 8px; display: grid; place-items: center; padding: 0 3px }

h2 { font-family: var(--display); font-size: 1.35rem; margin: 4px 0 0; line-height: 1.1 }
.sub { color: var(--muted); font-size: .85rem; margin: -8px 0 0 }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 8px; min-width: 0 }
.card.pin { border-color: var(--brand) }
.card h3 { margin: 0; font-size: 1rem; line-height: 1.25 }
.card p { margin: 0; white-space: pre-line; overflow-wrap: anywhere }
.meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .78rem; color: var(--muted) }
.chip { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand) }
.chip.ink { background: var(--ink-soft); color: var(--ink) }
.chip.ok { background: var(--ok-soft); color: var(--ok) } .chip.no { background: var(--no-soft); color: var(--no) } .chip.wait { background: var(--wait-soft); color: var(--wait) }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: .88rem }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand) }
.btn.link { border: none; background: none; color: var(--brand); padding: 4px 0 }
.btn.yes[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff }
.btn.nope[aria-pressed="true"] { background: var(--no); border-color: var(--no); color: #fff }
.btn:disabled { opacity: .5; cursor: default }
.month { font-family: var(--display); font-weight: 700; font-size: .95rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px }
.ev { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px }
.ev > div { display: grid; gap: 6px; min-width: 0 }
.date { border-radius: 10px; background: var(--brand-soft); color: var(--brand); text-align: center; padding: 6px 0; font-family: var(--display); line-height: 1; align-self: start }
.date b { display: block; font-size: 1.45rem } .date small { font-size: .72rem; text-transform: uppercase; font-weight: 700 }
.ev.comp .date { background: var(--ink-soft); color: var(--ink) }
.kid-name { font-size: .85rem; font-weight: 600; min-width: 44px }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; font-size: .88rem; margin: 0 }
.kv dt { color: var(--muted) } .kv dd { margin: 0; font-weight: 600 }
.bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; display: flex }
.bar span { display: block; height: 100% }
.counts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; font-variant-numeric: tabular-nums; color: var(--muted) }
.counts b { color: var(--fg) }
.list { display: grid; font-size: .88rem }
.list > div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); padding: 6px 0 }
.list > div:last-child { border-bottom: none }
.list > div.person { display: grid; gap: 6px; padding: 8px 0 }
form { display: grid; gap: 10px }
label { font-size: .82rem; font-weight: 600; color: var(--muted); display: grid; gap: 4px }
input, select, textarea { font: inherit; color: var(--fg); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; width: 100% }
textarea { min-height: 90px; resize: vertical }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--fg) }
.check input { width: auto }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px }
.grid2 > label, .grid2 input, .grid2 select { min-width: 0; max-width: 100% }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 4px 10px; max-height: 220px; overflow-y: auto }
details summary { cursor: pointer; font-weight: 700; list-style: none }
details summary::-webkit-details-marker { display: none }
details > summary::before { content: "+ "; color: var(--brand) }
details[open] > summary::before { content: "– " }
.empty { color: var(--muted); font-size: .9rem; text-align: center; padding: 24px 8px }
.err { color: var(--no); font-size: .88rem; font-weight: 600 }
.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--surface);
  padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: .9rem; max-width: min(92vw, 420px); z-index: 20 }

.login { flex: 1; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)) }
.login .card { width: 100%; max-width: 380px; padding: 24px; gap: 14px }
.login img { width: 120px; height: 120px; margin: 0 auto; display: block }
.login h1 { font-family: var(--display); text-align: center; margin: 0; font-size: 1.6rem }

/* Onglets internes (Calendrier / Convocations), choix d'un gym */
.seg { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px }
.seg button { flex: 1; border: none; background: none; border-radius: 9px; padding: 8px; font-weight: 600; font-size: .88rem; color: var(--muted); position: relative }
.seg button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand) }
.seg .dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 9px; background: var(--ink); color: var(--surface); font-size: .7rem; margin-left: 6px; padding: 0 4px }
.pills { display: flex; flex-wrap: wrap; gap: 6px }
.pills button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: .85rem }
.pills button[aria-pressed="true"] { background: var(--fg); color: var(--surface); border-color: var(--fg) }

/* Suivi */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px }
.tile { background: var(--surface-2); border-radius: 10px; padding: 8px; text-align: center }
.tile small { display: block; font-size: .72rem; color: var(--muted); font-weight: 600 }
.tile b { font-family: var(--display); font-size: 1.25rem; font-variant-numeric: tabular-nums }
.scores { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; font-size: .82rem; text-align: center; font-variant-numeric: tabular-nums }
.scores span { color: var(--muted); font-size: .72rem } .scores b { display: block }
.total { font-family: var(--display); font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1 }
.rank { font-weight: 700; color: var(--brand) }
.chart { width: 100%; height: auto; display: block }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--body) }
.chart .grid { stroke: var(--line); stroke-width: 1 }
.chart .line { stroke: var(--brand); stroke-width: 2.5; fill: none }
.chart .area { fill: var(--brand-soft) }
.chart circle { fill: var(--surface); stroke: var(--brand); stroke-width: 2.5 }
.chart circle.last { fill: var(--brand) }
.note { border-left: 3px solid var(--brand); padding: 2px 0 2px 10px; display: grid; gap: 2px }
.bubble { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-size: .88rem; white-space: pre-line; overflow-wrap: anywhere }
.bubble.coach { background: var(--brand-soft) }
.bubble small { display: block; font-weight: 700; color: var(--muted); font-size: .72rem; margin-bottom: 2px }
.diff { display: flex; gap: 4px; flex-wrap: wrap }
.diff button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 10px; font-size: .8rem; font-weight: 600 }
.diff button[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink) }
.person { display: grid; gap: 6px; border-bottom: 1px solid var(--line); padding: 8px 0 }
.person:last-child { border-bottom: none }
.person-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .9rem }
.gym-list button { display: flex; justify-content: space-between; align-items: center; width: 100%; border: none; border-bottom: 1px solid var(--line); background: none; padding: 10px 0; text-align: left; font-weight: 600 }
.gym-list button:last-child { border-bottom: none }
a { color: var(--brand) }

/* Qui a lu une annonce */
.reads { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 6px }
.reads h4 { margin: 10px 0 4px; font-size: .85rem }
.reads ul { margin: 0; padding-left: 18px; font-size: .88rem }
.reads li { margin: 2px 0 }
.reads small { color: var(--muted) }

/* Bilan des exercices */
.months { display: grid; gap: 4px }
.month { display: grid; grid-template-columns: 3.2em 1fr 3em; align-items: center; gap: 8px; font-size: .8rem }
.month small { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums }
.stats-table { padding: 4px 12px }
.st-row { display: grid; grid-template-columns: minmax(0, 1.6fr) 1.2fr .8fr .9fr .9fr; gap: 6px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .85rem; font-variant-numeric: tabular-nums }
.st-row:last-child { border-bottom: none }
.st-row > span { text-align: center }
.st-row > span .bar { margin-top: 3px; height: 5px }
.st-row .btn.link { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 }
.st-head { font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .02em }
.st-head span:first-child { text-align: left }

/* Blocs repliables */
.fold > summary { display: flex; align-items: baseline; gap: 8px }
.fold-title { font-weight: 700; font-size: 1rem; flex: 1; min-width: 0 }
.fold.plain > summary .fold-title { font-family: var(--display); font-size: 1.35rem }
.fold-hint { flex: none; margin-left: auto; color: var(--muted); font-size: .8rem; font-weight: 500; font-variant-numeric: tabular-nums }
.fold.plain { display: grid; gap: 10px }
.fold.plain > summary { padding: 6px 0 }
.fold-body { display: grid; gap: 10px; margin-top: 8px }
.fold.plain > .fold-body { margin-top: 0 }
.fold-more > summary { color: var(--brand); padding: 4px 0 }
.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden }

/* Annonce déjà lue : seulement le titre */
.post-read > summary { display: flex; align-items: center; gap: 8px }
.post-read-title { flex: 1; min-width: 0; font-weight: 700 }
.post-read:not([open]) { padding-top: 10px; padding-bottom: 10px }

/* Comptes coachs et bureau */
.staff-list > .staff { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--line) }
.staff-list > .staff:last-child { border-bottom: none }
.staff-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px }
.staff.off { opacity: .65 }
.staff-edit { display: grid; gap: 10px; background: var(--surface-2); border-radius: 10px; padding: 10px; margin-top: 4px }
.btn.no { color: var(--no); border-color: var(--no) }

/* Bouton Waze et lien d'un événement */
a.btn { text-decoration: none; display: inline-flex; align-items: center; gap: 6px }
.btn.waze { background: #33CCFF; border-color: #33CCFF; color: #0B2A3A; font-weight: 700 }

/* Pièce jointe d'une annonce */
.post-img { border: none; padding: 0; background: var(--surface-2); border-radius: 10px; overflow: hidden; display: block; width: 100%; cursor: zoom-in }
.post-img img { display: block; width: 100%; max-height: min(70vh, 640px); object-fit: contain; min-height: 120px }
.doc { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 8px 10px }
.doc-ext { flex: none; width: 42px; height: 42px; border-radius: 8px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-size: .72rem; font-weight: 800 }
.doc-name { min-width: 0; overflow-wrap: anywhere; font-weight: 600; font-size: .9rem }
.doc-name small { display: block; color: var(--muted); font-weight: 500 }
.h2row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap }
.h2row h2 { margin: 0 }
.btn.small { padding: 6px 10px; font-size: .82rem }
fieldset.people { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0; display: grid; gap: 8px; min-width: 0 }
fieldset.people legend { font-weight: 700; font-size: .9rem; padding: 0 4px }
.people-list { max-height: 260px; overflow-y: auto; padding-right: 4px }
.chips { display: flex; flex-wrap: wrap; gap: 6px }
.chip.pick { border: 0; cursor: pointer; font: inherit; font-size: .78rem; font-weight: 700 }
fieldset.people .picks { grid-template-columns: minmax(0, 1fr) }

/* ===== Style « Sport, très adouci » (choisi par Mat le 2026-11-29) =====
   Bandeau en dégradé noir vers rose, titres condensés en italique, cartes arrondies sans bordure.
   Police des titres hébergée avec l'appli (fonts/), rien n'est chargé ailleurs. */
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(fonts/BarlowCondensed-700.woff2) format("woff2") }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: swap; src: url(fonts/BarlowCondensed-800.woff2) format("woff2") }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-style: italic; font-display: swap; src: url(fonts/BarlowCondensed-800i.woff2) format("woff2") }
:root {
  --bg: #F4F1F3; --surface-2: #F7F4F6; --line: #ECE6EA; --brand: #D9438E; --brand-soft: #FCE8F2; --ink: #1E1A20; --ink-soft: #EEEAF0;
  --display: "Barlow Condensed", "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --hero: linear-gradient(120deg, #2A1F28 0%, #5A2346 55%, #A3306F 100%); --hero-sub: #F3B0D1;
  --solid: #1E1A20; --on-solid: #FFFFFF; --shadow: 0 1px 2px rgba(30,20,30,.04), 0 6px 18px rgba(30,20,30,.06);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #141115; --surface-2: #231E25; --line: #332C35; --brand: #F07AB8; --brand-soft: #3A1C2E; --ink: #ECEEF7; --ink-soft: #2E2A36;
    --hero: linear-gradient(120deg, #1A1419 0%, #42193A 55%, #82285A 100%); --solid: #F2EEF1; --on-solid: #1C1A1F; --shadow: 0 1px 0 rgba(255,255,255,.03) }
}
:root[data-club="parkour"] { --bg: #EEF2F7; --surface-2: #F4F7FB; --line: #DFE6EF; --brand: #1F64C8; --brand-soft: #E2ECFB;
  --hero: linear-gradient(120deg, #161C26 0%, #1C3560 55%, #1F64C8 100%); --hero-sub: #A9C9FF }
@media (prefers-color-scheme: dark) {
  :root[data-club="parkour"] { --bg: #10141A; --surface-2: #1C222C; --line: #2C3442; --brand: #6FA8FF; --brand-soft: #172A47; --ink: #ECEEF7; --ink-soft: #283040;
    --hero: linear-gradient(120deg, #0E1218 0%, #172B4D 55%, #1F55A8 100%) }
}
.app { background: var(--bg) }
.top { background: var(--hero); color: #fff; border-radius: 0 0 20px 20px; padding-top: calc(18px + env(safe-area-inset-top, 0px)); padding-bottom: 18px }
.top .t { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.7rem; letter-spacing: .01em }
.top .s { color: var(--hero-sub); font-weight: 500; font-size: .82rem; opacity: 1 }
h2, .fold.plain > summary .fold-title { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.85rem; letter-spacing: .005em }
h2::after { content: ""; display: block; width: 28px; height: 3px; border-radius: 2px; background: var(--brand); margin-top: 4px }
.h2row h2::after, .login h2::after { display: none }
.login h1 { font-style: italic; font-weight: 800; font-size: 2rem }
.card { border: none; border-radius: 16px; box-shadow: var(--shadow); position: relative }
.card.pin { border: none }
.card.pin::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand) }
.card h3 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1.1 }
.chip { font-weight: 600 }
.btn { border-radius: 12px }
.seg { border: none; border-radius: 14px; box-shadow: var(--shadow) }
.seg button { font-family: var(--display); font-weight: 700; font-size: 1.1rem; border-radius: 10px }
.pills button[aria-pressed="true"] { background: var(--solid); border-color: var(--solid); color: var(--on-solid) }
.date { border-radius: 12px; padding: 6px 0 8px }
.date b { font-size: 1.8rem; font-style: italic; font-weight: 800 }
.ev.comp .date { background: var(--solid); color: var(--on-solid) }
.screen > .month { display: block; font-size: 1rem }
.nav button[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 32%; right: 32%; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand) }
.tile { border-radius: 12px }
.tile b { font-size: 1.55rem; font-style: italic; font-weight: 800 }
.total { font-style: italic; font-size: 2.1rem }
input, select, textarea { border-radius: 12px }
.bubble { border-radius: 12px }
