/* =====================================================================
   Fighting Squad — design system app (charte fightingsquad.ch)
   ===================================================================== */
@font-face {
  font-family: "Varien";
  src: url("fonts/Varien.6af7273548d8.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Varien";
  src: url("fonts/Varien-Italic.c0d6f142cd5b.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --black: #000;
  --bg: #0b0a08;
  --surface: #17140f;
  --surface-2: #201c15;
  --border: #2c2721;
  --gold: #cea54b;
  --gold-soft: #cca45b;
  --white: #fff;
  --text: #ece7dd;
  --muted: #9a9284;
  --ok: #4caf6d;
  --ko: #e64949;
  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --nav-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(rgba(206, 165, 75, 0.055) 1px, transparent 1.5px) 0 0 / 26px 26px,
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3 {
  font-family: "Varien", system-ui, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--white);
}
h1 { font-style: italic; font-size: 1.9rem; margin: 0.4rem 0 1rem; }
h2 {
  font-size: 1rem;
  color: var(--gold);
  margin: 0 0 0.7rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid rgba(206, 165, 75, 0.35);
  display: inline-block;
}
section { margin-bottom: 1.6rem; }
main a { color: var(--gold); }

/* ---- Barre du haut ---- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  gap: 0.6rem 1rem;
  padding: 0.65rem 1.4rem;
  padding-top: calc(0.65rem + env(safe-area-inset-top));
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar .brand img { height: 32px; display: block; }
.top-links { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.top-links a {
  color: var(--text);
  text-decoration: none;
  font-family: "Varien", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  padding: 0.35rem 0.1rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s;
}
.top-links a:hover { color: var(--gold); }
.top-links a.active { color: var(--gold); border-bottom-color: var(--gold); }
.inline { display: inline; margin: 0; }
.linklike {
  background: none; border: 1px solid var(--border); border-radius: var(--radius-s);
  color: var(--muted); cursor: pointer;
  width: 38px; height: 38px; font-size: 1.05rem;
  transition: color 0.15s, border-color 0.15s;
}
.linklike:hover { color: var(--ko); border-color: var(--ko); }
.lang-form { display: inline-flex; gap: 0.25rem; margin-right: 0.5rem; }
.lang-btn {
  background: none; border: 1px solid var(--border); border-radius: var(--radius-s);
  color: var(--muted); cursor: pointer;
  padding: 0.35rem 0.55rem; font-size: 0.72rem;
  font-family: "Varien", system-ui, sans-serif; letter-spacing: 0.08em;
}
.lang-btn.active { color: var(--gold); border-color: var(--gold); }
.lang-btn:hover { color: var(--gold); }

/* ---- Navigation basse (mobile, façon app) ---- */
.bottom-nav {
  /* sticky (et non fixed) : sur iOS/PWA, un élément fixed se "décroche" et
     remonte pendant le défilement. En sticky dans le flux (body en colonne
     flex, main qui pousse), la barre reste ancrée en bas, sans glitch. */
  position: sticky; bottom: 0; z-index: 50;
  display: none;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(0, 0, 0, 0.97);
  border-top: 1px solid var(--border);
  width: 100%;
}
.bottom-nav a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  color: var(--muted); text-decoration: none;
  font-family: "Varien", system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.62rem;
  transition: color 0.15s;
}
.bottom-nav a span { font-size: 1.25rem; line-height: 1; }
.bottom-nav a.active { color: var(--gold); }
.bottom-nav a.active span { transform: translateY(-1px); }

.container {
  max-width: 1100px;
  width: 100%;
  margin: 1.6rem auto;
  padding: 0 1.4rem;
  flex: 1 0 auto;
}

/* ---- Cartes & stats ---- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.4rem;
}
.card {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.2rem;
  display: flex; flex-direction: column; gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.kpi {
  font-family: "Varien", system-ui, sans-serif;
  font-style: italic;
  font-size: 1.9rem;
  color: var(--gold);
}
.kpi.ok { color: var(--ok); }
.kpi.ko { color: var(--ko); }
.kpi.paused { color: #d69a3c; }
.card small { color: var(--muted); text-transform: none; letter-spacing: normal; }

.stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.7rem;
  margin-bottom: 1.4rem;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem 0.4rem;
  text-align: center;
  display: flex; flex-direction: column; gap: 0.1rem;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.68rem;
}
.stat .kpi { font-size: 1.6rem; }

.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; margin: 1.4rem 0; }
@media (max-width: 700px) { .columns { grid-template-columns: 1fr; } }
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem;
}

/* ---- Profil ---- */
.profile-card {
  display: flex; align-items: center; gap: 1.4rem;
  background: linear-gradient(150deg, var(--surface-2), var(--surface) 60%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem;
  margin-bottom: 1.2rem;
}
.profile-card h1 { margin: 0 0 0.25rem; font-size: 1.6rem; }
.profile-photo-wrap { position: relative; flex-shrink: 0; }
.profile-photo, .avatar.avatar-profile {
  width: 148px; height: 197px; /* format portrait 3:4, à la hauteur de la fiche */
  border-radius: var(--radius);
  object-fit: cover;
  border: 2px solid var(--gold);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
@media (max-width: 430px) {
  .profile-photo, .avatar.avatar-profile { width: 120px; height: 160px; }
}
.avatar.avatar-profile {
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  color: var(--gold);
  font-family: "Varien", system-ui, sans-serif;
  font-size: 2rem;
}
.photo-form { position: absolute; right: -4px; bottom: -4px; }
.photo-edit {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: var(--gold); color: var(--black);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.05rem;
  border: 2px solid var(--bg);
  transition: transform 0.15s;
}
.photo-edit:hover { transform: scale(1.08); }
.photo-edit input { display: none; }
.profile-id { min-width: 0; }
.contact-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.7rem; }

/* ---- Ceintures ---- */
.grades-row { display: flex; gap: 1.4rem; flex-wrap: wrap; align-items: flex-end; }
.belt-wrap { margin-top: 0.6rem; }
.belt {
  position: relative;
  height: 26px;
  max-width: 250px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 -5px 10px rgba(0, 0, 0, 0.28), 0 2px 6px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.belt-bar {
  position: absolute; top: 0; bottom: 0; right: 14%;
  width: 27%;
  background: #101010;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.belt-stripe { width: 5px; height: 72%; background: #f5f5f5; border-radius: 1px; }
.belt-label {
  display: block; margin-top: 0.3rem;
  font-size: 0.78rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.belt-WHITE { background: #e8e6e0; }
.belt-GREY { background: #8d9096; }
.belt-YELLOW { background: #f5c92c; }
.belt-ORANGE { background: #f08a2c; }
.belt-GREEN { background: #2a9d54; }
.belt-BLUE { background: #2f6fd0; }
.belt-PURPLE { background: #7b4fd0; }
.belt-BROWN { background: #6c4a2f; }
.belt-BLACK { background: #161616; }
.belt-BLACK .belt-bar { background: #a02310; }
.glove { width: 76px; height: auto; display: block; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.45)); }
.grad-list { display: flex; flex-direction: column; gap: 0.9rem; }
.grad-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
}
.grad-item .belt-wrap { margin-top: 0; }

/* ---- Boutons ---- */
.cta {
  display: block;
  background: var(--gold); color: var(--black) !important;
  text-decoration: none; text-align: center;
  padding: 0.95rem 1.4rem;
  border-radius: var(--radius-s);
  font-family: "Varien", system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 0.95rem;
  margin: 1.2rem 0 1.6rem;
  box-shadow: 0 8px 22px rgba(206, 165, 75, 0.22);
  transition: transform 0.15s, background 0.15s;
}
.cta::after { content: " →"; }
.cta:hover { background: var(--gold-soft); transform: translateY(-1px); }
.btn {
  margin-top: 1.4rem; width: 100%; padding: 0.85rem;
  background: var(--gold); color: var(--black);
  border: none; border-radius: var(--radius-s);
  font-family: "Varien", system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 0.95rem; cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.btn:hover { background: var(--gold-soft); transform: translateY(-1px); }
.btn-small {
  display: inline-block;
  background: var(--gold); color: var(--black);
  padding: 0.55rem 1rem; border-radius: var(--radius-s);
  font-family: "Varien", system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 0.8rem; text-decoration: none;
  transition: background 0.15s;
}
.btn-small:hover { background: var(--gold-soft); }
.btn-line {
  display: inline-block;
  background: var(--gold); color: var(--black);
  border: none; border-radius: var(--radius-s);
  padding: 0.45rem 0.95rem;
  font-family: "Varien", system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 0.75rem; cursor: pointer; text-decoration: none;
  transition: background 0.15s;
}
.btn-line:hover { background: var(--gold-soft); }
.btn-line.cancel { background: transparent; border: 1px solid var(--ko); color: var(--ko); }
.btn-line.cancel:hover { background: rgba(230, 73, 73, 0.12); }

/* ---- Tableaux ---- */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
th, td { text-align: left; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--border); }
th {
  background: var(--surface-2);
  font-size: 0.72rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.12s; }
ul { padding-left: 1.2rem; }
li { margin: 0.3rem 0; }
.muted { color: var(--muted); }
.error { color: var(--ko); }
.late { color: var(--ko); font-weight: 600; }

.booking .day-row td {
  background: var(--surface-2);
  font-family: "Varien", system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--gold); font-size: 0.78rem;
}
.tag {
  border: 1px solid var(--gold); color: var(--gold);
  border-radius: 4px; padding: 0.08rem 0.4rem;
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em;
  /* boîte insécable : un tag replié fragmente sa bordure à chaque ligne */
  display: inline-block; white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
}
.tag.special { border-color: #d69a3c; color: #d69a3c; }
.ok-tag { border-color: var(--ok); color: var(--ok); }
.cancel-tag { border-color: var(--ko); color: var(--ko); }
.fill-cell { display: flex; align-items: center; gap: 0.6rem; min-width: 120px; }
.fill-bar {
  flex: 1; height: 6px; border-radius: 3px; background: var(--surface-2);
  overflow: hidden; min-width: 54px;
  border: 1px solid var(--border);
}
.fill { height: 100%; background: var(--gold); border-radius: 3px; }
.full { color: var(--ko); text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.08em; }

/* ---- Messages flash ---- */
.flash {
  padding: 0.8rem 1.1rem;
  border-radius: var(--radius-s);
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.flash.success { border-color: var(--ok); color: var(--ok); }
.flash.error { border-color: var(--ko); color: var(--ko); }

/* ---- Avatars ---- */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--gold);
  color: var(--gold); font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* ---- Connexion / inscription ---- */
.login-box {
  max-width: 400px; margin: 8vh auto;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  padding: 2.2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.login-box label {
  display: block; margin: 0.9rem 0 0.3rem;
  font-size: 0.72rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.1em;
}
.login-box input {
  width: 100%; padding: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--text);
  font-size: 1rem;
}
.login-box input:focus { outline: none; border-color: var(--gold); }
.signup-hint { margin-top: 1.2rem; text-align: center; color: var(--muted); }

/* ---- Annuaire membres (staff) ---- */
.filter-bar { margin-bottom: 1.2rem; }
.filter-bar input[type="search"] {
  width: 100%; padding: 0.8rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--text); font-size: 1rem;
  margin-bottom: 0.7rem;
}
.filter-bar input[type="search"]:focus { outline: none; border-color: var(--gold); }
.chips { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.chip {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border); border-radius: 999px;
  color: var(--muted); text-decoration: none;
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--gold); color: var(--gold); }
.chip.active { background: var(--gold); color: var(--black); border-color: var(--gold); }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0.8rem; }
.member-tile {
  display: flex; align-items: center; gap: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  text-decoration: none; color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.member-tile:hover { border-color: var(--gold); transform: translateY(-2px); }
.tile-photo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); flex-shrink: 0; }
.tile-avatar { width: 52px; height: 52px; font-size: 1rem; }
.tile-body { flex: 1; min-width: 0; }
.tile-body .muted { font-size: 0.8rem; }
.tile-arrow { color: var(--gold); font-size: 1.2rem; }

/* ---- Icônes maison (traits dorés, style logo FS) ---- */
.icon { display: inline-block; vertical-align: -4px; flex-shrink: 0; }
h2 .icon { color: var(--gold); margin-right: 0.35rem; vertical-align: -4px; }
.icon.ok { color: var(--ok); }
.icon.ko { color: var(--ko); }
.bottom-nav .icon { width: 22px; height: 22px; }
.btn-small .icon, .btn-line .icon { vertical-align: -3px; margin-right: 0.15rem; }
.flash .icon { margin-right: 0.25rem; }
.linklike .icon { vertical-align: -4px; }
.photo-edit .icon { color: var(--black); }
.product-photo.placeholder { color: var(--gold); }
.tile-avatar .icon { color: var(--gold); vertical-align: middle; }
.lt-value .icon { vertical-align: middle; }
#fullscreen-btn .icon { vertical-align: middle; }

.rank-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  font-family: "Varien", system-ui, sans-serif;
  font-size: 0.95rem;
  border: 1.5px solid currentColor;
}
.rank-badge.rank-1 { color: var(--gold); background: rgba(206, 165, 75, 0.14); }
.rank-badge.rank-2 { color: #b9bec7; background: rgba(185, 190, 199, 0.1); }
.rank-badge.rank-3 { color: #c77b45; background: rgba(199, 123, 69, 0.1); }

/* ---- Tuiles d'information (dashboard : retards, pauses, passages…) ---- */
.list-tile {
  display: flex; align-items: center; gap: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.55rem;
  color: var(--text); text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
a.list-tile:hover { border-color: var(--gold); transform: translateY(-1px); }
.lt-body { flex: 1; min-width: 0; }
.lt-body .muted { font-size: 0.8rem; }
.lt-value {
  font-family: "Varien", system-ui, sans-serif; font-style: italic;
  color: var(--gold); white-space: nowrap; font-size: 0.95rem;
}
.lt-value.late { color: var(--ko); }
.tile-photo.small { width: 42px; height: 42px; }
.date-badge {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: var(--radius-s);
  background: var(--surface-2);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: "Varien", system-ui, sans-serif;
  line-height: 1.1;
}
.date-badge .d { font-size: 1.25rem; }
.date-badge .m { font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.08em; }
.empty-note {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

.sub-list { display: flex; flex-direction: column; gap: 0.8rem; }
.sub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.95rem 1.1rem;
}
.sub-card.current { border-color: rgba(206, 165, 75, 0.55); }
.sub-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.25rem; }

/* ---- Dashboard ---- */
.page-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
}
.head-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.daily-pass-form { display: flex; gap: 0.4rem; align-items: center; }
.daily-pass-form select {
  padding: 0.5rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-s); color: var(--text);
}
.daily-pass-form button { border: none; cursor: pointer; }

/* ---- Événements ---- */
.event-list { display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 1.6rem; }
.event-card {
  display: flex; align-items: center; gap: 1.2rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}
.event-date {
  font-family: "Varien", system-ui, sans-serif; font-style: italic;
  color: var(--gold); text-transform: uppercase; min-width: 7.5rem;
}
.event-body { flex: 1; min-width: 0; }
.event-body p { margin: 0.3rem 0; }
.propose-form { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.8rem; }
.propose-form input {
  flex: 1 1 180px; padding: 0.65rem;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-s); color: var(--text);
}
.propose-form input:focus { outline: none; border-color: var(--gold); }
.pending-card { flex-wrap: wrap; }
.validate-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.validate-form select {
  padding: 0.55rem; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-s);
  color: var(--text); max-width: 300px;
}
.validate-form select:focus { outline: none; border-color: var(--gold); }

/* ---- Classement ---- */
.period-tabs { display: flex; gap: 0.5rem; margin: 1rem 0 1.2rem; }
.period-tabs a {
  padding: 0.5rem 1.1rem; border: 1px solid var(--border); border-radius: 999px;
  color: var(--text); text-decoration: none;
  font-family: "Varien", system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem;
  transition: all 0.15s;
}
.period-tabs a.active { background: var(--gold); color: var(--black); border-color: var(--gold); }
.ranking .rank { width: 3rem; text-align: center; font-size: 1.1rem; }
.ranking .count {
  font-family: "Varien", system-ui, sans-serif; font-style: italic;
  color: var(--gold); font-size: 1.15rem;
}
.ranking tr.podium-1 td { background: rgba(206, 165, 75, 0.1); }
.ranking tr.podium-2 td { background: rgba(206, 165, 75, 0.06); }
.ranking tr.podium-3 td { background: rgba(206, 165, 75, 0.03); }

/* ---- Le club ---- */
.club-head { text-align: center; margin: 0.5rem 0 1.5rem; }
.club-logo { width: min(340px, 80vw); }
.club-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.8rem; margin-bottom: 1.5rem; }
.club-link {
  display: flex; align-items: center; gap: 0.7rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.1rem;
  color: var(--text); text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.club-link:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
/* Le lien d'invitation WhatsApp se distingue en vert WhatsApp */
.club-link[href*="chat.whatsapp.com"] { border-color: #25d366; }
.club-link[href*="chat.whatsapp.com"]:hover { border-color: #25d366; color: #25d366; }
/* Invitation à laisser un avis Google : mise en avant dorée, sur toute la largeur */
.club-link.review-link {
  grid-column: 1 / -1;
  border-color: var(--gold);
  background: linear-gradient(160deg, rgba(206, 165, 75, 0.14), var(--surface));
}
.club-link.review-link > span:first-child { font-size: 1.4rem; }
.review-text { display: flex; flex-direction: column; gap: 0.25rem; }
.review-text small { color: var(--muted); font-size: 0.82rem; }

/* ---- Séances (tuiles unifiées) ---- */
.day-head {
  font-family: "Varien", system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--gold); font-size: 0.82rem;
  margin: 1.1rem 0 0.5rem;
}
.occ-tile {
  display: flex; align-items: center; gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  margin-bottom: 0.55rem;
  color: var(--text); text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.occ-tile.linked:hover { border-color: var(--gold); transform: translateY(-2px); }
.occ-cancelled { opacity: 0.55; border-style: dashed; }
.occ-time {
  font-family: "Varien", system-ui, sans-serif; font-style: italic;
  font-size: 1.15rem; color: var(--gold);
  min-width: 3.6rem; text-align: center;
  display: flex; flex-direction: column;
}
.occ-time .muted { font-size: 0.7rem; font-style: normal; }
.occ-body { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
.occ-body .fill-cell { flex-basis: 100%; margin-top: 0.2rem; }
.occ-action { flex-shrink: 0; }
.member-tile.static:hover { border-color: var(--border); transform: none; }
.trial-input {
  padding: 0.55rem; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-s);
  color: var(--text);
}
.trial-input:focus { outline: none; border-color: var(--gold); }

/* ---- Boutique ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.6rem;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 0.15s;
}
.product-card[open], .product-card:hover { border-color: var(--gold); }
.product-card.sold-out { opacity: 0.6; }
.product-card summary { list-style: none; cursor: pointer; }
.product-card summary::-webkit-details-marker { display: none; }
.product-card summary, .summary-like { display: flex; align-items: center; gap: 0.9rem; padding: 0.8rem; }
.product-photo {
  width: 72px; height: 72px;
  border-radius: var(--radius-s);
  object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
}
.product-photo.placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
}
.product-info { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.product-price {
  font-family: "Varien", system-ui, sans-serif; font-style: italic;
  color: var(--gold); font-size: 1.1rem;
}
.product-actions {
  border-top: 1px solid var(--border);
  padding: 0.8rem;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.product-actions select, .product-actions input[type="text"] {
  padding: 0.5rem; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-s);
  color: var(--text); max-width: 100%;
}
.btn-line.gift { background: transparent; border: 1px solid var(--gold); color: var(--gold); }
.btn-line.gift:hover { background: rgba(206, 165, 75, 0.12); }
.shop-notice { display: block; text-decoration: none; }
.size-badges { display: inline-flex; gap: 0.3rem; flex-wrap: wrap; }
.prospect-form { flex-direction: column; align-items: stretch; }
.prospect-fields { display: flex; flex-direction: column; gap: 0.5rem; }
.prospect-select, .new-prospect input {
  padding: 0.65rem; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-s);
  color: var(--text); font-size: 0.95rem; width: 100%;
}
.prospect-select:focus, .new-prospect input:focus { outline: none; border-color: var(--gold); }
.new-prospect { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.5rem; }
.show-more { display: block; margin: 0.3rem auto 0; }

/* ---- Kiosque (tablette à l'entrée) ---- */
body.kiosk {
  background: var(--black); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; min-height: 100dvh; text-align: center;
  user-select: none; -webkit-user-select: none;
  touch-action: manipulation;
  overscroll-behavior: none;
}
.kiosk-logo { width: min(340px, 62vw, 40vh); margin-bottom: 0.4rem; }
.kiosk .hint {
  color: var(--gold);
  margin-top: 0;
  font-family: "Varien", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: clamp(0.85rem, 2.2vmin, 1.2rem);
}
#display {
  font-size: clamp(2.4rem, 7vmin, 4rem);
  letter-spacing: 0.5rem; margin: 1.1rem 0;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}
.keys {
  display: grid;
  grid-template-columns: repeat(3, clamp(88px, 22vmin, 150px));
  gap: clamp(10px, 1.8vmin, 18px);
  justify-content: center;
}
.keys button {
  height: clamp(70px, 16vmin, 120px);
  font-size: clamp(1.5rem, 4.5vmin, 2.4rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--surface); color: var(--white);
  cursor: pointer;
  font-family: "Varien", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.keys button:active { background: var(--surface-2); border-color: var(--gold); }
#clear { color: var(--ko); }
#go { background: var(--gold); color: var(--black); border-color: var(--gold); }
#go:active { background: var(--gold-soft); }
#fullscreen-btn {
  position: fixed; top: 12px; right: 12px;
  width: 44px; height: 44px;
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--border); border-radius: var(--radius-s);
  font-size: 1.3rem; cursor: pointer; opacity: 0.6;
}
#fullscreen-btn:hover { opacity: 1; color: var(--gold); }
#kiosk-exit {
  position: fixed; top: 12px; left: 12px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--border); border-radius: var(--radius-s);
  cursor: pointer; opacity: 0.6;
}
#kiosk-exit:hover { opacity: 1; color: var(--gold); }
.hidden { display: none !important; }
#result.granted, #result.denied, #result.warned {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.8rem;
}
#result.granted { background: #14522c; }
#result.denied { background: #8c1f28; }
#result-icon svg { width: clamp(80px, 17vmin, 130px); height: auto; display: block; }
#result-name {
  font-size: clamp(2rem, 6.5vmin, 3.6rem);
  font-family: "Varien", system-ui, sans-serif;
  font-style: italic;
  text-transform: uppercase;
  padding: 0 1rem;
}
#result-reason { font-size: clamp(1.15rem, 3.4vmin, 1.8rem); padding: 0 1.2rem; }

/* ---- Mobile ---- */
/* 1024px (et non 900) : couvre aussi l'iPad en portrait et les grands
   téléphones en paysage, qui retombaient sinon sur les barres sticky que
   Safari iOS fait décrocher pendant le scroll. */
@media (max-width: 1024px) {
  .top-links { display: none; }
  .bottom-nav { display: flex; }
  /* Coque d'app : la page ne défile plus, c'est le contenu central qui
     défile. Les barres haut/bas sont posées en statique dans la colonne —
     plus rien à "décrocher" pour Safari iOS pendant le scroll. */
  body:not(.kiosk) {
    height: 100dvh;
    height: 100svh; /* stable quand la barre d'URL de Safari se replie */
    overflow: hidden;
    overscroll-behavior: none;
  }
  body:not(.kiosk) .topbar { position: static; }
  body:not(.kiosk) .bottom-nav { position: static; }
  body:not(.kiosk) main.container {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    flex: 1 1 auto;
    min-height: 0;
    margin: 0 auto;
    padding-top: 1.2rem;
    padding-bottom: 1.2rem;
  }
}
@media (max-width: 700px) {
  .container { margin: 1rem auto; padding: 0 0.9rem; }
  h1 { font-size: 1.45rem; }
  .topbar { padding: 0.55rem 0.9rem; padding-top: calc(0.55rem + env(safe-area-inset-top)); }
  .topbar .brand img { height: 27px; }

  section > table, .booking {
    display: block; overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    border-radius: var(--radius);
  }
  /* En mode block-scroll, les lignes doivent occuper toute la largeur
     (sinon l'en-tête et les bordures s'arrêtent au contenu). */
  section > table thead, section > table tbody { display: table; width: 100%; }
  th, td { padding: 0.55rem 0.65rem; }

  .cards { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .card { padding: 0.9rem; }
  .kpi { font-size: 1.45rem; }
  .stat-row { gap: 0.45rem; }
  .stat .kpi { font-size: 1.3rem; }

  .profile-card { padding: 1.1rem; gap: 1rem; }
  .profile-photo, .avatar.avatar-profile { width: 84px; height: 84px; }
  .avatar.avatar-profile { font-size: 1.5rem; }
  .profile-card h1 { font-size: 1.25rem; }
  .belt { max-width: 210px; }

  .btn-line { padding: 0.55rem 1rem; font-size: 0.8rem; }
  .btn-small { padding: 0.65rem 1rem; }
  .period-tabs a { padding: 0.55rem 1rem; flex: 1; text-align: center; }

  .event-card { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .event-date { min-width: 0; }
  .page-head, .head-actions { width: 100%; }
  .head-actions > *, .daily-pass-form { width: 100%; }
  .daily-pass-form select { flex: 1; }
  .validate-form select { max-width: none; width: 100%; }
  .propose-form input { flex-basis: 100%; }
  .member-grid { grid-template-columns: 1fr; }
}

/* ---- Profil staff + page Squad ---- */
.stacked-form { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.form-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px; width: 100%;
}
.form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 0.85rem; color: var(--muted); }
.form-grid input, .form-grid select {
  background: var(--black); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-s);
  padding: 10px 12px; font-size: 1rem;
}
.form-grid input:focus, .form-grid select:focus { outline: none; border-color: var(--gold); }
.checkline { display: flex; align-items: flex-start; gap: 8px; color: var(--text); }
.checkline input { accent-color: var(--gold); width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.checkline > span { flex: 1; min-width: 0; }
.btn-small.danger { border-color: var(--ko); color: var(--ko); background: transparent; }
.grade-card { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.squad-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.squad-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
}
.squad-card h3 { margin: 0; }
.squad-photo {
  width: 110px; height: 110px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--gold);
}
.avatar.squad-avatar {
  width: 110px; height: 110px; font-size: 2rem; display: flex;
  align-items: center; justify-content: center;
}
.squad-card .grades-row { justify-content: center; }

/* ---- Onglets profils famille + étiquette Kids ---- */
.profile-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.profile-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 999px;
  text-decoration: none;
  font-family: "Varien", system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.78rem;
}
.profile-tab.active { border-color: var(--gold); color: var(--gold); }
.tag.tag-kid {
  background: var(--gold); color: var(--black);
  border-color: var(--gold);
  font-weight: 700;
}


