/* Composants de l'application. Couleurs, polices et mouvements : motio.css (socle unique, chargé avant ce fichier).
   Anciens noms gardés comme alias pour ne rien casser : --teal (traits et liens de marque), --teal-dark, --gold, --cream. */
:root { --teal: var(--brand-text); --teal-dark: var(--brand-text); --gold: var(--accent); --cream: var(--surface-2); }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: Georgia, serif; font-weight: 400; line-height: 1.15; }
a { color: var(--teal); text-decoration: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 2px solid transparent; cursor: pointer; transition: 0.2s;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--teal); color: var(--teal); background: transparent; }
.btn-ghost:hover { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }

/* Layout Auth (Centré) */
.auth-wrapper {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  padding: 24px;
}
.auth-card {
  background: var(--surface); padding: 48px; border-radius: var(--radius);
  box-shadow: var(--shadow-2); width: 100%; max-width: 420px;
}
.auth-logo {
  font-family: Georgia, serif; font-size: 28px; font-weight: 700;
  letter-spacing: 0.12em; color: var(--teal); text-align: center; margin-bottom: 8px;
}
.auth-logo span { color: var(--gold); }
.auth-sub { text-align: center; color: var(--muted); margin-bottom: 32px; font-size: 15px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; color: var(--teal-dark); }
.form-group input {
  width: 100%; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 16px; background: var(--cream); transition: border-color 0.2s;
}
.form-group input:focus { outline: none; border-color: var(--teal); background: var(--surface); }
.auth-card .btn { width: 100%; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 13px; color: var(--muted); }
.error-msg { background: var(--danger-bg); color: var(--danger-ink); padding: 12px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }

.auth-signature {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 24px;
}

