/* SOLID COACHING */
:root {
  --bg: #f3f2ee; --card: #ffffff; --ink: #1b1d20; --muted: #6b6f76; --line: #e3e1db;
  --head: #16181b; --head-ink: #f4f3ef; --accent: #2563eb; --accent-ink: #ffffff; --accent-soft: #eaf1fe; --brand: #5b9bff;
  --good: #1f8a4c; --bad: #c8372d; --warn: #b86e00; --warn-soft: #fff6e0;
  --z1: #9aa7b4; --z2: #3d8fd6; --z3: #2fa36b; --z4: #e9b200; --z5: #ef7d22; --z6: #d63b30;
  --radius: 12px; --shadow: 0 1px 2px rgba(20,20,20,.05), 0 4px 18px rgba(20,20,20,.04);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111214; --card: #1b1d21; --ink: #ecebe7; --muted: #9a9ea6; --line: #2c2f35;
    --head: #0b0c0d; --accent: #4d8bff; --accent-soft: #15233d; --warn-soft: #2d2410; --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.65rem; margin: .2rem 0 1rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 0 0 .8rem; }
h3 { font-size: 1rem; margin: 0 0 .6rem; }
h2.section { margin: 1.8rem 0 .8rem; }
code { background: var(--accent-soft); padding: 2px 6px; border-radius: 6px; font-size: .9em; word-break: break-all; }
.muted { color: var(--muted); font-weight: normal; }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.good { color: var(--good); font-weight: 600; }
.bad { color: var(--bad); font-weight: 600; }
.warn { color: var(--warn); font-weight: 600; }

/* ---------- En-tête ---------- */
.topbar { background: var(--head); color: var(--head-ink); display: flex; align-items: center; gap: 1rem; padding: 0 20px; height: 60px; position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: baseline; gap: .45rem; color: var(--head-ink); text-decoration: none !important; }
.brand-mark { font-weight: 900; letter-spacing: .16em; font-size: 1.25rem; }
.brand-mark.big { font-size: 3.4rem; color: var(--accent); }
.brand-sub { color: var(--brand); font-weight: 600; font-size: .95rem; }
.nav { display: flex; gap: .2rem; margin-left: auto; align-items: center; }
.nav a { color: #c9c8c3; padding: .45rem .75rem; border-radius: 8px; font-weight: 500; text-decoration: none; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav a.on { color: #fff; background: rgba(77,139,255,.22); box-shadow: inset 0 -2px 0 var(--accent); }
.nav .nav-user { margin-left: .8rem; color: #fff; }
.nav .nav-out { color: #8d8c88; font-size: .85rem; }
.burger { display: none; margin-left: auto; background: none; border: 0; color: #fff; font-size: 1.5rem; cursor: pointer; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 24px 20px 60px; }
.wrap.narrow { max-width: 720px; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 0 0 30px; }

/* ---------- Blocs ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card .pad { padding: 16px 20px 0; }
.card.alert { border-color: var(--accent); background: var(--accent-soft); }
.card.link { display: block; color: inherit; text-decoration: none; transition: transform .12s, border-color .12s; }
.card.link:hover { border-color: var(--accent); transform: translateY(-1px); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.cards .card { margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid2.top { align-items: start; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid3 .card { margin: 0; }
.grid-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-charts .card { margin: 0; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.head h1, .head h2, .head h3 { margin-bottom: .2rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.actions form, form.inline { display: inline; margin: 0; }
.crumb { margin: 0 0 .3rem; font-size: .9rem; }
.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; font-weight: 500; }
.flash-ok { background: #e5f5ea; color: #155f34; }
.flash-err { background: #fde8e6; color: #962a22; }
.flash-warn { background: var(--warn-soft); color: var(--warn); }
@media (prefers-color-scheme: dark) { .flash-ok { background: #13301f; color: #8fe0ae; } .flash-err { background: #3a1714; color: #f3a69f; } }

/* ---------- Boutons, formulaires ---------- */
.btn { display: inline-flex; align-items: center; gap: .3rem; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); padding: .58rem 1rem; border-radius: 9px; font: 600 .92rem var(--font); cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.sm { padding: .32rem .62rem; font-size: .84rem; }
.btn.big { padding: .8rem 1.6rem; font-size: 1rem; }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
.form label { display: block; margin-bottom: .85rem; font-weight: 600; font-size: .88rem; }
.form label.check { font-weight: 500; display: flex; gap: .5rem; align-items: center; }
input, select, textarea { width: 100%; margin-top: .3rem; padding: .58rem .7rem; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--ink); font: 400 .95rem var(--font); }
input[type=checkbox], input[type=radio] { width: auto; margin: 0; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.inline-form { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; }
.inline-form label { margin: 0; }
.inline-form input, .inline-form select { width: auto; }
.inline-actions { margin-top: 1rem; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filters input, .filters select { width: auto; flex: 1 1 180px; margin: 0; }
.filters input[name=q] { flex: 3 1 260px; }
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center; cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop input { margin-top: 0; border: 0; padding: 0; }
.drop span { display: block; color: var(--muted); font-weight: 500; margin-top: .4rem; }
.danger-zone { margin-top: 1.5rem; text-align: right; }
.steps li { margin-bottom: 1rem; }

/* RPE */
.rpe { display: flex; gap: 4px; margin-top: .4rem; flex-wrap: wrap; }
.rpe-b input { position: absolute; opacity: 0; }
.rpe-b span { display: inline-block; width: 38px; height: 38px; line-height: 36px; text-align: center; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-weight: 700; }
.rpe-b input:checked + span { background: var(--accent); color: #fff; border-color: var(--accent); }
.rpe-b input:focus-visible + span { outline: 2px solid var(--accent); }

/* ---------- Badges ---------- */
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .75rem; font-weight: 700; background: var(--line); color: var(--ink); text-transform: uppercase; letter-spacing: .03em; }
.pill[style*="--pc"] { color: var(--pc); background: color-mix(in srgb, var(--pc) 14%, transparent); }
@media (prefers-color-scheme: dark) { .pill[style*="--pc"] { color: color-mix(in srgb, var(--pc) 45%, white); background: color-mix(in srgb, var(--pc) 30%, transparent); } }
.p-rameur { background: #dcebfa; color: #1c5a96; } .p-velo { background: #d9f3ee; color: #0f6b5c; } .p-force { background: #e6e1f7; color: #4b3a96; }
@media (prefers-color-scheme: dark) { .p-rameur { background: #16304a; color: #9cc8f2; } .p-velo { background: #12332d; color: #7fdcc8; } .p-force { background: #282145; color: #c2b6f5; } }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .78rem; font-weight: 600; background: var(--line); }
.b-brouillon { background: var(--warn-soft); color: var(--warn); } .b-envoye, .b-valide { background: #e5f5ea; color: #155f34; }
.src { font-size: .68rem; color: var(--muted); border: 1px solid var(--line); padding: 0 5px; border-radius: 5px; vertical-align: middle; }
.countdown { color: var(--accent); font-weight: 800; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 1rem; }
.chip { padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink); font-size: .85rem; font-weight: 600; }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Tableau de bord ---------- */
.ath h3 { font-size: 1.15rem; margin: .4rem 0 .1rem; }
.ath-top { display: flex; gap: .6rem; align-items: center; }
.ath-top .countdown { margin-left: auto; }
.ath-bot { display: flex; gap: .8rem; font-size: .85rem; font-weight: 600; flex-wrap: wrap; }
.progress { height: 6px; background: var(--line); border-radius: 9px; overflow: hidden; margin: .6rem 0 .5rem; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 9px; }

/* ---------- Tableaux ---------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 600; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl.compact td, .tbl.compact th { padding: 6px 10px; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--accent-soft); }
.tbl tr.off td { opacity: .5; }
.scroll { overflow-x: auto; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 3px 0; }

/* ---------- Onglets, semaine ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: .4rem 0 1.2rem; overflow-x: auto; }
.tabs a { padding: .6rem 1rem; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; text-decoration: none; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-color: var(--accent); }
.weeknav { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.kpi-lib { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.kpi-val { font-size: 1.45rem; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: .8rem; color: var(--muted); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.day { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; min-height: 120px; }
.day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.day.empty { opacity: .6; }
.day-h { font-size: .78rem; font-weight: 700; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; }
.plan-item { border-left: 3px solid var(--line); padding: 4px 0 4px 8px; margin-bottom: 8px; font-size: .88rem; }
.plan-item summary { cursor: pointer; font-weight: 600; list-style: none; }
.plan-item summary::-webkit-details-marker { display: none; }
.plan-item.done { border-color: var(--good); }
.plan-item.missed { border-color: var(--bad); }
.plan-item .chk { display: inline-block; width: 1.1em; }
.plan-item.done .chk { color: var(--good); } .plan-item.missed .chk { color: var(--bad); }
.cible { display: block; font-size: .78rem; color: var(--accent); font-weight: 600; }
.plan-det { font-size: .85rem; margin-top: .4rem; color: var(--ink); white-space: normal; }
.act { display: block; background: var(--accent-soft); border-radius: 8px; padding: 6px 8px; margin-bottom: 6px; color: var(--ink); text-decoration: none !important; font-size: .82rem; }
.act:hover { outline: 1px solid var(--accent); }
.act-t { display: block; font-weight: 700; }
.act-r { display: block; color: var(--muted); }
.plan-card.done { border-left: 4px solid var(--good); }
.plan-rappel summary { cursor: pointer; font-weight: 600; }
.coach-note { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 8px; margin-bottom: 1rem; }
.mailbox { font-size: .92rem; }
.mailbox ul { padding-left: 1.2rem; }

/* Zones */
.zone { display: grid; grid-template-columns: 80px 1fr 56px; gap: 8px; align-items: center; font-size: .82rem; margin-bottom: 5px; }
.zb { background: var(--line); height: 10px; border-radius: 6px; overflow: hidden; }
.zb span { display: block; height: 100%; }
.zv { text-align: right; font-variant-numeric: tabular-nums; }
.z1 { background: var(--z1); } .z2 { background: var(--z2); } .z3 { background: var(--z3); } .z4 { background: var(--z4); } .z5 { background: var(--z5); } .z6 { background: var(--z6); }

/* WODs */
.wods { columns: 2 340px; column-gap: 16px; }
.wod { break-inside: avoid; }
.wod-h { display: flex; gap: .6rem; align-items: center; margin-bottom: .4rem; }
.wod-h a { margin-left: auto; }
.wod h3 { font-size: 1.15rem; margin-bottom: .1rem; }
.wod-meta { color: var(--accent); font-weight: 600; font-size: .88rem; margin: 0 0 .6rem; }
.pre { font-size: .9rem; }
.wod details { margin-bottom: .5rem; font-size: .88rem; color: var(--muted); }

/* Connexion */
.login { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; min-height: 70vh; }
.login-hero p { font-size: 1.25rem; color: var(--muted); max-width: 26ch; }
.login-card { max-width: 420px; width: 100%; justify-self: end; }

/* ---------- Mobile ---------- */
@media (max-width: 980px) {
  .week { grid-template-columns: 1fr; }
  .day { min-height: 0; }
  .day.empty { display: none; }
  .grid3, .grid-charts { grid-template-columns: 1fr; }
}
@media (max-width: 1060px) {
  .burger { display: block; }
  .nav { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--head); flex-direction: column; align-items: stretch; padding: 8px 16px 14px; }
  .nav-open .nav { display: flex; }
  .nav .nav-user { margin-left: 0; }
}
@media (max-width: 760px) {
  .wrap { padding: 16px 16px 50px; }
  .grid2, .grid2.top { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .login { grid-template-columns: 1fr; gap: 10px; min-height: 0; }
  .login-card { justify-self: stretch; }
  .brand-mark.big { font-size: 2.4rem; }
  h1 { font-size: 1.35rem; }
  .tbl td, .tbl th { padding: 9px 10px; }
}

/* ---------- Fiches (salles, coachs, athlètes) ---------- */
.av { display: inline-block; flex: none; border-radius: 50%; object-fit: cover; background: var(--line); vertical-align: middle; }
.av-sq { border-radius: 22%; }
.av-ini { display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; letter-spacing: .02em; }
.av-xs { width: 24px; height: 24px; font-size: .62rem; }
.av-sm { width: 40px; height: 40px; font-size: .85rem; }
.av-md { width: 52px; height: 52px; font-size: 1rem; }
.av-lg { width: 64px; height: 64px; font-size: 1.2rem; }
.av-xl { width: 104px; height: 104px; font-size: 2rem; }
.person { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none !important; }
a.person { padding: 8px; margin: 0 -8px; border-radius: 10px; }
a.person:hover { background: var(--accent-soft); }
.card .person + .person { margin-top: 2px; }
.big-name { font-size: 1.1rem; font-weight: 700; }
.profil-head { display: flex; align-items: center; gap: 20px; margin-bottom: 1.2rem; flex-wrap: wrap; }
.profil-head h1 { margin: 0 0 .2rem; }
.profil-head > .btn { margin-left: auto; }
.photo-edit { display: flex; gap: 16px; align-items: center; margin-bottom: 1rem; }
.photo-edit > div { flex: 1; }
.photo-edit input[type=file] { padding: .4rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: .2rem 0 .4rem; }
.tag { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 3px 9px; font-size: .84rem; font-weight: 500; }
.tag.more { color: var(--muted); }
dl.infos { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 .6rem; }
dl.infos dt { color: var(--muted); font-size: .85rem; font-weight: 600; }
dl.infos dd { margin: 0; }
ul.diplomes, ul.objectifs { padding: 0; margin: 0; list-style: none; }
ul.diplomes li, ul.objectifs li { padding: 7px 0 7px 28px; border-bottom: 1px solid var(--line); position: relative; }
ul.diplomes li:last-child, ul.objectifs li:last-child { border: 0; }
ul.diplomes li::before { content: "🎓"; position: absolute; left: 0; }
ul.objectifs li::before { content: "◎"; position: absolute; left: 4px; color: var(--accent); font-weight: 800; }
.coach-row, .abo-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.coach-row:last-child, .abo-row:last-child { border: 0; }
.coach-row label.check, .abo-row label.check { margin-bottom: .3rem; }
.coach-row input:not([type=checkbox]), .abo-row input:not([type=checkbox]) { margin-top: 0; font-size: .88rem; padding: .45rem .6rem; }
.abo { padding: 4px 0 8px; border-bottom: 1px solid var(--line); }
.abo:last-child { border: 0; }
.abo details { margin: 4px 0 0 52px; }
.abo summary { cursor: pointer; color: var(--muted); }
.card h3 { margin-top: .4rem; }
@media (max-width: 760px) { .av-xl { width: 76px; height: 76px; font-size: 1.5rem; } .abo details { margin-left: 0; } }

/* ---------- Rôles, matériel ---------- */
.b-role { text-transform: none; }
.b-admin { background: #1b1d20; color: #fff; } .b-head { background: var(--accent); color: #fff; } .b-coach { background: var(--accent-soft); color: var(--accent); } .b-athlete { background: #d9f3ee; color: #0f6b5c; }
@media (prefers-color-scheme: dark) { .b-admin { background: #ecebe7; color: #111; } .b-athlete { background: #12332d; color: #7fdcc8; } }
.kpis.compact { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.kpis.compact .kpi { padding: 8px 10px; } .kpis.compact .kpi-val { font-size: 1.15rem; }
.narrow-card { max-width: 560px; }
.wrap-narrow { max-width: 760px; }
.eq-num { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.eq-num.big { font-size: 1.05rem; color: var(--accent); font-weight: 800; margin: 0; }
.eq-service { background: #e5f5ea; color: #155f34; } .eq-surveiller { background: var(--warn-soft); color: var(--warn); }
.eq-panne { background: #fde8e6; color: #962a22; } .eq-hors { background: #3a1714; color: #f3a69f; } .eq-reforme { background: var(--line); color: var(--muted); }
@media (prefers-color-scheme: dark) { .eq-service { background: #13301f; color: #8fe0ae; } .eq-panne { background: #3a1714; color: #f3a69f; } }
ul.journal { list-style: none; padding: 0; margin: 0; }
ul.journal li { border-left: 3px solid var(--line); padding: 6px 0 8px 12px; margin-bottom: 8px; }
ul.journal li.j-reparation, ul.journal li.j-piece { border-color: var(--accent); }
ul.journal li.j-signalement { border-color: var(--bad); }
ul.journal li.j-controle, ul.journal li.j-entretien, ul.journal li.j-nettoyage { border-color: var(--good); }
.j-h { display: flex; gap: .4rem; align-items: baseline; flex-wrap: wrap; }
.j-del { margin-left: auto; }
.etiquette { display: flex; gap: 16px; align-items: center; }
.etiquette .qr { width: 112px; height: 112px; flex: none; background: #fff; padding: 4px; border-radius: 6px; }
@media print {
  body:not(.fiche-print) * { visibility: hidden; }
  body:not(.fiche-print) #etiquette, body:not(.fiche-print) #etiquette * { visibility: visible; }
  #etiquette { position: absolute; left: 0; top: 0; border: 1px solid #000; box-shadow: none; width: 9cm; color: #000; background: #fff; }
}
.demande { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.demande:last-child { border: 0; }
.demande select { width: auto; margin: 0 0 0 .3rem; }

/* ---------- Maintenance (v1.3) ---------- */
.b-maint { background: #fdecd6; color: #8a4b00; }
.ct-propose { background: var(--warn-soft); color: var(--warn); }
.ct-actif { background: #e5f5ea; color: #155f34; }
.ct-suspendu, .ct-termine, .ct-refuse { background: var(--line); color: var(--muted); }
tr.row-warn td { background: var(--warn-soft); }
tr.grp td { background: var(--accent-soft); font-size: .85rem; padding-top: .45rem; padding-bottom: .45rem; }
.journal li.j-planifie { border-left-style: dashed; opacity: .9; }
.pieces-lignes { border: 1px dashed var(--line); border-radius: 10px; padding: .6rem .8rem .2rem; margin: 0 0 .8rem; }
.pieces-lignes legend { font-size: .85rem; font-weight: 600; padding: 0 .3rem; }
.pieces-lignes .grid2 { grid-template-columns: 1fr 90px; margin-bottom: .4rem; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset[disabled] input, fieldset[disabled] select, fieldset[disabled] textarea { opacity: .75; }
.maint-card { border-top: 3px solid #e08a1e; }
details.card > summary { cursor: pointer; font-weight: 600; }
details > summary.btn { list-style: none; display: inline-block; }
details > summary.btn::-webkit-details-marker { display: none; }
@media (prefers-color-scheme: dark) { .b-maint { background: #3a2a12; color: #f5c27d; } .ct-actif { background: #13301f; color: #8fe0ae; } }

/* Réglages */
.disc-tbl input[type=color] { width: 44px; height: 34px; padding: 2px; border-radius: 8px; }
.disc-tbl .w-xs { width: 64px; }
.disc-tbl input[name="nom[]"] { min-width: 200px; }
.disc-tbl select { min-width: 210px; }
.form input[type=color] { display: block; margin-top: 6px; width: 64px; height: 40px; padding: 3px; }
.disc-tbl td { vertical-align: middle; }

/* Gammes de maintenance (v1.5) */
.gamme-card h3 { margin: .9rem 0 .4rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.gamme-list { list-style: none; padding: 0; margin: 0; }
.gamme-list li { padding: .45rem 0 .45rem .7rem; border-left: 3px solid var(--line); margin-bottom: .3rem; }
.gamme-list li.retard { border-left-color: var(--bad); background: color-mix(in srgb, var(--bad) 6%, transparent); }
.gamme-freq { margin: .5rem 0 .2rem; font-weight: 600; }
.chips-check { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: .8rem; }
.gamme-edit select { min-width: 220px; } .gamme-edit input { min-width: 220px; } .gamme-edit textarea { min-width: 320px; }
/* Fiche d'entretien imprimable */
body.fiche-print { background: #fff; color: #111; }
.fp-actions { max-width: 1000px; margin: 16px auto 0; padding: 0 16px; display: flex; gap: 8px; }
.fp { max-width: 1000px; margin: 0 auto; padding: 16px; }
.fp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; border-bottom: 3px solid #111; padding-bottom: 10px; margin-bottom: 12px; }
.fp-brand { font-weight: 800; letter-spacing: .18em; font-size: .9rem; } .fp-brand span { color: #2563eb; letter-spacing: 0; font-weight: 600; }
.fp h1 { margin: 4px 0 0; font-size: 1.6rem; } .fp-sub { margin: 2px 0 0; font-weight: 600; }
.fp-eq { text-align: right; } .fp-eq .eq-num { font-size: 1.4rem; }
.fp-note { border: 1px solid #c8372d; color: #8a1f17; padding: 6px 10px; border-radius: 6px; font-size: .85rem; }
.fp h2 { font-size: 1rem; margin: 16px 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.fp-tbl { width: 100%; border-collapse: collapse; font-size: .85rem; }
.fp-tbl th, .fp-tbl td { border: 1px solid #999; padding: 5px 6px; vertical-align: top; text-align: left; }
.fp-tbl th { background: #f0f0f0; font-size: .72rem; }
.fp-case { width: 72px; } .fp-der { width: 82px; font-size: .78rem; }
.fp-det { color: #444; font-size: .78rem; }
.fp-foot { margin-top: 16px; font-size: .75rem; color: #555; border-top: 1px solid #ccc; padding-top: 6px; }
@media print { .fp-actions { display: none; } .fp { padding: 0; max-width: none; } @page { size: A4 landscape; margin: 10mm; } .fp-tbl tr { break-inside: avoid; } }
@media (max-width: 700px) { .fp-head { flex-direction: column; } .fp-eq { text-align: left; } .fp-tbl { font-size: .75rem; } .fp-case { width: 44px; } }
.fp-jours .fp-case { width: 46px; text-align: center; } .fp-semaine { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: .85rem; }

/* Compteur d'utilisation */
.releve-rapide { margin-top: 4px; } .releve-rapide summary { cursor: pointer; color: var(--accent); }
.releve-rapide form { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.w-sm { width: 90px; } .w-md { width: 140px; }

/* Réglages : textes, Claude */
.chips-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.texte-item { border-bottom: 1px solid var(--line); padding: 10px 0; } .texte-item:last-of-type { border: 0; }
.texte-item.modifie { border-left: 3px solid var(--accent); padding-left: 10px; }
.texte-item textarea { font-family: inherit; }
.inline-check { display: inline-flex !important; margin: 0 !important; }
.ia-card { border-top: 3px solid #8b5cf6; }
.ia-card ul { margin: .3rem 0 .8rem 1.1rem; padding: 0; } .ia-card li { margin-bottom: .25rem; }
.ia-note { color: #6d4bd8; }

/* Programme proposé par Claude */
.progress { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 8px 0; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #8b5cf6, var(--accent)); transition: width .4s; }
.brouillon-seance { border-top: 1px solid var(--line); padding: 10px 0; }
.grid-bs { display: grid; grid-template-columns: auto 150px 1fr 1fr; gap: 8px; align-items: center; margin-bottom: 6px; }
.brouillon-seance textarea { width: 100%; font-size: .88rem; }
.barre-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); z-index: 5; }
@media (max-width: 700px) { .grid-bs { grid-template-columns: 1fr 1fr; } }

/* Fichiers .fit */
.fit-bloc { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 8px; }
.fit-etapes { margin: 6px 0 8px 1.2rem; padding: 0; } .fit-etapes ol { margin: 2px 0 4px 1rem; }
textarea.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8rem; }

/* ---------- v11 : offres, ventes, factures, pages légales ---------- */
.foot-legal { display: inline-block; margin-top: 6px; line-height: 1.8; }
.foot-legal a { color: var(--muted); }
.nav-public { display: flex; gap: 4px; margin-left: auto; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.offres-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 6px; }
.offre-carte { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); }
a.offre-carte:hover { border-color: var(--accent); transform: translateY(-1px); }
.offre-carte .btn { align-self: flex-start; margin-top: 4px; }
.offre-nom { font-weight: 700; font-size: 1.02rem; }
.offre-prix { font-weight: 700; color: var(--accent); font-size: 1.15rem; }
.offre-prix.big { font-size: 1.6rem; margin: .2rem 0 .8rem; }
.vendeur-bloc h2 .badge { vertical-align: middle; }
details.retract { display: inline-block; margin-left: 6px; }
details.retract[open] { display: block; margin-top: 8px; }
details.retract .form { margin-top: 6px; }
.badge.b-paye, .badge.b-active { background: #e3f6e8; color: #17672e; }
.badge.b-rembourse, .badge.b-partiel, .badge.b-annulee { background: #eee; color: #555; }
.badge.b-echec, .badge.b-litige, .badge.b-impayee { background: #fde8e8; color: #9b1c1c; }
.badge.b-resiliation, .badge.b-attente { background: #fff4d6; color: #7a5700; }
.tabs-wrap { flex-wrap: wrap; }
.legal { max-width: 860px; margin: 0 auto; }
.legal-texte h1 { margin-top: 0; }
.legal-texte h2 { font-size: 1.12rem; margin: 1.4em 0 .4em; }
.legal-texte h3 { font-size: 1rem; margin: 1.1em 0 .3em; }
.legal-texte p, .legal-texte li { line-height: 1.6; }
/* facture imprimable */
.facture-page { background: #fff; color: #111; }
.facture { max-width: 800px; margin: 24px auto; padding: 0 20px; font-size: .92rem; }
.fa-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; border-bottom: 2px solid #111; padding-bottom: 14px; }
.fa-titre { text-align: right; }
.fa-titre h1 { margin: 0 0 6px; letter-spacing: .06em; }
.fa-client { margin: 18px 0 18px auto; width: 50%; padding: 10px 14px; border: 1px solid #ccc; border-radius: 6px; }
.fa-tbl, .fa-tot { width: 100%; border-collapse: collapse; }
.fa-tbl th, .fa-tbl td { border-bottom: 1px solid #ddd; padding: 8px 6px; text-align: left; }
.fa-tbl td:nth-child(n+2), .fa-tbl th:nth-child(n+2) { text-align: right; white-space: nowrap; }
.fa-tot { width: 45%; margin: 12px 0 0 auto; }
.fa-tot th, .fa-tot td { padding: 5px 6px; text-align: right; }
.fa-ttc th, .fa-ttc td { border-top: 2px solid #111; font-weight: 700; font-size: 1.05rem; }
.fa-mentions { margin-top: 26px; color: #444; border-top: 1px solid #ccc; padding-top: 10px; }
@media print { .no-print { display: none; } .facture { margin: 0; } }
@media (max-width: 640px) { .fa-head { flex-direction: column; } .fa-titre { text-align: left; } .fa-client, .fa-tot { width: 100%; } }
.td-act { white-space: nowrap; text-align: right; }
.td-act .inline-form { display: inline-flex; }
.td-act details.retract[open] { white-space: normal; text-align: left; min-width: 220px; }
.nav .nav-user { white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 1061px) and (max-width: 1420px) {
  .nav { gap: 0; }
  .nav a { padding: .4rem .5rem; font-size: .9rem; }
  .nav .nav-user { margin-left: .3rem; }
}
@media (max-width: 1060px) {
  .nav.nav-public { display: flex; position: static; flex-direction: row; background: none; padding: 0; }
}

/* ---------- v16 : planning athlète, séance en tableau, exercices ---------- */
.planning { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: 12px 0 6px; }
.pj { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 8px; min-height: 150px; display: flex; flex-direction: column; gap: 6px; transition: box-shadow .15s, border-color .15s; }
.pj.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.pj.passe { background: color-mix(in srgb, var(--card) 85%, var(--bg)); }
.pj.cible-drop { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pj-h { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); display: flex; align-items: baseline; gap: 4px; }
.pj-h b { font-size: 1.15rem; color: var(--ink); letter-spacing: 0; }
.pj-h em { font-style: normal; color: var(--accent); font-weight: 700; margin-left: auto; text-transform: none; }
.pc { border-radius: 10px; border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--card); font-size: .86rem; }
.pc[draggable] { cursor: grab; }
.pc.drag { opacity: .45; }
.pc-fait { display: block; color: var(--good); font-weight: 600; font-size: .78rem; }
.pc.pc-ok { border-left-color: var(--good); }
.pc.pc-manque { border-left-color: var(--bad); }
.pc-lien { display: block; padding: 8px 8px 6px; color: var(--ink); text-decoration: none !important; }
.pc-lien:hover .pc-t { color: var(--accent); }
.pc-etat { float: right; font-weight: 800; color: var(--muted); }
.pc.pc-ok .pc-etat { color: var(--good); }
.pc.pc-manque .pc-etat { color: var(--bad); }
.pc-t { display: block; font-weight: 700; line-height: 1.25; padding-right: 14px; }
.pc .cible { margin-top: 3px; }
.pc-dep { display: block; font-size: .74rem; color: var(--warn, #9a6700); margin-top: 3px; }
.pc-dec { padding: 0 6px 6px; }
.pc-dec select { margin: 0; padding: .25rem .4rem; font-size: .76rem; border-radius: 7px; color: var(--muted); }
.pa { display: block; border-radius: 9px; padding: 6px 8px; background: var(--accent-soft); color: var(--ink); text-decoration: none !important; font-size: .8rem; }
.pa-hp { background: color-mix(in srgb, var(--muted) 12%, transparent); border: 1px dashed var(--line); }
.pa-t { display: block; font-weight: 600; }
.pa-r { display: block; color: var(--muted); }
.pj-plus { margin-top: auto; background: none; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font: 500 .76rem var(--font); padding: 5px; cursor: pointer; }
.pj-plus:hover { border-color: var(--accent); color: var(--accent); }
.prochaine { display: flex; flex-direction: column; gap: 4px; border-left: 5px solid var(--accent); color: var(--ink); text-decoration: none !important; }
.prochaine:hover { border-color: var(--accent); }
.prochaine-k { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); font-weight: 700; }
.prochaine-t { font-size: 1.25rem; font-weight: 800; }
.choix-ligne { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; font-weight: 400; }
@media (max-width: 980px) {
  .planning { grid-template-columns: 1fr; }
  .pj { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .pj-h { flex: 0 0 64px; flex-direction: column; gap: 0; }
  .pj-h em { margin-left: 0; font-size: .7rem; }
  .pj > .pc, .pj > .pa { flex: 1 1 calc(100% - 76px); }
  .pj > .pc + .pc, .pj > .pa + .pa, .pj > .pc + .pa { margin-left: 76px; }
  .pj.vide { opacity: .75; }
  .pj-plus { flex: 1 1 100%; margin-left: 76px; }
}
/* séance prévue */
.prevue-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 12px; }
.prevue-head h1 { margin: .2rem 0 .4rem; }
.prevue-date { margin: 0; color: var(--muted); font-weight: 600; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cibles-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cible-chip { background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .85rem; padding: 4px 10px; border-radius: 999px; }
.seance-contenu { padding: 8px 0 4px; }
.seance-contenu > .plan-det, .seance-contenu > p, .seance-contenu > details { padding: 0 20px; }
.plan-det.big { font-size: 1rem; line-height: 1.6; padding: 12px 20px; }
.bloc { padding: 10px 0 6px; }
.bloc + .bloc { border-top: 1px solid var(--line); }
.bloc-h { padding: 4px 20px 8px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.bloc-t { font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: .82rem; color: var(--accent); }
.bloc-echauffement .bloc-t { color: #b7791f; } .bloc-retour .bloc-t { color: #2f855a; } .bloc-renfo .bloc-t { color: #6b46c1; }
.bloc-note { color: var(--muted); font-size: .9rem; }
.ex-tbl td, .ex-tbl th { vertical-align: top; }
.ex-tbl td:first-child { min-width: 170px; }
.ex-note { display: block; color: var(--muted); font-size: .8rem; font-weight: 400; }
.ex-vid { white-space: nowrap; text-align: right; }
.vid, .vid-cherche { font-size: .8rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); }
.vid-cherche { background: transparent; border: 1px solid var(--line); color: var(--muted); font-weight: 600; }
.bloc-mini .bloc-h { padding-left: 0; } .bloc-mini .ex-tbl { font-size: .82rem; }
.jours-choix { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 12px; }
.jour-b input { position: absolute; opacity: 0; }
.jour-b span { display: flex; flex-direction: column; align-items: center; min-width: 46px; padding: 6px 4px; border: 1px solid var(--line); border-radius: 10px; font-size: .74rem; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.jour-b span b { font-size: 1.05rem; color: var(--ink); }
.jour-b input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
@media (max-width: 640px) {
  .ex-tbl thead { display: none; }
  .ex-tbl tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
  .ex-tbl td { border: 0; padding: 0; }
  .ex-tbl td:first-child { grid-column: 1 / -1; min-width: 0; }
  .ex-tbl td[data-l]:not(:first-child)::before { content: attr(data-l) " "; color: var(--muted); font-size: .74rem; }
  .ex-tbl td.ex-vid { grid-column: 1 / -1; text-align: left; margin-top: 4px; }
}
/* éditeur de tableau (coach) */
.plan-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
.tableau-edit { border-top: 1px solid var(--line); padding-top: 10px; }
.bloc-edit { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 0 0 10px; }
.lignes-edit input { margin: 0; padding: .35rem .45rem; font-size: .84rem; }

.lignes-edit td { padding: 3px; }
@media (max-width: 980px) { .plan-grid { grid-template-columns: 1fr; } }
.ex-tbl { table-layout: fixed; width: 100%; }
.ex-tbl col.c-ex { width: 34%; } .ex-tbl col.c-se { width: 9%; } .ex-tbl col.c-re { width: 15%; } .ex-tbl col.c-in { width: 18%; } .ex-tbl col.c-rc { width: 11%; } .ex-tbl col.c-vi { width: 13%; }
.ex-tbl td { overflow-wrap: anywhere; }
.bm { margin: 8px 0; } .bm ul { margin: 4px 0 0; padding-left: 18px; font-size: .86rem; } .bm li { margin: 2px 0; }
.cible-in { color: var(--accent); font-weight: 600; }
.lignes-edit { table-layout: fixed; width: 100%; min-width: 640px; }
.lignes-edit th:nth-child(1) { width: 30%; } .lignes-edit th:nth-child(2) { width: 9%; } .lignes-edit th:nth-child(3) { width: 12%; } .lignes-edit th:nth-child(4) { width: 17%; } .lignes-edit th:nth-child(5) { width: 11%; } .lignes-edit th:nth-child(6) { width: 15%; } .lignes-edit th:nth-child(7) { width: 6%; }
.lignes-edit input { min-width: 0 !important; width: 100%; }
@media (max-width: 640px) { .ex-tbl { table-layout: auto; } }