/* ---- Cartes prépayées (shop membre) ---- */
.punch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.9rem; }
.punch-card {
  background: linear-gradient(135deg, rgba(206, 165, 75, 0.16), var(--surface) 55%);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.punch-card summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 14px;
  padding: 1rem 1.2rem;
}
.punch-card summary::-webkit-details-marker { display: none; }
.punch-credits {
  font-family: "Varien", system-ui, sans-serif; font-style: italic;
  font-size: 1.9rem; color: var(--gold); flex-shrink: 0;
}
.punch-credits small { font-size: 1rem; color: var(--muted); font-style: normal; }
.punch-name { display: flex; flex-direction: column; gap: 2px; }
.punch-since { font-size: 0.72rem; }
.punch-uses { border-top: 1px solid var(--border); padding: 0.7rem 1.2rem 1rem; }
.punch-use {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 0.35rem 0; font-size: 0.85rem;
  border-bottom: 1px dashed rgba(206, 165, 75, 0.2);
}
.punch-use:last-child { border-bottom: none; }


/* ---- Produits « carte prépayée » : identité visuelle dédiée ---- */
.product-card.cardpass-product {
  background: linear-gradient(135deg, rgba(206, 165, 75, 0.16), var(--surface) 55%);
  border-color: var(--gold);
}
.cardpass-icon { color: var(--gold); }
.cardpass-icon .icon { stroke: var(--gold); }
.tag.tag-cardpass { border-color: var(--gold); color: var(--gold); }