/* App (coach / client) */
.app-body { background: var(--bg-2); }
.header { background: var(--brand); color: var(--on-brand); padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; }
.header-logo { font-family: Georgia, serif; font-size: 22px; font-weight: 700; letter-spacing: 0.1em; color: var(--on-brand); }
.header-right { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.header-right form { margin: 0; }
.logout-btn { background: none; border: 1px solid var(--gold); color: var(--gold); padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.logout-btn:hover { background: var(--accent); color: var(--on-accent); }
.main { max-width: 1000px; margin: 40px auto; padding: 0 24px; }
.main-narrow { max-width: 800px; }
.page-title { color: var(--teal-dark); margin-bottom: 32px; font-size: 2.5rem; }
.card { background: var(--surface); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-1); margin-bottom: 24px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.card-head h2, .card h2 { font-size: 1.5rem; }
.empty-state { color: var(--muted); text-align: center; padding: 40px 0; font-style: italic; background: var(--cream); border-radius: 8px; }
.client-list { display: grid; gap: 16px; }
.client-item { display: flex; justify-content: space-between; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--cream); color: var(--ink); }
.client-item:hover { border-color: var(--teal); background: var(--surface); }
.client-item span { color: var(--muted); font-size: 14px; }
@media (max-width: 560px) { .client-item { flex-direction: column; align-items: flex-start; gap: 2px; } .client-item span { overflow-wrap: anywhere; } }
.back-link { display: inline-block; margin-bottom: 16px; font-size: 14px; }
.detail-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.detail-row:last-child { border-bottom: 0; }
.detail-label { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.detail-value { margin-top: 4px; white-space: pre-wrap; }
.form-group textarea { width: 100%; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; font-size: 16px; font-family: inherit; min-height: 80px; background: var(--cream); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(8, 10, 24, .55); z-index: 100; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal-content { background: var(--surface); padding: 32px; border-radius: var(--radius); width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.close-btn { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--muted); }

/* Site vitrine MOTIO */
.site-body { background: var(--cream); }
.site-header { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.site-logo { font-family: Georgia, serif; font-size: 24px; font-weight: 700; letter-spacing: 0.14em; color: var(--teal); }
.site-nav { display: flex; align-items: center; gap: 20px; font-size: 15px; }
.site-nav a:not(.btn) { color: var(--ink); }
.site-section { max-width: 1000px; margin: 0 auto; padding: 64px 24px; }
.site-legal h1 { color: var(--teal-dark); margin-bottom: 16px; }
.site-legal h2 { font-size: 1.3rem; margin: 28px 0 8px; color: var(--teal-dark); }
.site-todo { background: var(--warn-bg); color: var(--warn-ink); padding: 10px 14px; border-radius: 8px; font-size: 14px; }
@media (max-width: 640px) { .site-nav a:not(.btn) { display: none; } }

/* Bibliothèque d'exercices */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.filters input, .filters select { padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; background: var(--surface); font-family: inherit; }
.filters input[type=search] { flex: 1; min-width: 220px; }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.ex-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; color: var(--ink); }
.ex-card:hover { border-color: var(--teal); }
.ex-card strong { display: block; font-size: 1.05rem; margin-bottom: 6px; }
.ex-meta { font-size: 13px; color: var(--muted); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; background: var(--cream); border: 1px solid var(--line); color: var(--muted); margin: 0 6px 4px 0; }
.badge-draft { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }
.ex-detail ol, .ex-detail ul { margin: 6px 0 0 20px; }
.note { font-size: 13px; color: var(--muted); margin-top: 8px; }

.form-group select { width: 100%; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; font-size: 16px; background: var(--cream); font-family: inherit; }

/* === Langage visuel commun : polices, rythme, boutons, en-tête (jetons dans motio.css, une seule identité pour tous les espaces) === */
body{font-family:var(--font-body)}
h1,.page-title,.auth-logo,.header-logo,.site-logo{font-family:var(--font-title);font-weight:800}
h2,h3{font-family:var(--font-body);font-weight:600;line-height:1.2}
.page-title{font-size:clamp(1.8rem,6vw,2.5rem);margin-bottom:24px;letter-spacing:-.01em}
.auth-logo{font-size:26px;letter-spacing:.1em}
.header-logo{font-size:20px;letter-spacing:.08em;text-decoration:none}
.btn{min-height:var(--tap);font-family:inherit}
.btn-sm{min-height:40px}
.form-group input,.form-group select{min-height:var(--tap);font-family:inherit}
.form-group textarea{min-height:96px}
:focus-visible{outline:3px solid var(--gold);outline-offset:2px}
.btn:focus-visible,.logout-btn:focus-visible,.form-group input:focus-visible{outline-color:var(--teal-dark)}
.header{position:sticky;top:0;z-index:20;gap:12px;padding:12px 20px;padding-top:calc(12px + env(safe-area-inset-top,0px))}
.header-right{min-width:0}
.header-user{max-width:38vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.logout-btn{min-height:40px;padding:8px 14px}
.client-item{min-height:56px}
.auth-wrapper{padding-top:calc(24px + env(safe-area-inset-top,0px))}
@media (max-width:560px){
  .header-user{display:none}
  .card{padding:20px}
  .auth-card{padding:28px 22px}
  .main{margin:24px auto;padding:0 16px}
  .card-head{flex-wrap:wrap;gap:12px}
}

/* === Lecteur d'unités des manuels vivants (tranche Ruffier) === */
.unit-situation{border-left:4px solid var(--gold)}
.unit-level{border-top:1px solid var(--line);padding:12px 0}
.unit-level:first-child{border-top:0;padding-top:0}
.unit-level summary{cursor:pointer;font-weight:600;min-height:32px;display:flex;align-items:center}
.unit-level ul{margin:8px 0 0 20px}
.unit-level p{margin-top:8px}
.unit-safety{background:var(--danger-bg);color:var(--danger-ink);border-radius:12px;padding:14px 16px;margin-bottom:24px;font-size:15px}
.unit-steps{margin:16px 0 16px 20px}
.unit-steps li{margin-bottom:6px}
.unit-timer{border:1px solid var(--line);border-radius:12px;padding:14px;margin-bottom:12px}
.unit-timer-head{display:flex;justify-content:space-between;font-weight:600;margin-bottom:8px}
.unit-timer-count{font-variant-numeric:tabular-nums;font-size:1.3rem}
.unit-timer-bar{height:8px;background:var(--line);border-radius:4px;overflow:hidden;margin-bottom:8px}
.unit-timer-bar i{display:block;height:100%;width:0;background:var(--teal)}
.unit-timer.is-done .unit-timer-bar i{background:var(--gold)}
.unit-timer-beats{font-variant-numeric:tabular-nums;color:var(--muted);margin-bottom:8px}
.unit-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:0 12px;margin-top:16px}
.unit-result.is-fresh{background:var(--warn-bg);border-radius:8px;padding-left:8px;padding-right:8px}
.unit-result-value strong{font-size:1.4rem;margin-right:6px}
.unit-delta{display:block;font-size:13px;color:var(--muted)}
/* Séances modèles : couleur par filière (annexe C.3) */
.seance-bar{display:flex;height:14px;border-radius:7px;overflow:hidden;margin-bottom:16px;gap:2px}
.seance-bar i{display:block;min-width:4px}
.fil-libre{--fil:var(--fil-libre)}.fil-aerobie{--fil:var(--fil-aerobie)}.fil-lactique{--fil:var(--fil-lactique)}.fil-alactique{--fil:var(--fil-alactique)}
.seance-bar i{background:var(--fil)}
.seance-section{border-left:4px solid var(--fil);padding:10px 0 10px 12px;margin-bottom:10px}
.seance-head{display:flex;justify-content:space-between;gap:12px;margin-bottom:4px}
.seance-warn{background:var(--warn-bg);color:var(--warn-ink);border-radius:8px;padding:6px 10px;margin-top:6px;font-size:14px}

/* Test des 3 paliers : droite FC / puissance, zones, repères */
.seance-target{margin-top:6px;font-size:15px;color:var(--teal)}
.pmt-chart{width:100%;height:auto;display:block;background:var(--surface);border-radius:8px}
.pmt-axis{stroke:var(--muted);stroke-width:1}
.pmt-tick{font-size:10px;fill:var(--muted)}
.pmt-ref{stroke:var(--muted);stroke-width:1;stroke-dasharray:4 3}
.pmt-line{stroke:var(--teal);stroke-width:2}
.pmt-point{fill:var(--teal)}
.pmt-pma{fill:var(--z5)}
.pmt-pma-label{font-size:11px;font-weight:600;fill:var(--ink)}
.pmt-zone{opacity:.35}
.pmt-zone-label{font-size:9px;fill:var(--muted)}
.pmt-z1{fill:var(--z1);background:var(--z1)}.pmt-z2{fill:var(--z2);background:var(--z2)}.pmt-z3{fill:var(--z3);background:var(--z3)}.pmt-z4{fill:var(--z4);background:var(--z4)}.pmt-z5{fill:var(--z5);background:var(--z5)}
.pmt-table{display:flex;flex-direction:column;gap:6px}
.pmt-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;font-size:14px;padding:6px 0;border-bottom:1px solid var(--line)}
.pmt-row:last-child{border-bottom:0}
.pmt-swatch{width:12px;height:12px;border-radius:3px;display:inline-block}

/* Cycle de séances : calendrier par semaine */
.cycle-weeks{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.cycle-week{border:1px solid var(--line);border-radius:10px;padding:10px 12px;font-size:15px}
.cycle-week.is-now{border-color:var(--teal);box-shadow:0 0 0 1px var(--teal)}
.cycle-week.is-past{opacity:.6}
.cycle-week-head{display:flex;justify-content:space-between;gap:8px;margin-bottom:4px}
.cycle-week-head span{color:var(--muted);font-size:14px}
.cycle-test{margin-top:4px;color:var(--teal);font-weight:600}
.cycle-current{background:var(--cream);border-radius:10px;padding:10px 12px;margin:12px 0}

/* Q-AAP */
.qaap-q{border:0;border-bottom:1px solid var(--line);padding:10px 0;margin:0}
.qaap-q legend{font-size:15px;margin-bottom:6px;padding:0}
.qaap-q label{display:inline-flex;align-items:center;gap:6px;margin-right:20px;min-height:44px;font-weight:600}

/* ---------- Agenda (docs/AGENDA.md) : couleurs de l'espace, statut lisible sans la couleur ---------- */
.ag-top { display: flex; align-items: center; gap: 2px; padding: 6px 12px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 4; }
.ag-heading { flex: 1; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 1.3rem; cursor: pointer; list-style: none; }
.ag-btn::-webkit-details-marker { display: none; }
.ag-today { font-size: .85rem; font-weight: 600; padding: 0 8px; }
.ag-menu { position: relative; }
.ag-menu-box { position: absolute; right: 0; top: 48px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-2); padding: 12px; width: min(300px, 86vw); display: grid; gap: 12px; z-index: 6; }
.ag-menu-box form { display: grid; gap: 6px; }
.ag-menu-box label { display: grid; gap: 4px; font-size: .85rem; color: var(--muted); }
.ag-main { max-width: 1100px; margin: 0 auto; }
.ag-days, .ag-grid { display: grid; }
.ag-days { text-align: center; font-size: .8rem; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--surface); }
.ag-dh { padding: 4px 0; color: inherit; text-decoration: none; }
.ag-dh b { display: block; font-size: 1.05rem; color: var(--ink); }
.ag-dh.is-today b { color: var(--on-accent); background: var(--gold); border-radius: 50%; width: 28px; height: 28px; line-height: 28px; margin: 0 auto; }
.ag-scroll { height: calc(100vh - 230px); min-height: 320px; overflow: auto; background: var(--surface); }
.ag-gutter, .ag-col { position: relative; height: 704px; }
.ag-gutter span { position: absolute; right: 4px; font-size: .7rem; color: var(--muted); transform: translateY(-.5em); }
.ag-col { border-left: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 43px, var(--line) 43px, var(--line) 44px); }
.ag-col.is-today { background-color: color-mix(in srgb, var(--gold) 10%, transparent); }
.ag-slot { position: absolute; left: 0; right: 0; height: 44px; }
.ag-slot:hover, .ag-slot:focus-visible { background: color-mix(in srgb, var(--teal) 8%, transparent); }
.ag-ev { position: absolute; left: 2px; right: 2px; z-index: 1; border-radius: 8px; padding: 2px 5px; font-size: .72rem; line-height: 1.2; overflow: hidden; text-decoration: none; color: var(--on-accent); background: var(--gold); border: 1.5px solid var(--gold); }
.ag-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 2; }
.st-proposed.ag-ev, .ag-chip.st-proposed { background: var(--surface); border: 1.5px dashed var(--brand-text); }
.st-done.ag-ev, .ag-chip.st-done { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.st-cancelled.ag-ev, .ag-chip.st-cancelled { background: var(--cream); border-color: var(--line); color: var(--muted); text-decoration: line-through; }
.ag-flag { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; background: var(--danger); color: var(--surface); font-weight: 700; font-size: .65rem; margin-right: 2px; text-decoration: none; }
.ag-mh, .ag-month { display: grid; grid-template-columns: repeat(7, 1fr); }
.ag-mh { font-size: .75rem; color: var(--muted); text-align: center; padding: 4px 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.ag-month { background: var(--surface); }
.ag-mc { border: .5px solid var(--line); padding: 2px; min-height: 64px; font-size: .7rem; overflow: hidden; color: var(--ink); text-decoration: none; }
.ag-mc b { display: block; font-size: .85rem; }
.ag-mc.is-out { opacity: .4; }
.ag-mc.is-today { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.ag-chip { display: block; border-radius: 4px; padding: 0 3px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--gold); border: 1px solid var(--gold); color: var(--on-accent); }
.ag-more { color: var(--muted); }
.ag-list { padding: 4px 16px 24px; }
.ag-list h4 { margin: 14px 0 6px; font-size: .85rem; color: var(--muted); }
.ag-item { display: flex; gap: 12px; padding: 10px; background: var(--surface); border-radius: 12px; margin-bottom: 6px; border-left: 5px solid var(--gold); color: var(--ink); text-decoration: none; }
.ag-item small { display: block; color: var(--muted); }
.ag-item.st-proposed { border-left-style: dashed; border-left-color: var(--teal); }
.ag-item.st-done { border-left-color: var(--teal); }
.ag-item.st-cancelled { border-left-color: var(--line); color: var(--muted); text-decoration: line-through; }
.ag-next { margin: 10px 12px; padding: 14px; border-radius: 16px; background: var(--brand); color: var(--on-brand); display: grid; gap: 2px; }
.ag-next strong { font-size: 1.3rem; }
.ag-next-alert { color: var(--accent); font-weight: 600; }
.ag-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ag-actions form { margin: 0; }
.ag-actions a, .ag-actions button { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid currentColor; color: inherit; background: none; font: inherit; font-size: .9rem; text-decoration: none; cursor: pointer; }
.ag-actions .is-main { background: var(--gold); border-color: var(--gold); color: var(--on-accent); }
.ag-fab { position: fixed; right: 16px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); width: 56px; height: 56px; border-radius: 18px; background: var(--gold); color: var(--on-accent); font-size: 1.8rem; display: flex; align-items: center; justify-content: center; text-decoration: none; box-shadow: var(--shadow-2); z-index: 5; }
.ag-tabs { display: flex; gap: 4px; margin: 8px auto; padding: 4px; max-width: 520px; width: calc(100% - 24px); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.ag-tabs a { flex: 1; min-height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--muted); text-decoration: none; transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.ag-tabs a.is-on { color: var(--on-brand); background: var(--brand); }

/* Fiche de séance */
.ss-when { margin: -12px 0 16px; color: var(--muted); }
.ss-status { display: inline-block; margin-left: 6px; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--gold); color: var(--on-accent); }
.ss-status.st-proposed { background: var(--surface); border: 1.5px dashed var(--brand-text); }
.ss-status.st-done { background: var(--brand); color: var(--on-brand); }
.ss-status.st-cancelled { background: var(--line); color: var(--muted); }
.ss-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ss-actions form { margin: 0; }
.ss-person { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.ss-person:first-of-type { border-top: 0; }
.ss-person-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; justify-content: space-between; }
.ss-att { display: grid; gap: 10px; margin-top: 8px; }
.ss-seg { display: flex; gap: 16px; }
.ss-scale { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; }
.ss-scale legend { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.ss-scale label { position: relative; }
.ss-scale input { position: absolute; opacity: 0; }
.ss-scale span { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 10px; border: 1.5px solid var(--line); font-weight: 600; cursor: pointer; }
.ss-scale input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.ss-scale input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.ss-form { display: grid; gap: 12px; margin-top: 12px; }
.ss-form label, .ss-att label, #reporter label { display: grid; gap: 4px; font-size: .85rem; color: var(--muted); }
.ss-seg label { display: flex; align-items: center; gap: 6px; font-size: 1rem; color: var(--ink); }
.ss-form input, .ss-form select, .ss-att input[type=number], #reporter input { min-height: 44px; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 10px; font: inherit; color: var(--ink); background: var(--surface); }
.ss-clients { border: 0; padding: 0; margin: 0; }
.ss-clients legend { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.ss-client-list { max-height: 260px; overflow: auto; display: grid; gap: 4px; }
.ss-client { display: flex !important; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border: 1.5px solid var(--line); border-radius: 10px; color: var(--ink) !important; font-size: 1rem !important; }
.ss-client:has(input:checked) { border-color: var(--teal); background: var(--brand-soft); }
.ss-client span { flex: 1; }
.ss-tag { font-style: normal; font-size: .75rem; padding: 2px 8px; border-radius: 999px; background: var(--cream); color: var(--muted); }
.ss-tag.is-alert { background: var(--danger-bg); color: var(--danger); font-weight: 600; }
.ss-filter { margin-bottom: 6px; width: 100%; }
.ss-summary { cursor: pointer; font-weight: 700; font-size: 1.1rem; min-height: 44px; display: flex; align-items: center; }
.ss-log { margin: 8px 0 16px; padding-left: 18px; color: var(--muted); font-size: .9rem; }
.ss-delete { display: grid; gap: 8px; }
.ss-delete label { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; }
#reporter form { align-items: end; }
.row-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
/* Remplacement : séance confiée (rayures) ; séance assurée pour un autre coach (bordure pleine de la couleur principale) */
.ag-ev.is-repl, .ag-chip.is-repl, .ag-item.is-repl { background-image: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--surface) 45%, transparent) 6px 9px); }
.ag-ev.is-cover, .ag-chip.is-cover { background: var(--surface); border: 2px solid var(--teal); color: var(--teal-dark); }
.ag-item.is-cover { border-left-color: var(--teal); border-left-style: solid; }
/* FC de sécurité dans la fiche */
.fcs { margin: 12px 0; padding: 12px; border: 1.5px solid var(--danger-line); border-radius: 12px; background: var(--danger-bg); display: grid; gap: 6px; }
.fcs-value { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fcs-value strong { font-size: 1.4rem; color: var(--danger); }
.fcs-over { text-decoration: line-through; color: var(--muted); }
/* Messagerie interne */
.msg { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.msg:last-child { border-bottom: 0; }
.msg.is-new { border-left: 3px solid var(--accent); padding-left: 10px; }
.msg-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.msg-head small { color: var(--muted); white-space: nowrap; }
.msg p { margin: 0; }
.msg .btn { justify-self: start; }
.success-msg { background: var(--ok-bg); color: var(--ok); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.wz { margin: 12px 0; padding: 12px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; display: grid; gap: 6px; }
.wz .fcs-value strong { color: inherit; }

/* En-tête et navigation commune (partials/header.php) : barre d'onglets en bas sur téléphone, dans l'en-tête au-delà de 760 px */
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.skip-link:focus { top: 8px; }
.header-right { gap: 6px; }
.header-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; color: inherit; }
.header-icon:hover, .header-icon.is-active { background: rgba(255, 255, 255, .14); }
.header-icon svg, .appnav svg, .logout-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.logout-btn { display: inline-flex; align-items: center; gap: 6px; }
.appnav { display: flex; gap: 2px; margin: 0 auto; }
.appnav a { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px;
  color: var(--on-brand); opacity: .78; text-decoration: none; font-weight: 600; font-size: 15px; transition: background var(--dur-1) var(--ease), opacity var(--dur-1) var(--ease); }
.appnav a:hover { opacity: 1; background: rgba(255, 255, 255, .10); }
.appnav a.is-active { opacity: 1; background: rgba(255, 255, 255, .16); }
.appnav b { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11px; line-height: 18px; text-align: center; }
@media (max-width: 760px) {
  .header { padding-left: 14px; padding-right: 10px; }
  .header-logo { font-size: 17px; letter-spacing: .05em; }
  .header-user { display: none; }
  .logout-btn { width: 40px; justify-content: center; padding: 0; }
  .logout-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .appnav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; margin: 0; gap: 0; justify-content: space-around;
    background: var(--brand); border-top: 1px solid rgba(255, 255, 255, .08); padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -6px 20px rgba(0, 0, 0, .12); }
  .appnav a { flex: 1; flex-direction: column; gap: 2px; min-height: 54px; padding: 4px 2px; border-radius: 12px; font-size: 11px; justify-content: center; }
  .appnav a.is-active svg { transform: translateY(-1px); }
  .appnav b { position: absolute; top: 4px; left: calc(50% + 6px); }
  .app-body:has(.appnav) { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
  .ag-fab { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}
@media print { .appnav, .skip-link { display: none; } }
/* Lignes de zones : grille régulière (couleur, zone, objectif et pourcentage, fourchette) */
.pmt-zrow { display: grid; grid-template-columns: 12px 28px 1fr auto; column-gap: 10px; row-gap: 2px; }
.pmt-zrow > span:nth-of-type(3) { grid-column: 3; grid-row: 2; font-size: 12px; color: var(--muted); }
.pmt-zrow > span:nth-of-type(2) { grid-column: 3; grid-row: 1; }
.pmt-zrow > strong:last-of-type { grid-column: 4; grid-row: 1 / span 2; align-self: center; text-align: right; font-variant-numeric: tabular-nums; }
.pmt-zrow > .note { grid-column: 3 / -1; margin: 0; }
.pmt-zrow .pmt-swatch { grid-row: 1 / span 2; align-self: center; }
.pmt-zrow > strong:first-of-type { grid-row: 1 / span 2; align-self: center; }
/* Cible cardiaque d'une section (bpm, Karvonen) : sous la puissance, même ligne visuelle */
.seance-target-hr { margin-top: 2px; }
.seance-target-hr.is-over { color: var(--danger-ink); }
.seance-hr-note { margin: 10px 0 12px; }

/* Notes du coach sur une séance */
.ss-note textarea { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--ink); resize: vertical; min-height: 88px; }
.ss-note-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.ag-note { display: block; margin-top: 2px; font-style: italic; color: var(--ink-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Trajets et dépenses (Expenses) */
.fx-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fx-nav h2 { margin: 0; font-size: 1.15rem; }
.fx-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 10px; }
.fx-stats div { display: grid; gap: 2px; padding: 12px 10px; border-radius: 12px; background: var(--surface-2); text-align: center; }
.fx-stats strong { font-family: var(--font-title); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.fx-stats span { font-size: .8rem; color: var(--muted); }
.fx-month .btn { margin-top: 4px; }
.fx-kinds { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.fx-kinds label { display: inline-flex; }
.fx-kinds input { position: absolute; opacity: 0; pointer-events: none; }
.fx-kinds span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--ink); font-size: .9rem; font-weight: 600; cursor: pointer; }
.fx-kinds input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.fx-kinds input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.fx-trip { display: grid; gap: 12px; }
.fx-check { display: flex !important; align-items: center; gap: 8px; color: var(--ink) !important; font-size: .95rem !important; min-height: 40px; }
.fx-check input { width: 20px; height: 20px; min-height: 0 !important; }
.fx-opt { font-weight: 400; }
/* Champs selon le type : le trajet garde départ, arrivée et km ; les autres, le libellé obligatoire */
.fx-form:has(input[name=kind][value=trajet]:not(:checked)) .fx-trip { display: none; }
.fx-form:has(input[name=kind][value=trajet]:checked) .fx-label { display: none; }
.fx-form:has(input[name=kind][value=trajet]:not(:checked)) .fx-opt { display: none; }
.fx-routes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.fx-routes a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-text); text-decoration: none; font-size: .9rem; font-weight: 600; }
.fx-routes small { font-weight: 400; color: var(--muted); }
.fx-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 4px 10px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; }
.fx-row:first-of-type { border-top: 0; }
.fx-row b { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; padding-top: 2px; }
.fx-row strong { display: block; }
.fx-row small { color: var(--muted); }
.fx-amount { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-acts { grid-column: 2 / -1; display: flex; gap: 14px; align-items: center; font-size: .85rem; }
.fx-acts form { margin: 0; }
.fx-acts a, .fx-acts button { color: var(--brand-text); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; min-height: 32px; }
.fx-acts button { color: var(--danger); }
.fx-teaser { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-decoration: none; color: inherit; }
.fx-teaser small { display: block; color: var(--muted); margin-top: 2px; }
.fx-go { font-size: 1.6rem; color: var(--muted); }
.fx-form input:not([type=radio]):not([type=checkbox]), .fx-form select { width: 100%; min-width: 0; box-sizing: border-box; }
.row-2 > *, .ss-form select { min-width: 0; } .ss-form select { width: 100%; }

/* Réglages (registre Settings) : mêmes champs pour le coach, le studio et l'administration */
.st-form { display: grid; gap: 16px; }
.st-sec { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; }
.st-sec legend { font-family: var(--font-title); font-size: 1rem; color: var(--ink); padding: 0; margin-bottom: 10px; float: left; width: 100%; }
.st-sec legend + * { clear: both; }
.st-sec + .st-sec { margin-top: 8px; }
.st-field { display: grid; gap: 6px; }
.st-field > label { font-weight: 600; color: var(--ink); }
.st-field select, .st-field input:not([type=checkbox]) { width: 100%; min-width: 0; box-sizing: border-box; }
.st-field small { color: var(--muted); font-size: .85rem; }
.st-fixed { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--radius-s); background: var(--surface-2); }
.st-fixed span { font-size: .8rem; color: var(--warn-ink); background: var(--warn-bg); border-radius: 999px; padding: 2px 8px; }
.st-lock { display: flex !important; align-items: center; gap: 8px; font-size: .85rem !important; color: var(--ink-2) !important; font-weight: 400 !important; }
.st-lock input { width: 18px; height: 18px; min-height: 0 !important; }
.st-badge { font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); }
.st-list { margin: 0 0 12px; display: grid; gap: 0; }
.st-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.st-list > div:first-child { border-top: 0; }
.st-list dt { color: var(--ink-2); }
.st-list dd { margin: 0; font-weight: 600; text-align: right; }
.st-coach { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.st-coach form { margin: 0; }

/* Notifications push (page Messages) */
.push-say { margin-bottom: 12px; }
.push-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.push-actions [data-push-on], .push-actions [data-push-test], .push-actions [data-push-off] { display: none; }
.push-card[data-state="off"] [data-push-on] { display: inline-flex; }
.push-card[data-state="on"] [data-push-test], .push-card[data-state="on"] [data-push-off] { display: inline-flex; }
.push-devices { margin-top: 12px; }
.msg-prefs { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.msg-prefs th, .msg-prefs td { padding: 10px 4px; border-bottom: 1px solid var(--line); text-align: center; }
.msg-prefs thead th { font-size: .8rem; color: var(--muted); font-weight: 600; }
.msg-prefs tbody th { text-align: left; font-weight: 400; }
.msg-prefs input { width: 20px; height: 20px; accent-color: var(--brand); }

/* Radar de remplacement (étape E) */
.rd-offer-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; display: grid; gap: 8px; }
.rd-offer-card.is-urgent { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.rd-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.rd-when strong { font-size: 1.1rem; }
.rd-when small, .rd-mine small { color: var(--muted); }
.rd-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rd-tag { font-size: .78rem; padding: 3px 10px; border-radius: 999px; background: var(--surface-2, rgba(127,127,127,.12)); color: var(--ink-2); }
.rd-tag-urgent { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.rd-tag-fit { background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.rd-who { margin: 0; }
.rd-mine { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rd-mine:last-of-type { border-bottom: 0; }
.rd-mine > div:first-child { display: grid; gap: 2px; min-width: 0; }
.rd-mine-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rd-slots { display: grid; gap: 10px; }
.rd-slot { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.rd-slot select, .rd-slot input { width: 100%; min-width: 0; }
.rd-state { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.rd-state > div { display: grid; gap: 2px; }
.rd-state small { color: var(--muted); }
.rd-pulse { width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; background: var(--accent); flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .rd-pulse { animation: rd-pulse 1.8s ease-out infinite; }
  @keyframes rd-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 194, 36, .6); } 100% { box-shadow: 0 0 0 12px rgba(255, 194, 36, 0); } }
}
.rd-offer { margin-top: 12px; }
.rd-offer .ss-form { display: grid; gap: 12px; margin-top: 8px; }
.rd-offer label, .rd-offer input, .rd-offer select { min-width: 0; width: 100%; }
.rd-slot select, .rd-slot input { min-height: 44px; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 8px; font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); box-sizing: border-box; }
.rd-pay { margin: 0; font-weight: 600; color: var(--ink-2); }
.rd-radius { display: grid; gap: 6px; font-weight: 600; }
.rd-radius select { min-height: 44px; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 8px; font: inherit; color: var(--ink); background: var(--surface); max-width: 160px; }
.cy-agenda { margin: 12px 0 16px; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.cy-agenda summary { list-style: none; cursor: pointer; }
.cy-agenda summary::-webkit-details-marker { display: none; }
.cy-check { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; min-height: 44px; cursor: pointer; }
.cy-check input { width: 20px; height: 20px; accent-color: var(--brand); }
.cy-days { border: 0; padding: 0; margin: 8px 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.cy-days legend { font-weight: 600; margin-bottom: 8px; font-size: .9rem; }
.cy-day { position: relative; cursor: pointer; }
.cy-day input { position: absolute; opacity: 0; inset: 0; }
.cy-day span { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 44px; border: 1.5px solid var(--line); border-radius: 22px; font-weight: 600; transition: background .15s, color .15s, border-color .15s; }
.cy-day input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.cy-day input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
/* Connexion d'un geste (clés d'accès) et invitations */
.pk-login, .pk-create, .pk-nudge { display: none; }
.pk-ok .pk-login, .pk-ok .pk-create { display: block; }
.pk-ok .pk-unsupported { display: none; }
.pk-btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; font-size: 1.05rem; }
.pk-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.pk-hint { text-align: center; font-size: .85rem; color: var(--ink-2); margin: 8px 0 0; }
.pk-ok .pk-alt { background: transparent; color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; }
.pk-say { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--danger-bg); color: var(--danger-ink); font-size: .9rem; }
.pk-say.is-ok { background: var(--ok-bg); color: var(--ok); }
.btn.is-busy { opacity: .6; pointer-events: none; }
.pk-ok .pk-nudge:not([hidden]) { display: flex; }
.pk-nudge { gap: 12px; align-items: flex-start; margin: 12px auto 0; max-width: 720px; width: calc(100% - 32px); padding: 14px 16px; border-radius: 14px;
  background: var(--surface); border: 1.5px solid var(--brand); box-shadow: 0 6px 20px rgba(20, 25, 58, .08); animation: pk-in .35s ease-out; transition: opacity .3s, transform .3s; }
.pk-nudge > svg { width: 30px; height: 30px; flex: none; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; }
.pk-nudge-text { flex: 1; display: grid; gap: 2px; }
.pk-nudge-text span { font-size: .9rem; color: var(--ink-2); }
.pk-nudge-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pk-nudge.is-gone { opacity: 0; transform: translateY(-8px); pointer-events: none; }
@media (max-width: 560px) { .pk-nudge { flex-wrap: wrap; } .pk-nudge-actions { width: 100%; } .pk-nudge-actions .btn { flex: 1; min-height: 44px; } }
@keyframes pk-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pk-nudge { animation: none; transition: none; } }
.pk-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.pk-row:first-of-type { border-top: 0; }
.pk-row small { display: block; color: var(--ink-2); font-size: .85rem; }
.inv-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.inv-choices .btn small { opacity: .75; font-weight: 500; margin-left: 4px; }
.inv-card { text-align: center; }
.inv-qr { width: min(100%, 320px); aspect-ratio: 1; margin: 4px auto 14px; background: #fff; border-radius: 16px; padding: 8px; }
.inv-qr svg { width: 100%; height: 100%; display: block; }
.inv-step { font-size: 1rem; margin: 0 0 10px; }
.inv-timer { font-weight: 600; color: var(--ink-2); margin: 8px 0 0; }
.inv-card.is-expired .inv-qr { opacity: .15; }
.inv-card.is-expired .inv-timer { color: var(--danger); }
/* Lieux et cours collectifs (docs/LIEUX.md) */
.vn-class { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.vn-class:first-of-type { border-top: 0; }
.vn-class-main { display: grid; gap: 2px; min-width: 0; }
.vn-class-main span { color: var(--ink-2); font-size: .92rem; }
.vn-class-main small { color: var(--muted); font-size: .85rem; }
.vn-class.is-stopped { opacity: .65; }
.vn-group { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); margin-bottom: 12px; font-size: .92rem; }
.vn-group svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vn-count { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.vn-count label { display: grid; gap: 4px; font-size: .85rem; color: var(--muted); }
.vn-count input { width: 120px; min-height: 52px; font-size: 1.4rem; font-weight: 700; text-align: center; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); }
.vn-steps { display: flex; gap: 6px; }
.vn-steps button { min-width: 52px; min-height: 52px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.3rem; font-weight: 700; cursor: pointer; }
/* Toucher : pas d'ombre ni de surlignage du navigateur au clic ; contour réservé au clavier ; léger enfoncement à la place. */
html { -webkit-tap-highlight-color: transparent; }
a:focus:not(:focus-visible), button:focus:not(:focus-visible), summary:focus:not(:focus-visible), [role="button"]:focus:not(:focus-visible) { outline: none; box-shadow: none; }
button, .btn, summary { -webkit-touch-callout: none; touch-action: manipulation; }
.btn:active, button:active { transform: scale(.97); transition: transform .08s ease-out; }
@media (prefers-reduced-motion: reduce) { .btn:active, button:active { transform: none; } }
.join-form { display: grid; gap: 4px; }
.join-consent { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--ink-2); margin: 6px 0 16px; line-height: 1.45; }
.join-consent input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--brand); }
.vn-class-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.vn-qr { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.vn-origin { margin: -4px 0 14px; padding: 8px 12px; border-left: 3px solid var(--brand); background: var(--bg-2); border-radius: 0 8px 8px 0; }
.pk-mail { font-weight: 600; word-break: break-all; margin: 0 0 8px; }
.pk-pending { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); font-size: .9rem; margin-bottom: 8px; }
/* Espace du lieu (docs/LIEUX.md, étape 3) */
.vn-manager { display: flex; gap: 10px; align-items: center; justify-content: space-between; font-size: .9rem; padding: 0 0 12px; color: var(--ink-2, inherit); }
.vn-manager-invite { margin: 0 0 12px; }
.lx-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line, rgba(0,0,0,.08)); }
.lx-row:first-of-type { border-top: 0; }
.lx-row.is-off { opacity: .55; }
.lx-when { display: flex; flex-direction: column; min-width: 96px; }
.lx-when small, .lx-vol small { color: var(--muted, #6b7280); font-size: .8rem; }
.lx-main { display: flex; flex-direction: column; gap: 2px; }
.lx-state { font-size: .88rem; color: var(--muted, #6b7280); }
.lx-state.is-ok { color: var(--ok, #15803d); }
.lx-state.is-wait { color: var(--warn-ink, #b45309); font-weight: 600; }
.lx-offer { display: flex; flex-direction: column; gap: 8px; padding: 0 0 12px; }
.lx-vol { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); }
.lx-vol span { display: flex; flex-direction: column; }
.lx-absence { margin: 0 0 12px; }
.lx-pick { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.lx-pick legend { font-weight: 600; margin-bottom: 4px; }
.lx-radio { display: flex !important; gap: 8px; align-items: center; font-weight: 400; }
.lx-past { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: .9rem; border-top: 1px solid var(--line, rgba(0,0,0,.08)); }
.lx-past:first-of-type { border-top: 0; }
.lx-sub { margin: -16px 0 20px; }
.lx-fields { display: grid; gap: 12px; }
.lx-fields select, .lx-fields input { width: 100%; max-width: 100%; min-width: 0; }
@media (min-width: 560px) { .lx-fields { grid-template-columns: 1fr 1fr; } }
/* Relevé et tableau de bord du lieu (F5, F6) */
.lx-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.lx-kpis-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 420px) { .lx-kpis-4 { grid-template-columns: 1fr 1fr; } }
.lx-kpis div { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px; background: var(--bg-2); }
.lx-kpis strong { font-size: 1.5rem; line-height: 1.1; }
.lx-kpis span { font-size: .82rem; color: var(--muted); }
.lx-dash-sub { font-weight: 600; margin: 4px 0 6px; }
.lx-bar { display: grid; grid-template-columns: minmax(0, 1.2fr) 1fr auto; gap: 10px; align-items: center; font-size: .88rem; margin-bottom: 6px; }
.lx-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-bar i { display: block; height: 8px; border-radius: 4px; background: var(--line); position: relative; overflow: hidden; }
.lx-bar i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--teal, #1f8a8a); border-radius: 4px; }
.lx-dash .btn { margin-top: 10px; }
.lx-months { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.lx-line { display: grid; grid-template-columns: 104px minmax(0, 1fr) 36px; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.lx-line:first-child { border-top: 0; }
.lx-line-main { display: flex; flex-direction: column; min-width: 0; }
.lx-line-main small { color: var(--muted); }
.lx-line-n { text-align: right; font-weight: 700; }
.lx-line.is-cancelled { opacity: .55; }
.lx-line.is-replaced .lx-line-main small { color: var(--warn-ink); }
.lx-line.is-upcoming { opacity: .7; }
.lx-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 12px; }
.vn-report { display: inline-block; font-size: .88rem; font-weight: 600; margin: -4px 0 10px; }
@media print {
  .header, .appnav, .lx-noprint, .powered, .skip-link, .pk-nudge, .motio-powered { display: none !important; }
  body, .app-body { background: #fff !important; color: #000 !important; }
  .lx-report .card { box-shadow: none !important; border: 1px solid #ccc; break-inside: avoid; }
}

/* Partage d'un lien à usage unique (WhatsApp, partage, copie) */
.share-box { border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 0 0 16px; background: var(--surface); }
.share-box.is-expired { opacity: .55; }
.share-who { margin: 0 0 12px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.share-more { display: flex; gap: 18px; flex-wrap: wrap; margin: 12px 0 0; }
.inv-card .share-box, .card > .share-box { border: 0; padding: 0; margin: 0; background: none; }
.inv-card .share-actions, .inv-card .share-more { justify-content: center; }
.share-wa { background: #1FA855; color: #fff; display: inline-flex; align-items: center; gap: 8px; border: 0; }
.share-wa:hover { background: #178C46; color: #fff; }
.share-wa svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.share-timer { margin: 12px 0 4px; font-weight: 600; font-size: .9rem; }
.link-btn { background: none; border: 0; padding: 0; color: var(--ink-2); font: inherit; font-size: .9rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--ink); }
.inv-lost { margin-top: 12px; }
.login-more { margin-top: 14px; } .login-more summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; }