/* ---- Gestion d'abonnements (fiche membre) ---- */
.sub-manage { margin-bottom: 1.1rem; }
.sub-manage.current { border-color: var(--gold); }
.sched-table { width: 100%; border-collapse: collapse; margin: 0.6rem 0; }
.sched-table th, .sched-table td {
  text-align: left; padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--border); font-size: 0.88rem;
}
.sched-table th { color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.7rem; }
.sub-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 0.9rem; align-items: flex-start; }
.sub-actions details { flex: 1 1 100%; }
.sub-actions details summary { list-style: none; display: inline-block; cursor: pointer; }
.sub-actions details summary::-webkit-details-marker { display: none; }
.sub-actions details[open] { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s); padding: 0.9rem; }
.sub-actions details[open] summary { margin-bottom: 0.8rem; }


.shop-cat { display: block; margin-top: 1.6rem; }

/* ---- Indications de correspondance (validation de comptes) ---- */
.match-hint {
  margin-top: 6px; padding: 7px 11px;
  border-radius: var(--radius-s); font-size: 0.85rem;
  display: inline-flex; align-items: center; gap: 7px;
}
.match-hint.ok { border: 1px solid var(--ok); color: var(--ok); background: rgba(76, 175, 109, 0.08); }
.match-hint.warn { border: 1px solid var(--gold); color: var(--gold); background: rgba(206, 165, 75, 0.08); }
.match-hint.alert { border: 1px solid var(--ko); color: var(--ko); background: rgba(230, 73, 73, 0.08); }


/* ---- Produits sur commande + chartes de tailles ---- */
.tag.mto-tag { border-color: var(--gold); color: var(--gold); }
.size-chart { margin: 0.5rem 1rem 0.8rem; }
.size-chart summary {
  cursor: pointer; color: var(--gold); font-size: 0.85rem;
  list-style: none; display: inline-flex; align-items: center; gap: 6px;
}
.size-chart summary::-webkit-details-marker { display: none; }
.size-chart[open] summary { margin-bottom: 0.5rem; }
.table-scroll { overflow-x: auto; }

/* Onglet Résa : séances passées/en cours + historique replié */
.occ-past { opacity: 0.55; }
.occ-past:hover { opacity: 0.8; }
.history-block { margin-bottom: 1.1rem; }
.history-block summary { cursor: pointer; }
.history-block .day-head { opacity: 0.8; }

/* Engrenage (admin Django) : icône centrée dans son carré, collé à la déconnexion */
.top-actions { display: flex; align-items: center; gap: 0.45rem; }
.settings-link { display: inline-flex; align-items: center; justify-content: center; }

/* Habitués Daily Pass / prospects : actions (fiche, appel, SMS, e-mail) sous les infos */
.prospect-tile { flex-wrap: wrap; }
.tile-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; width: 100%; margin-top: 0.55rem; }
.tile-actions .btn-line { font-size: 0.78rem; padding: 0.4rem 0.7rem; white-space: nowrap; }

/* ---- Correction des paiements (gestion d'abonnements) ---- */
.payments-edit { display: flex; flex-direction: column; gap: 1rem; }
.payment-row { padding-bottom: 0.9rem; border-bottom: 1px dashed var(--border); }
.payment-row:last-child { border-bottom: none; padding-bottom: 0; }
.payment-row-actions { display: flex; gap: 8px; }


/* ---- Tailles épuisées : visibles mais grisées (shop membre) ---- */
.tag.size-off { opacity: 0.35; border-color: var(--border); color: var(--muted); }


/* ---- Schéma mesures kimono ---- */
.gi-diagram { max-width: 380px; margin: 0.4rem 0; }
.gi-diagram svg { width: 100%; height: auto; }
.gi-legend { font-size: 0.78rem; line-height: 1.6; }
.gi-legend strong { color: var(--gold); }


/* ---- Édition des grades (fiche membre) ---- */
.grade-dates { font-size: 0.82rem; }
.grade-edit summary { list-style: none; cursor: pointer; display: inline-block; }
.grade-edit summary::-webkit-details-marker { display: none; }
.grade-edit[open] { width: 100%; }
.grade-edit[open] summary { margin-bottom: 0.6rem; }


/* ---- Recherche dans les sélecteurs de membres ---- */
.member-filter {
  padding: 0.5rem; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-s);
  color: var(--text); max-width: 100%; width: 100%;
  margin-bottom: 4px;
}
.member-filter:focus { outline: none; border-color: var(--gold); }


/* ---- Recadrage de la photo de profil ---- */
.crop-overlay {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(0, 0, 0, 0.85);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.crop-overlay.hidden { display: none; }
.crop-box {
  background: var(--surface); border: 1px solid var(--gold);
  border-radius: var(--radius); padding: 1.2rem;
  display: flex; flex-direction: column; gap: 0.9rem; align-items: center;
  max-width: 95vw;
}
.crop-box h3 { margin: 0; }
.crop-frame {
  width: min(280px, 74vw); height: min(280px, 74vw);
  overflow: hidden; position: relative;
  border-radius: var(--radius-s); border: 2px solid var(--gold);
  background: var(--black);
  touch-action: none; cursor: grab;
}
.crop-frame img {
  position: absolute; left: 0; top: 0;
  max-width: none; user-select: none; -webkit-user-drag: none;
  pointer-events: none;
}
.crop-zoom { width: min(280px, 74vw); accent-color: var(--gold); }
/* Octogone de recadrage : ce qui sera visible partout dans l'app. */
.crop-mask { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.crop-actions { display: flex; gap: 10px; align-items: center; }
.crop-actions .btn { margin-top: 0; width: auto; }
.crop-status { margin: 0; max-width: 280px; text-align: center; font-size: 0.85rem; color: var(--muted); }
.crop-status.error { color: var(--ko); }

/* « Compléter mon profil » : la photo, en tête de « Mes infos » */
.photo-field {
  display: flex; align-items: center; gap: 0.9rem;
  margin: 0 0 1.1rem; cursor: pointer;
}
.photo-field input[type=file] { display: none; }
.photo-field .photo-thumb {
  width: 60px; height: 80px; flex-shrink: 0;
  border-radius: var(--radius-s); object-fit: cover;
  border: 2px solid var(--gold);
}
.photo-field .avatar.photo-thumb { font-size: 1.1rem; font-family: "Varien", system-ui, sans-serif; }
.photo-field.missing .photo-thumb { border-style: dashed; }
.photo-field-text { display: flex; flex-direction: column; align-items: flex-start; gap: 0.45rem; color: var(--text); }
.photo-status { color: var(--ok); font-size: 0.85rem; }
.photo-status.error { color: var(--ko); }


/* ---- Combobox membre (recherche + sélection) ---- */
.combo { position: relative; width: 100%; }
.combo-list {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 60;
  max-height: 240px; overflow-y: auto;
  /* Défiler la liste au doigt sans entraîner la page. */
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y;
  background: var(--surface-2); border: 1px solid var(--gold);
  border-radius: var(--radius-s);
  box-shadow: var(--shadow);
}
.combo-item { padding: 0.55rem 0.8rem; cursor: pointer; font-size: 0.92rem; }
.combo-item:hover, .combo-item.active { background: rgba(206, 165, 75, 0.15); color: var(--gold); }
.combo-item.combo-default { color: var(--muted); border-bottom: 1px solid var(--border); }
.combo-item.combo-more {
  color: var(--muted); font-style: italic; cursor: default;
  border-top: 1px solid var(--border); pointer-events: none;
}


/* ---- Check-in : accès accordé mais retard de paiement ---- */
#result.warned { background: #b8860b; }

/* ---- Journal & exports ---- */
.journal-filters { margin-bottom: 1rem; }
.journal-filters select {
  padding: 0.5rem; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-s);
}
.journal-list { display: flex; flex-direction: column; }
.journal-row {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 0.55rem 0.2rem; border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.journal-when { min-width: 110px; font-variant-numeric: tabular-nums; }
.journal-text a { text-decoration: none; }
.export-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; width: 100%; }

/* ---- Envoi asynchrone : toast d'état réseau + bouton occupé ---- */
.fs-toast {
  position: fixed;
  left: 50%;
  bottom: calc(4.6rem + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  max-width: min(92vw, 480px);
  padding: 0.7rem 1rem;
  border-radius: 12px;
  background: #1d1d1f;
  color: #fff;
  font-size: 0.92rem;
  line-height: 1.35;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 300;
  text-align: center;
}
.fs-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.fs-toast.ok { background: #14532d; }
.fs-toast.warn { background: #7c4a03; }
.fs-toast.err { background: #7f1d1d; }
button.is-busy { opacity: 0.55; position: relative; }

/* ---- Inscription : compte en attente de validation ---- */
.pending-note {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  font-weight: 600;
  line-height: 1.45;
}
.signup-steps { margin: 1rem 0; padding-left: 1.3rem; }
.signup-steps li { margin: 0.45rem 0; line-height: 1.45; }

.match-hint.danger {
  background: rgba(230, 73, 73, 0.12);
  border: 1px solid rgba(230, 73, 73, 0.5);
  border-radius: var(--radius-s);
  padding: 0.5rem 0.7rem;
}

/* ---- Pastille discrète : fiche membre reliée à un compte app ---- */
.acct-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  vertical-align: middle;
  margin-left: 0.3rem;
}

.dp-filter {
  width: 100%;
  max-width: 340px;
  margin-bottom: 0.8rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

/* ---- Borne : état « Vérification… » ---- */
#checking {
  text-align: center;
  color: var(--gold);
  font-family: "Varien", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: clamp(0.9rem, 2.4vmin, 1.2rem);
  margin-top: 0.4rem;
  animation: fs-pulse 1.1s ease-in-out infinite;
}
#checking.hidden { display: none; }
@keyframes fs-pulse { 50% { opacity: 0.35; } }
.keys.checking button { opacity: 0.45; pointer-events: none; }

/* ---- Tirer pour actualiser ---- */
#ptr {
  flex: none;
  height: 0;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  padding-bottom: 0;
}
#ptr.settle { transition: height 0.25s ease; }
#ptr.ready { color: var(--gold); }
#ptr > span { margin-bottom: 0.7rem; }
#ptr-icon { transition: transform 0.2s; font-size: 1rem; }
#ptr.ready #ptr-icon { transform: rotate(180deg); }
#ptr.loading #ptr-icon {
  width: 16px; height: 16px;
  border: 2px solid var(--gold);
  border-top-color: transparent;
  border-radius: 50%;
  animation: fs-spin 0.8s linear infinite;
}
@keyframes fs-spin { to { transform: rotate(360deg); } }

/* ---- En-tête de section avec action à droite ---- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.7rem;
}
.section-head h2 { margin-bottom: 0; }
.section-head .btn-small { flex-shrink: 0; }

.overdue-total {
  margin-top: 0.6rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid rgba(230, 73, 73, 0.5);
  border-radius: var(--radius-s);
  background: rgba(230, 73, 73, 0.08);
  color: var(--ko);
}

/* ---- Tuiles de répartition (tranches d'âge / durées d'abo) ---- */
.split-card { gap: 0.55rem; justify-content: center; }
.split-bar {
  display: flex; height: 9px; border-radius: 5px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border);
}
.split-bar span { display: block; min-width: 3px; }
.split-bar .s1, .split-legend .dot.s1 { background: var(--gold); }
.split-bar .s2, .split-legend .dot.s2 { background: #8d9aa8; }
.split-bar .s3, .split-legend .dot.s3 { background: var(--ok); }
.split-legend {
  display: flex; flex-wrap: wrap; gap: 0.2rem 0.8rem;
  font-size: 0.78rem; color: var(--muted); text-transform: none; letter-spacing: normal;
}
.split-legend .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 0.32rem; vertical-align: baseline;
}
.split-legend strong { color: var(--text); }
.split-legend em { font-style: normal; }
.avg-lines { display: flex; flex-direction: column; gap: 0.15rem; }
.avg-lines strong { color: var(--text); }

/* Profil : complétion (barre) + « Mon parcours » validé */
.completion-card {
  margin: 0 0 1.2rem; padding: 0.9rem 1rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  display: flex; flex-direction: column; gap: 0.45rem;
}
.completion-card small { color: var(--muted); }
.completion-card.complete { border-color: rgba(76, 175, 109, 0.5); }
.completion-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; color: var(--text); }
.completion-bar { height: 8px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.completion-bar span { display: block; height: 100%; background: var(--gold); border-radius: 5px; transition: width 0.4s ease; }
.completion-card.complete .completion-bar span { background: var(--ok); }
.parcours-card { margin-bottom: 1.4rem; text-transform: none; letter-spacing: normal; }
.parcours-card h2 { display: flex; align-items: center; gap: 0.45rem; margin: 0 0 0.4rem; }
.parcours-list { margin: 0; padding-left: 0; list-style: none; color: var(--text); }
.parcours-list li { padding: 0.25rem 0; }
.pending-list { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.8rem; }
.pending-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem; }
.parcours-review { border-color: var(--gold); }
.review-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.7rem;
  padding: 0.6rem 0; border-bottom: 1px solid var(--border);
}
.review-row .review-summary { flex: 1 1 18rem; color: var(--text); }
.review-reject { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; flex: 1 1 16rem; }
.review-row input[name=reason], .stacked-form textarea {
  flex: 1 1 12rem; width: 100%; background: var(--black); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-s); padding: 0.55rem 0.7rem;
  font: inherit;
}
.stacked-form textarea { display: block; margin-top: 0.3rem; }

/* Profil : tuile « Accès libre à la salle » (code de la boîte à clé) */
.keybox-card { margin-bottom: 1.4rem; text-transform: none; letter-spacing: normal; }
.keybox-card h2 { display: flex; align-items: center; gap: 0.45rem; margin: 0 0 0.4rem; }
.keybox-card.keybox-ok { border-color: var(--gold); }
.keybox-code-line { color: var(--text); font-size: 0.95rem; }
.keybox-code {
  font-family: "Varien", system-ui, sans-serif; font-size: 1.9rem; letter-spacing: 0.25em;
  color: var(--gold); margin-left: 0.3rem; white-space: nowrap;
}
.keybox-note { color: var(--text); margin: 0.2rem 0; }
.birth-form {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.8rem;
  padding: 0.5rem 0; border-bottom: 1px solid var(--border);
}
.birth-form a { min-width: 11rem; }
.birth-form input[type=date] { width: auto; }

/* Classement des Rois : ma place (et celle de mes enfants), même hors top 20 */
.ranking tr.is-me td { background: rgba(206, 165, 75, 0.12); }
.my-rank {
  margin-top: 1rem; padding: 0.9rem 1rem;
  border: 1px solid var(--gold); border-radius: var(--radius-s);
  background: rgba(206, 165, 75, 0.06);
}
.my-rank-line { color: var(--text); font-weight: 600; padding: 0.15rem 0; }
.my-rank-rule { margin: 0.6rem 0 0; font-size: 0.8rem; }

/* Fréquentation moyenne : menu Club / membre (combobox). */
.freq-card .combo, .freq-card .combo-list {
  text-transform: none; letter-spacing: normal;
}
.freq-card .member-filter { font-size: 0.85rem; padding: 0.45rem 0.6rem; }
.freq-card .combo-item { color: var(--text); }
.freq-card .combo-item.combo-default, .freq-card .combo-item.combo-more { color: var(--muted); }
.kpi-unit { font-size: 0.9rem; color: var(--muted); letter-spacing: 0.02em; }
#freq-detail { text-transform: none; letter-spacing: normal; }

/* ---- Chargement lent : page floutée + octogone FS qui tourne ---- */
#nav-loading {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 10, 8, 0.35);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
#nav-loading.show {
  opacity: 1;
  /* Jamais de pointer-events : même si l'overlay reste coincé (restauration
     bfcache iOS après un swipe retour), les taps passent au travers. */
}
#nav-loading img {
  width: 88px;
  height: 88px;
  animation: fs-octagon-spin 1.2s linear infinite;
  filter: drop-shadow(0 0 18px rgba(206, 165, 75, 0.35));
}
@keyframes fs-octagon-spin {
  to { transform: rotate(360deg); }
}

/* Tuiles avec formulaires de correction : le select des moyens de paiement
   passe à la ligne au lieu d'écraser la date et le prix (mobile). */
.list-tile.wrap-tile { flex-wrap: wrap; }
.list-tile.wrap-tile .lt-body { min-width: 150px; }
details > .list-tile.wrap-tile { margin-top: 0.6rem; }

/* ---- Fiche membre : boutons dépliables espacés + lignes compte parent ---- */
details.fiche-action { margin: 0.5rem 0; }
details.fiche-action[open] { margin-bottom: 1rem; }
@media (max-width: 700px) { .hide-narrow { display: none; } }
.guardian-line {
  margin: 0.35rem 0 0;
  padding: 0.4rem 0.7rem;
  display: inline-block;
  background: rgba(206, 165, 75, 0.1);
  border: 1px solid rgba(206, 165, 75, 0.35);
  border-radius: var(--radius-s);
  font-size: 0.88rem;
  color: var(--text);
}
.guardian-line a { color: var(--gold); }

/* ---- Fiche événement (admin) ---- */
.event-hero { padding: 1.4rem; }
.event-hero-top { display: flex; gap: 1.2rem; align-items: flex-start; }
.event-hero-body h1 { margin: 0 0 0.3rem; font-size: 1.5rem; }
.event-date-big {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 74px; height: 74px;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  background: rgba(206, 165, 75, 0.08);
}
.edb-day { font-family: "Varien", system-ui, sans-serif; font-style: italic; font-size: 1.7rem; color: var(--gold); line-height: 1; }
.edb-month { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.7rem; color: var(--muted); margin-top: 3px; }
.event-badges { margin: 0.5rem 0; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.event-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.7rem;
  margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--border);
}
.event-stat {
  text-align: center; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.68rem;
  display: flex; flex-direction: column; gap: 0.15rem; align-items: center;
}
.event-stat .kpi { font-size: 1.5rem; }
.kpi-max { font-size: 0.9rem; color: var(--muted); font-style: normal; }
.gauge {
  width: 100%; max-width: 130px; height: 6px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px;
  overflow: hidden; margin-top: 0.3rem;
}
.gauge-fill { height: 100%; background: var(--gold); border-radius: 4px; transition: width 0.4s; }
.gauge-fill.full { background: var(--ko); }
.reg-tile.pending { border-left: 3px solid var(--gold); }
.reg-actions { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.collect-form { display: inline-flex; gap: 0.4rem; align-items: center; }
.collect-form select { padding: 0.4rem 0.5rem; }
.event-desc { display: block; margin: 0.6rem 0; }
.event-desc textarea { width: 100%; }
.event-edit { margin-top: 0.8rem; }
@media (max-width: 700px) {
  .event-hero-top { flex-direction: row; }
  .reg-actions { justify-content: flex-start; width: 100%; margin-top: 0.5rem; }
  .list-tile.reg-tile { flex-wrap: wrap; }
}

.tag.pending-tag { border-color: rgba(206, 165, 75, 0.6); color: var(--gold); }

/* ---- Affiche & horaire des événements ---- */
.event-poster-hero {
  width: 100%; max-height: 320px; object-fit: cover;
  border-radius: var(--radius-s); margin-bottom: 1rem;
  border: 1px solid var(--border);
}
.event-card.has-poster { flex-direction: column; align-items: stretch; overflow: hidden; }
.event-card.has-poster .event-card-row { align-items: center; }
.event-card .event-poster {
  width: 100%; max-height: 260px; object-fit: cover; display: block;
  border-radius: var(--radius-s) var(--radius-s) 0 0;
  margin: -1rem -1.1rem 0.2rem;
  width: calc(100% + 2.2rem);
}
.event-card-row { display: flex; gap: 1.2rem; align-items: center; width: 100%; }
.event-card-row .event-body { flex: 1; min-width: 0; }
.event-gauge-line { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.4rem; }
.event-gauge-line .gauge { margin-top: 0; flex: 1; max-width: 180px; }
@media (max-width: 700px) {
  .event-card-row { flex-direction: column; align-items: stretch; gap: 0.6rem; }
  .event-card-row .event-action { width: 100%; }
  .event-card-row .event-action .btn-line { width: 100%; text-align: center; }
}
.event-time { display: block; font-size: 0.78rem; color: var(--gold); margin-top: 2px; }
.event-poster-field { display: block; margin: 0.6rem 0; }
.poster-current { display: flex; align-items: center; gap: 1rem; margin: 0.5rem 0; }
.poster-current img { width: 110px; border-radius: var(--radius-s); border: 1px solid var(--border); }

.rate-badge { color: var(--gold); }
.collect-form .amount-input {
  width: 84px;
  padding: 0.4rem 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--text);
  text-align: right;
}
.collect-form .amount-input:focus { outline: none; border-color: var(--gold); }

.event-delete { display: block; margin-top: 1.2rem; }

.tag.late-tag { border-color: rgba(214, 154, 60, 0.7); color: #d69a3c; }
.tag.pause-tag { border-color: var(--border); color: var(--muted); }

/* ---- Respiration entre les boutons d'action et les stats ---- */
.page-head { margin-bottom: 1.2rem; }
.head-actions { row-gap: 0.5rem; }

.card-select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--gold);
  font: inherit;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.3rem;
}

/* ---- Tuiles participants de séance : sur mobile, les boutons passent
   sous le nom au lieu de comprimer la colonne texte ---- */
@media (max-width: 700px) {
  .member-tile.static { flex-wrap: wrap; }
  .member-tile.static .tile-body { flex: 1 1 60%; min-width: 55%; }
}

/* ---- Photos de profil en octogone (partout dans l'app) ----
   Octogone régulier : coins coupés à 29,29 % du côté. Bord doré = fond du
   cadre + padding : deux octogones concentriques, bord d'épaisseur égale
   sur les 8 côtés (clip-path couperait une vraie bordure aux coins). */
.oct {
  --oct: polygon(29.29% 0, 70.71% 0, 100% 29.29%, 100% 70.71%, 70.71% 100%, 29.29% 100%, 0 70.71%, 0 29.29%);
  --s: 42px;
  --bw: 2px;
  display: inline-flex; flex-shrink: 0; box-sizing: border-box;
  width: var(--s); height: var(--s); padding: var(--bw);
  background: var(--gold);
  clip-path: var(--oct);
  vertical-align: middle;
}
.oct > img, .oct > span {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  clip-path: var(--oct);
}
.oct > img { object-fit: cover; object-position: 50% 30%; background: var(--surface-2); }
.oct-initials > span {
  background: var(--surface-2); color: var(--gold);
  font-family: "Varien", system-ui, sans-serif; font-weight: 700;
  text-transform: uppercase; line-height: 1;
  font-size: calc(var(--s) * 0.32);
}
.oct-initials .icon { color: var(--gold); }
.oct-xs { --s: 34px; }
.oct-sm { --s: 42px; }
.oct-md { --s: 52px; }
.oct-lg { --s: 110px; --bw: 3px; }
.oct-xl { --s: 150px; --bw: 3px; }
.oct-xxl { --s: 180px; --bw: 3px; }
@media (max-width: 700px) {
  .oct-xl { --s: 108px; }
}
@media (max-width: 430px) {
  .oct-xxl { --s: 150px; }
}
.photo-field .oct { --s: 72px; }
.photo-field.missing .oct { background: repeating-linear-gradient(45deg, var(--gold) 0 6px, transparent 6px 10px); }
.profile-photo-wrap .photo-form { right: -6px; bottom: -6px; }

/* ---- Classement des Rois : lignes cliquables + fiche pop-up ---- */
.rank-hint { margin: -0.4rem 0 0.6rem; font-size: 0.8rem; }
.ranking tr.rank-row { cursor: pointer; }
.ranking tr.rank-row:hover td { background: rgba(206, 165, 75, 0.08); }
.rank-member {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: none; border: 0; padding: 0; margin: 0;
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.rank-member:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.rank-name { text-decoration: underline; text-decoration-color: rgba(206, 165, 75, 0.45); text-underline-offset: 3px; }
body.mcard-open { overflow: hidden; }
.mcard-overlay {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(0, 0, 0, 0.8);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.mcard-overlay.hidden { display: none; }
.mcard {
  position: relative; width: min(420px, 100%); max-height: 88vh; overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--gold); border-radius: var(--radius);
  padding: 1.4rem 1.2rem 1.2rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}
.mcard:focus { outline: none; }
/* Reste visible en haut de la fiche quand on la fait défiler (sticky),
   sans décaler le contenu : la marge basse annule toute sa hauteur. */
.mcard-close {
  position: sticky; top: -0.8rem; z-index: 1;
  display: block; margin: -0.8rem -0.6rem calc(-36px + 0.8rem) auto;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  font-size: 1rem; cursor: pointer;
}
.mcard-head { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-align: center; }
.mcard-head h2 { margin: 0.3rem 0 0; }
.mcard-rank { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); }
.mcard-pos { font-family: "Varien", system-ui, sans-serif; color: var(--gold); }
.mcard-stat {
  display: flex; align-items: center; gap: 0.8rem;
  margin: 1rem 0 0.4rem; padding: 0.7rem 0.9rem;
  border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface-2);
}
.mcard-stat .kpi { font-size: 1.8rem; color: var(--gold); }
.mcard-stat small { display: block; font-size: 0.75rem; }
.mcard h3 { margin: 1rem 0 0.4rem; font-size: 0.95rem; }
.mcard .grades-row { justify-content: flex-start; }
.mcard-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

/* ---- Profil coach (présenté comme le profil membre) ---- */
.coach-week { margin-bottom: 1.4rem; }
.coach-infos h2 { margin-top: 0; }
.info-list { display: grid; grid-template-columns: max-content 1fr; gap: 0.45rem 1rem; margin: 0.6rem 0 0; }
.info-list dt { color: var(--muted); font-size: 0.85rem; }
.coach-infos { text-transform: none; letter-spacing: normal; }
.info-list dd { margin: 0; overflow-wrap: anywhere; color: var(--text); }
@media (max-width: 430px) {
  .info-list { grid-template-columns: 1fr; gap: 0.1rem; }
  .info-list dd { margin-bottom: 0.5rem; }
}
.grad-item form.inline { margin-top: 0.4rem; }

/* ---- Événements : carte partagée membres / gestion ---- */
.event-title { overflow-wrap: anywhere; }
a.event-title { color: var(--text); text-decoration: none; }
a.event-title:hover strong { color: var(--gold); }
.event-card-detail { margin-bottom: 1rem; }
.event-card-detail h1.event-title { font-size: 1.45rem; margin: 0 0 0.3rem; }
.event-card-detail .event-poster { max-height: 320px; }
.event-stats-panel .event-stats { margin-top: 0; padding-top: 0; border-top: 0; }
.past-events { margin-top: 0.8rem; }
.past-events .event-card { opacity: 0.8; }
.proposal { display: flex; flex-direction: column; gap: 0.5rem; }
.proposal .event-card { border-color: rgba(206, 165, 75, 0.6); }
.proposal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.proposal-actions .muted { font-size: 0.8rem; flex-basis: 100%; }
h2 a.section-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 0.35rem; }
h2 a.section-link:hover { color: var(--gold); }
h2 a.section-link .tile-arrow { font-size: 1rem; }
.proposal-actions .btn-line { display: inline-flex; align-items: center; min-height: 2.4rem; }

/* Bouton WhatsApp (fiche membre, prospects) */
.btn-line.wa-btn { background: #25d366; color: #06210f; }
.btn-line.wa-btn:hover { background: #1fb855; }

/* Boutons grisés tant que le formulaire n'est pas complet (cours d'essai,
   Daily Pass…) */
.btn:disabled, .btn-line:disabled, .btn-small:disabled {
  opacity: 0.4; filter: grayscale(0.7); cursor: not-allowed; transform: none;
}
.consent-note { font-size: 0.82rem; margin: 0.2rem 0 0.4rem; }

/* ---- Board rangé par catégories (retour Basile, 08.10) ---- */
.board-cat { margin: 1.6rem 0 0.8rem; }
.board-cat:first-of-type { margin-top: 0.6rem; }
section.cards + section.panel, section.cards + section.cards { margin-top: -0.4rem; }
/* Tuiles d'encaissement par tranche d'âge : plus larges, une par ligne sur
   téléphone — les montants ne débordent jamais de la tuile. */
.cards.cards-wide { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card .kpi { line-height: 1.15; }
.kpi .nowrap { white-space: nowrap; }  /* un montant ne se coupe jamais au milieu */
.month-lines, .rev-rows { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 0.2rem; }
.month-row, .month-line > summary, .rev-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem;
  text-transform: none; letter-spacing: normal; font-size: 0.85rem; color: var(--muted);
  min-width: 0;
}
.month-row strong, .month-line strong, .rev-row strong { color: var(--text); white-space: nowrap; }
.month-row.late strong, .month-row.late .ml-label { color: var(--ko); }
.ml-label::first-letter { text-transform: uppercase; }
.month-line > summary { cursor: pointer; list-style: none; padding: 0.15rem 0; border-bottom: 1px dashed var(--border); }
.month-line > summary::-webkit-details-marker { display: none; }
.month-line > summary .ml-label::after { content: " ▾"; color: var(--gold); font-size: 0.75rem; }
.month-line[open] > summary .ml-label::after { content: " ▴"; }
.month-line ul { margin: 0.3rem 0 0.4rem; padding-left: 1rem; text-transform: none; letter-spacing: normal; font-size: 0.8rem; }
.month-line li { margin: 0.1rem 0; overflow-wrap: anywhere; }
.rev-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label amount" "share share";
  row-gap: 0; padding: 0.25rem 0; border-bottom: 1px dashed var(--border);
}
.rev-row:last-child { border-bottom: 0; }
.rev-row .rv-label { grid-area: label; color: var(--text); }
.rev-row .rv-amount { grid-area: amount; }
.rev-row .rv-share { grid-area: share; font-size: 0.78rem; }
@media (max-width: 700px) {
  .cards.cards-wide { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .cards .dues-card { grid-column: 1 / -1; }  /* montants sur une ligne */
}

/* Téléphones étroits (320–380 px) : une tuile large n'élargit jamais sa
   colonne au-delà de l'écran ; les longs mots se coupent proprement. */
@media (max-width: 700px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { min-width: 0; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
  .card .kpi { -webkit-hyphens: none; hyphens: none; }
  .card-select { max-width: 100%; }
}
/* Graphiques en pleine largeur : hauteur plafonnée sur ordinateur */
#chart-checkins, #chart-revenue { max-height: 300px; }
