/* ==========================================================================
   CLS Membres — feuille de style
   Mobile d'abord · barre d'onglets en bas sur téléphone, colonne latérale sur ordinateur
   ========================================================================== */

:root {
  --red: #E3051A;
  --red-dark: #B80415;
  --red-soft: #FDE8EA;
  --ink: #16181D;
  --ink-2: #4A4F5A;
  --muted: #7A808C;
  --line: #E8E8EB;
  --bg: #F6F6F7;
  --card: #FFFFFF;
  --field: #FFFFFF;
  --green: #1E9E5A;
  --green-soft: #E3F5EB;
  --amber: #D98A00;
  --amber-soft: #FFF3D6;
  --blue: #2563EB;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 2px 8px rgba(16,24,40,.05);
  --shadow-lg: 0 20px 50px rgba(16,24,40,.22);
  --radius: 16px;
  --radius-sm: 10px;
  --tabbar-h: 64px;
  --topbar-h: 56px;
  --sidebar-w: 260px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-d: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  color-scheme: light;
}

/* Thème sombre : au choix du membre (Profil → Apparence). Le thème clair est celui par défaut. */
:root[data-theme="sombre"] {
    --ink: #F2F2F0;
    --ink-2: #C5C8CF;
    --muted: #8D93A0;
    --line: #2A2D34;
    --bg: #0F1013;
    --card: #181A1F;
    --field: #1F2229;
    --red-soft: #3A1116;
    --green-soft: #12301F;
    --amber-soft: #33270B;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --ink: #F2F2F0;
    --ink-2: #C5C8CF;
    --muted: #8D93A0;
    --line: #2A2D34;
    --bg: #0F1013;
    --card: #181A1F;
    --field: #1F2229;
    --red-soft: #3A1116;
    --green-soft: #12301F;
    --amber-soft: #33270B;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-d); letter-spacing: .01em; line-height: 1.1; margin: 0; }
p { margin: 0 0 .75em; }
.ic { width: 22px; height: 22px; flex: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }

/* ---------- Structure --------------------------------------------------- */
.main {
  padding: calc(var(--topbar-h) + var(--safe-t) + 16px) 16px calc(var(--tabbar-h) + var(--safe-b) + 24px);
  max-width: 760px;
  margin: 0 auto;
}
.main.wide { max-width: 1120px; }
.is-guest .main { padding: 0; max-width: none; }
.is-admin .main { padding-top: calc(var(--topbar-h) + var(--safe-t) + 64px); }

.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  height: calc(var(--topbar-h) + var(--safe-t));
  padding: var(--safe-t) 8px 0;
  display: flex; align-items: center; gap: 8px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { flex: 1; font-size: 1.35rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; }
.topbar-actions { display: flex; gap: 2px; }
.topbar-btn {
  position: relative; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 12px; text-decoration: none; color: var(--ink);
}
.topbar-btn:active { background: var(--line); }
.topbar-btn .dot {
  position: absolute; top: 6px; right: 5px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--card);
}
.brand-mini { padding: 0 6px; text-decoration: none; }

.brand-mark {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--red); color: #fff;
  font-family: var(--font-d); font-weight: 800; font-size: 15px; letter-spacing: .04em;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.18);
}

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 600;
  min-height: 44px;
}
.tabbar a.active { color: var(--red); }
.tabbar a.active .ic { stroke-width: 2.4; }

.sidebar { display: none; }

.admin-tabs {
  position: fixed; top: calc(var(--topbar-h) + var(--safe-t)); left: 0; right: 0; z-index: 29;
  display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px;
  background: var(--card); border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs a {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 7px 12px; border-radius: 999px; font-size: 14px; font-weight: 600;
  text-decoration: none; color: var(--ink-2); background: var(--bg);
}
.admin-tabs a .ic { width: 16px; height: 16px; }
.admin-tabs a.active { background: var(--ink); color: var(--card); }

@media (min-width: 960px) {
  .sidebar {
    display: flex; flex-direction: column;
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 30;
    padding: 20px 14px; background: var(--card); border-right: 1px solid var(--line);
    overflow-y: auto;
  }
  .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 4px 8px 20px; }
  .brand-mark { width: 44px; height: 44px; font-size: 17px; }
  .brand-text { display: flex; flex-direction: column; line-height: 1.15; }
  .brand-text strong { font-family: var(--font-d); font-size: 1.25rem; text-transform: uppercase; }
  .brand-text small { color: var(--muted); font-size: .8rem; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; }
  .side-nav a {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
    text-decoration: none; font-weight: 600; color: var(--ink-2);
  }
  .side-nav a:hover { background: var(--bg); color: var(--ink); }
  .side-nav a.active { background: var(--red-soft); color: var(--red); }
  .side-nav .pill { margin-left: auto; background: var(--red); color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 8px; }
  .side-title { margin: 22px 12px 6px; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .side-nav-admin a { padding: 8px 12px; font-size: .95rem; }
  .side-nav-admin .ic { width: 19px; height: 19px; }
  .side-foot { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 6px; }
  .side-install {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
    border: 1px dashed var(--line); background: none; cursor: pointer; font-weight: 600; color: var(--ink-2);
  }
  .side-install:hover { border-color: var(--red); color: var(--red); }
  .side-me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; text-decoration: none; font-weight: 600; }
  .side-me:hover { background: var(--bg); }

  .topbar, .tabbar, .admin-tabs { display: none; }
  body:not(.is-guest) .main { margin-left: calc(var(--sidebar-w) + max(0px, (100vw - var(--sidebar-w) - 760px) / 2)); margin-right: auto; padding: 32px 32px 48px; }
  body:not(.is-guest) .main.wide { margin-left: var(--sidebar-w); max-width: 1180px; padding: 32px 40px 48px; }
  .desk-title { display: flex !important; }
}

/* ---------- Titres de page ---------------------------------------------- */
.desk-title { display: none; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.desk-title h1 { font-size: 2.3rem; text-transform: uppercase; }
.desk-title p { margin: 4px 0 0; color: var(--muted); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 12px; }
.section-title h2 { font-size: 1.35rem; text-transform: uppercase; }
.section-title a { font-size: .9rem; font-weight: 600; color: var(--red); text-decoration: none; }

/* ---------- Cartes ------------------------------------------------------- */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.card-pad { padding: 16px; }
@media (min-width: 600px) { .card-pad { padding: 20px; } }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 16px; }
.grid-2 { display: grid; gap: 12px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }

/* ---------- Boutons ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn .ic { width: 19px; height: 19px; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-dark { background: var(--ink); color: var(--card); }
.btn-outline { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg); }
.btn-danger { background: transparent; color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .875rem; border-radius: 10px; }
.btn-lg { min-height: 52px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- Formulaires ------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .label { font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.field small { color: var(--muted); font-size: .8rem; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 11px 14px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--field); color: var(--ink);
  font: inherit; font-size: 16px; /* évite le zoom iOS */
  transition: border-color .15s ease, box-shadow .15s ease;
}
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 18%, transparent); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%237A808C' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
.form-grid { display: grid; gap: 14px; }
@media (min-width: 640px) {
  .form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .form-grid .span-all { grid-column: 1 / -1; }
}
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--red); margin: 1px 0 0; flex: none; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 56px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); font-size: .8rem; font-weight: 700; padding: 8px; cursor: pointer; }
.file-drop {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px dashed var(--line);
  border-radius: 12px; cursor: pointer; color: var(--ink-2); font-weight: 600;
}
.file-drop:hover { border-color: var(--red); color: var(--red); }
.file-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-preview { margin-top: 8px; border-radius: 12px; max-height: 220px; object-fit: cover; width: 100%; }

/* ---------- Flash / toast ------------------------------------------------ */
.flash {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; font-weight: 600;
  background: var(--green-soft); color: var(--green);
}
.flash-error { background: var(--red-soft); color: var(--red); }
.flash-info { background: var(--amber-soft); color: var(--amber); }
.flash-x { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: inherit; opacity: .6; }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); z-index: 80;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--card); padding: 12px 18px; border-radius: 12px; font-weight: 600;
  box-shadow: var(--shadow-lg); transition: all .25s ease; max-width: calc(100vw - 32px);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
@media (min-width: 960px) { .toast { bottom: 24px; left: calc(50% + var(--sidebar-w) / 2); } }

/* ---------- Avatars ------------------------------------------------------ */
.avatar {
  --h: 0; display: inline-grid; place-items: center; flex: none; border-radius: 50%; object-fit: cover;
  background: hsl(var(--h) 55% 88%); color: hsl(var(--h) 45% 30%); font-weight: 700;
}
:root[data-theme="sombre"] .avatar { background: hsl(var(--h) 30% 25%); color: hsl(var(--h) 60% 85%); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .avatar { background: hsl(var(--h) 30% 25%); color: hsl(var(--h) 60% 85%); } }
.avatar-xs { width: 28px; height: 28px; font-size: 11px; }
.avatar-sm { width: 36px; height: 36px; font-size: 13px; }
.avatar-md { width: 44px; height: 44px; font-size: 15px; }
.avatar-lg { width: 88px; height: 88px; font-size: 30px; }

/* ---------- Chips / badges ---------------------------------------------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 4px; margin: 0 -16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 960px) { .chips { flex-wrap: wrap; margin: 0; padding: 0; } }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px;
  border-radius: 999px; border: 1.5px solid var(--line); background: var(--card);
  font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap; color: var(--ink-2);
}
.chip[aria-pressed="true"], .chip.active { background: var(--ink); border-color: var(--ink); color: var(--card); }
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
  font-size: .75rem; font-weight: 700; letter-spacing: .02em; background: var(--bg); color: var(--ink-2);
}
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-dark { background: var(--ink); color: var(--card); }

/* ---------- Fil / sorties ---------------------------------------------- */
.composer { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.composer-fake { flex: 1; min-height: 44px; display: flex; align-items: center; padding: 0 16px; border-radius: 999px; background: var(--bg); color: var(--muted); font-weight: 500; }

.announce {
  display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--red), #A3000F); color: #fff;
}
.announce .ic { margin-top: 2px; }
.announce h3 { font-family: var(--font); font-size: 1rem; font-weight: 700; margin-bottom: 2px; }
.announce p { margin: 0; opacity: .92; font-size: .95rem; }
.announce a { color: #fff; font-weight: 700; }

.club-week { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.club-week > div { padding: 14px 6px; }
.club-week > div + div { border-left: 1px solid var(--line); }
.big-num { font-family: var(--font-d); font-weight: 800; font-size: 1.75rem; line-height: 1; }
.big-num small { font-size: .9rem; font-weight: 700; color: var(--muted); margin-left: 2px; }
.stat-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 4px; }

.leader { list-style: none; margin: 0; padding: 0; }
.leader li { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); }
.leader li:first-child { border-top: 0; }
.leader .rank { width: 24px; font-family: var(--font-d); font-weight: 800; font-size: 1.2rem; color: var(--muted); text-align: center; }
.leader li:nth-child(1) .rank { color: #D4A017; }
.leader .who { flex: 1; font-weight: 600; text-decoration: none; }
.leader .val { font-family: var(--font-d); font-weight: 700; font-size: 1.15rem; }

.post { overflow: hidden; }
.post-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 0; }
.post-head .who { flex: 1; min-width: 0; }
.post-head .who a { font-weight: 700; text-decoration: none; }
.post-head .meta { font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.post-menu { position: relative; }
.post-body { padding: 10px 16px 0; }
.post-title { font-family: var(--font); font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; line-height: 1.25; }
.post-text { color: var(--ink-2); overflow-wrap: anywhere; }
.post-text a { color: var(--red); }
.post-stats { display: flex; gap: 0; padding: 12px 16px 2px; }
.post-stats > div { flex: 1; min-width: 0; }
.post-stats > div + div { border-left: 1px solid var(--line); }
.post-stats > div + div { padding-left: 10px; }
.post-stats .v { font-family: var(--font-d); font-weight: 700; font-size: clamp(1.15rem, 5.4vw, 1.45rem); line-height: 1.1; white-space: nowrap; }
.post-stats .v small { font-size: .78rem; color: var(--muted); font-weight: 600; margin-left: 1px; }
.post-stats .l { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.post-photo { margin-top: 12px; width: 100%; max-height: 480px; object-fit: cover; background: var(--bg); cursor: zoom-in; }
.post-link { display: flex; align-items: center; gap: 10px; margin: 12px 16px 0; padding: 10px 12px; border-radius: 12px; background: var(--bg); text-decoration: none; font-weight: 600; font-size: .92rem; }
.post-link .ic { color: var(--red); }
.post-link span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-actions { display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px; margin-top: 10px; border-top: 1px solid var(--line); }
.act { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 12px; border: 0; background: none; border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--ink-2); font-size: .92rem; }
.act:hover { background: var(--bg); }
.act.on { color: var(--red); }
.act.on .ic { fill: currentColor; fill-opacity: .15; }
.act.pop .ic { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.35); } }
.kudos-faces { margin-left: auto; display: flex; padding-right: 8px; }
.kudos-faces .avatar { border: 2px solid var(--card); margin-left: -8px; }
.comments { padding: 0 16px 14px; }
.comment { display: flex; gap: 10px; margin-top: 12px; }
.comment-bubble { flex: 1; min-width: 0; background: var(--bg); padding: 8px 12px; border-radius: 4px 14px 14px 14px; }
.comment-bubble b { font-size: .88rem; }
.comment-bubble p { margin: 2px 0 0; font-size: .95rem; overflow-wrap: anywhere; }
.comment-meta { font-size: .75rem; color: var(--muted); margin-top: 3px; display: flex; gap: 10px; }
.comment-meta button { border: 0; background: none; padding: 0; color: var(--muted); cursor: pointer; font-size: .75rem; text-decoration: underline; }
.comment-form { display: flex; gap: 8px; margin-top: 12px; }
.comment-form .input { min-height: 42px; border-radius: 999px; padding: 8px 16px; }
.comment-form .btn { border-radius: 999px; }

.menu-pop {
  position: absolute; right: 0; top: 100%; z-index: 20; min-width: 180px; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
}
.menu-pop button, .menu-pop a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; border-radius: 8px; text-align: left; cursor: pointer; font-weight: 600; text-decoration: none; font-size: .92rem; }
.menu-pop button:hover, .menu-pop a:hover { background: var(--bg); }
.menu-pop .danger { color: var(--red); }
.menu-pop .ic { width: 18px; height: 18px; }

.load-more { display: flex; justify-content: center; margin-top: 16px; }

/* ---------- Feuille modale (bottom sheet sur mobile) --------------------- */
.sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(10,10,14,.5); animation: fade .2s ease; }
.sheet-panel {
  position: relative; width: 100%; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); border-radius: 22px 22px 0 0; padding: 8px 16px calc(20px + var(--safe-b));
  animation: up .28s cubic-bezier(.2,.9,.3,1);
}
.sheet-panel::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h2 { font-size: 1.5rem; text-transform: uppercase; }
@media (min-width: 700px) {
  .sheet { align-items: center; padding: 24px; }
  .sheet-panel { max-width: 620px; border-radius: 22px; padding: 12px 24px 24px; animation: zoom .22s ease; }
  .sheet-panel::before { display: none; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes zoom { from { transform: scale(.96); opacity: 0; } }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 9px 6px; border-radius: 9px; font-weight: 600; font-size: .9rem; cursor: pointer; color: var(--ink-2); }
.seg input:checked + span { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--red); }
.duration { display: flex; align-items: center; gap: 6px; }
.duration .input { text-align: center; }
.duration span { font-weight: 600; color: var(--muted); }

/* ---------- Parcours ----------------------------------------------------- */
.searchbar { position: relative; }
.searchbar .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 20px; height: 20px; }
.searchbar .input { padding-left: 44px; border-radius: 14px; }
.filters { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 16px; }
.cards-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .cards-grid.three { grid-template-columns: repeat(3, 1fr); } }
.route-card { display: flex; flex-direction: column; text-decoration: none; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.route-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(16,24,40,.1); }
.route-visual {
  position: relative; height: 92px; overflow: hidden;
  background: linear-gradient(135deg, #1B1D22, #2E3139);
}
.route-visual svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.route-visual .badge { position: absolute; top: 10px; left: 10px; }
.route-visual .km { position: absolute; right: 12px; bottom: 6px; color: #fff; font-family: var(--font-d); font-weight: 800; font-size: 2.1rem; line-height: 1; }
.route-visual .km small { font-size: 1rem; opacity: .75; margin-left: 2px; }
.route-info { padding: 12px 14px 14px; }
.route-info h3 { font-family: var(--font); font-size: 1.05rem; font-weight: 700; line-height: 1.25; }
.route-meta { display: flex; gap: 14px; margin-top: 6px; font-size: .88rem; color: var(--muted); font-weight: 600; flex-wrap: wrap; }
.route-meta span { display: inline-flex; align-items: center; gap: 5px; }
.route-meta .ic { width: 16px; height: 16px; }
.diff { display: inline-flex; gap: 3px; }
.diff i { width: 7px; height: 14px; border-radius: 2px; background: var(--line); }
.diff i.on { background: var(--red); }
.embed { position: relative; width: 100%; border-radius: var(--radius); overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-garmin { aspect-ratio: 4 / 5; }
@media (min-width: 700px) { .embed-garmin { aspect-ratio: 16 / 11; } }
.embed-video { aspect-ratio: 16 / 9; }
.map-fallback { height: 100%; display: grid; place-items: center; padding: 20px; background: linear-gradient(135deg, #1B1D22, #2E3139); }
.map-fallback svg { width: 100%; height: 100%; }
.route-visual svg.real { inset: 8px 90px 8px 70px; width: auto; height: calc(100% - 16px); }
.map { height: 360px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); z-index: 1; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.kv > div { padding: 12px 4px; }
.kv > div + div { border-left: 1px solid var(--line); }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ic { width: 44px; height: 44px; margin: 0 auto 10px; color: var(--line); stroke-width: 1.5; }
.empty h3 { font-family: var(--font); font-size: 1.1rem; color: var(--ink); margin-bottom: 4px; }

/* ---------- Vidéos ------------------------------------------------------- */
.video-card { display: flex; flex-direction: column; overflow: hidden; text-align: left; cursor: pointer; padding: 0; border: 1px solid var(--line); background: var(--card); }
.video-thumb { position: relative; aspect-ratio: 16 / 9; background: #111; overflow: hidden; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.video-card:hover .video-thumb img { transform: scale(1.04); }
.video-thumb .play { position: absolute; inset: 0; display: grid; place-items: center; }
.video-thumb .play span { width: 56px; height: 56px; border-radius: 50%; background: rgba(227,5,26,.92); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.video-thumb .play .ic { fill: #fff; width: 22px; height: 22px; margin-left: 3px; }
.video-info { padding: 12px 14px 14px; }
.video-info h3 { font-family: var(--font); font-size: 1rem; font-weight: 700; line-height: 1.3; }
.video-info p { margin: 4px 0 0; font-size: .88rem; color: var(--muted); }
.video-info .row { margin-top: 8px; }

/* ---------- Nutrition ---------------------------------------------------- */
.partner-hero {
  position: relative; overflow: hidden; border-radius: var(--radius); padding: 22px 20px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #6B2BD9 0%, #C2188F 45%, #E3051A 100%);
}
.partner-hero::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; border: 28px solid rgba(255,255,255,.08); }
.partner-hero .eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.partner-hero h2 { font-size: 2rem; text-transform: uppercase; margin: 6px 0 8px; }
.partner-hero p { opacity: .92; max-width: 46ch; }
.promo {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px;
}
.promo-code {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 14px;
  background: rgba(255,255,255,.14); border: 1.5px dashed rgba(255,255,255,.55);
  font-family: var(--font-d); font-size: 1.6rem; font-weight: 800; letter-spacing: .08em;
}
.promo-code button { border: 0; background: #fff; color: var(--ink); border-radius: 10px; padding: 8px 12px; font-family: var(--font); font-size: .85rem; font-weight: 700; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; letter-spacing: 0; }
.promo-code button .ic { width: 16px; height: 16px; }
.tools { display: grid; gap: 10px; }
@media (min-width: 640px) { .tools { grid-template-columns: repeat(3, 1fr); } }
.tool { display: flex; gap: 12px; align-items: flex-start; padding: 14px; text-decoration: none; }
.tool .ic-wrap { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); }
.tool h3 { font-family: var(--font); font-size: 1rem; font-weight: 700; }
.tool p { margin: 2px 0 0; font-size: .88rem; color: var(--muted); }
.advice { padding: 0; overflow: hidden; }
.advice summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 16px; cursor: pointer; }
.advice summary::-webkit-details-marker { display: none; }
.advice summary h3 { flex: 1; font-family: var(--font); font-size: 1.02rem; font-weight: 700; }
.advice summary .chev { transition: transform .2s ease; color: var(--muted); }
.advice[open] summary .chev { transform: rotate(90deg); }
.advice .advice-body { padding: 0 16px 16px; color: var(--ink-2); }
.advice .advice-body p { margin: 0 0 .5em; }

/* ---------- Profil ------------------------------------------------------- */
.profile-head { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px 16px 18px; }
.profile-head h2 { font-size: 1.8rem; text-transform: uppercase; margin-top: 12px; }
.profile-head .bio { margin: 6px 0 0; color: var(--ink-2); max-width: 44ch; }
.avatar-edit { position: relative; }
.avatar-edit label { position: absolute; right: -2px; bottom: -2px; width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; cursor: pointer; border: 3px solid var(--card); }
.avatar-edit .ic { width: 16px; height: 16px; }
.stats-4 { display: grid; grid-template-columns: repeat(2, 1fr); }
.stats-4 > div { padding: 14px; text-align: center; }
.stats-4 > div:nth-child(odd) { border-right: 1px solid var(--line); }
.stats-4 > div:nth-child(n+3) { border-top: 1px solid var(--line); }
@media (min-width: 600px) {
  .stats-4 { grid-template-columns: repeat(4, 1fr); }
  .stats-4 > div { border: 0 !important; }
  .stats-4 > div + div { border-left: 1px solid var(--line) !important; }
}
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; width: 100%; border: 0; background: none; text-align: left; cursor: pointer; font-weight: 600; }
.list-row:hover { background: color-mix(in srgb, var(--bg) 70%, transparent); }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .sub { display: block; font-size: .85rem; color: var(--muted); font-weight: 500; }
.list-row .ic-wrap { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--bg); color: var(--ink-2); flex: none; }
.list-row .ic-wrap .ic { width: 20px; height: 20px; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .2s ease; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s ease; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }

.members-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.member-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 18px 12px; text-decoration: none; }
.member-card b { line-height: 1.2; }
.member-card small { color: var(--muted); }

/* ---------- Notifications ----------------------------------------------- */
.notif { display: flex; gap: 12px; padding: 14px 16px; text-decoration: none; }
.notif + .notif { border-top: 1px solid var(--line); }
.notif .ic-wrap { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--bg); color: var(--ink-2); }
.notif.unread .ic-wrap { background: var(--red-soft); color: var(--red); }
.notif .ic-wrap .ic { width: 19px; height: 19px; }
.notif b { display: block; }
.notif p { margin: 2px 0 0; color: var(--ink-2); font-size: .93rem; }
.notif time { font-size: .78rem; color: var(--muted); }
.push-cta { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.push-cta .ic-wrap { width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber); }
.push-cta p { margin: 0; font-size: .9rem; color: var(--muted); }
.push-cta b { display: block; }

/* ---------- Admin -------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }
@media (max-width: 700px) {
  .table.responsive thead { display: none; }
  .table.responsive tr { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table.responsive tr:last-child { border-bottom: 0; }
  .table.responsive td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; }
  .table.responsive td[data-label]::before { content: attr(data-label); font-size: .78rem; color: var(--muted); font-weight: 600; }
  .table.responsive td.primary { font-size: 1.02rem; }
  .table.responsive .actions { justify-content: flex-start; padding-top: 8px; }
}
.kpis { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 800px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { padding: 16px; }
.kpi .big-num { font-size: 2.1rem; }
.cred {
  padding: 18px; border-radius: var(--radius); background: var(--green-soft); border: 1.5px solid color-mix(in srgb, var(--green) 30%, transparent);
}
.cred h3 { font-family: var(--font); font-size: 1.05rem; color: var(--green); margin-bottom: 10px; }
.cred dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 12px; }
.cred dt { color: var(--ink-2); font-weight: 600; }
.cred dd { margin: 0; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 1.05rem; font-weight: 700; }
.cred pre { white-space: pre-wrap; background: var(--card); border-radius: 10px; padding: 12px; font-family: var(--font); font-size: .92rem; margin: 0 0 10px; border: 1px solid var(--line); }

/* ---------- Connexion ---------------------------------------------------- */
.auth {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px calc(24px + var(--safe-b));
  background:
    radial-gradient(900px 500px at 110% -10%, rgba(227,5,26,.20), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(227,5,26,.12), transparent 60%),
    var(--bg);
}
.auth-card { width: 100%; max-width: 420px; padding: 28px 22px; }
@media (min-width: 500px) { .auth-card { padding: 36px 34px; } }
.auth-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; margin-bottom: 26px; }
.auth-brand .brand-mark { width: 64px; height: 64px; border-radius: 18px; font-size: 22px; }
.auth-brand h1 { font-size: 2rem; text-transform: uppercase; }
.auth-brand p { margin: 0; color: var(--muted); }
.auth-foot { text-align: center; margin-top: 18px; font-size: .88rem; color: var(--muted); }
.auth-foot a { color: var(--red); font-weight: 600; }

/* ---------- Pop-up d'installation --------------------------------------- */
.install { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; }
.install-backdrop { position: absolute; inset: 0; background: rgba(10,10,14,.55); animation: fade .25s ease; }
.install-card {
  position: relative; width: 100%; max-width: 480px; background: var(--card);
  border-radius: 24px 24px 0 0; padding: 22px 20px calc(16px + var(--safe-b));
  box-shadow: var(--shadow-lg); animation: up .32s cubic-bezier(.2,.9,.3,1);
}
@media (min-width: 700px) {
  .install { align-items: center; }
  .install-card { border-radius: 24px; animation: zoom .25s ease; padding-bottom: 16px; }
}
.install-x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; border-radius: 10px; cursor: pointer; color: var(--muted); }
.install-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; padding-right: 30px; }
.install-head img { border-radius: 14px; box-shadow: var(--shadow); }
.install-head h2 { font-size: 1.45rem; text-transform: uppercase; }
.install-head p { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.install-variant { display: none; }
.install[data-show="ios-safari"] [data-variant="ios-safari"],
.install[data-show="ios-other"] [data-variant="ios-other"],
.install[data-show="prompt"] [data-variant="prompt"],
.install[data-show="android-manual"] [data-variant="android-manual"],
.install[data-show="mac-safari"] [data-variant="mac-safari"],
.install[data-show="desktop-manual"] [data-variant="desktop-manual"],
.install[data-show="unsupported"] [data-variant="unsupported"],
.install[data-show="samsung"] [data-variant="samsung"],
.install[data-show="samsung-installed"] [data-variant="samsung-installed"],
.install[data-show="android-inapp"] [data-variant="android-inapp"] { display: block; }
.install-variant > .install-note:first-child { margin: 0 0 14px; }
.install-note > span { flex: 1; }
.install-chrome { margin: 4px 0 14px; }
.install-after { margin-bottom: 4px; }
.install-small { margin: 12px 0 0; color: var(--muted); font-size: .85rem; line-height: 1.45; }
.install-small a { color: var(--red); font-weight: 600; }
.install-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.install-steps li { display: flex; gap: 12px; align-items: flex-start; }
.step-n { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--ink); color: var(--card); display: grid; place-items: center; font-weight: 700; font-size: .88rem; }
.kbd { display: inline-grid; place-items: center; width: 28px; height: 28px; vertical-align: middle; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); color: var(--blue); margin: 0 2px; }
.kbd .ic { width: 17px; height: 17px; }
.install-note { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--amber-soft); color: var(--ink-2); font-size: .88rem; }
.install-note .ic { width: 18px; height: 18px; color: var(--amber); margin-top: 1px; }
.install-foot { display: flex; justify-content: center; margin-top: 10px; }
.install-arrow { display: none; }
@media (max-width: 699px) {
  .install[data-show="ios-safari"] .install-card { margin-bottom: 18px; border-radius: 24px; width: calc(100% - 16px); }
  .install[data-show="ios-safari"] .install-arrow {
    display: block; position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%);
    width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 14px solid var(--card);
  }
  .install.ipad[data-show="ios-safari"] { align-items: flex-start; }
  .install.ipad .install-arrow { display: none !important; }
}

/* ---------- Divers ------------------------------------------------------- */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.lightbox img { max-height: 100%; max-width: 100%; object-fit: contain; border-radius: 6px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }
.tag-line { display: flex; gap: 6px; flex-wrap: wrap; }
.help { font-size: .88rem; color: var(--muted); }
.help a { color: var(--red); }
.pwd-rules { font-size: .82rem; color: var(--muted); margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ==========================================================================
   v2 — photos du club, sorties de groupe, défis, annonces, bénévolat, boutique
   ========================================================================== */

/* Logo du club */
.brand-mark { position: relative; overflow: hidden; }
.brand-mark img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 3px; }
.brand-mark:has(img) { box-shadow: 0 0 0 1px var(--line); }
.brand-mark i { font-style: normal; }
.brand-lg { width: 76px !important; height: 76px !important; border-radius: 20px !important; font-size: 24px !important; }

@media (min-width: 960px) {
  .side-nav a { padding: 8px 12px; }
  .side-title { margin-top: 16px; }
}
.mobile-only { display: inline-flex; }
@media (min-width: 960px) { .mobile-only { display: none !important; } }

/* Bandeaux photo */
.photo-hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #2A0006, #7A0010 55%, #E3051A);
}
.photo-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: var(--photo); background-size: cover; background-position: center;
}
.photo-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10,10,14,.15) 0%, rgba(10,10,14,.55) 55%, rgba(10,10,14,.82) 100%);
}
.page-hero { border-radius: var(--radius); padding: 20px 18px; min-height: 150px; display: flex; align-items: flex-end; margin-bottom: 16px; }
.page-hero h1 { font-size: 2rem; text-transform: uppercase; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.page-hero p { margin: 6px 0 0; max-width: 60ch; opacity: .92; font-size: .98rem; }
.page-hero .btn { margin-top: 12px; }
@media (min-width: 700px) { .page-hero { min-height: 200px; padding: 28px 30px; } .page-hero h1 { font-size: 2.6rem; } }

.home-hero { border-radius: var(--radius); margin-bottom: 14px; min-height: 250px; display: flex; align-items: flex-end; }
.home-hero-in { padding: 20px 18px; width: 100%; }
.home-hero small { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .75rem; opacity: .85; }
.home-hero h1 { font-size: 2.2rem; text-transform: uppercase; margin: 4px 0 10px; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.home-hero p { opacity: .92; margin: 0; }
@media (min-width: 700px) { .home-hero { min-height: 300px; } .home-hero-in { padding: 28px 30px; } .home-hero h1 { font-size: 2.8rem; } }
.next-ride {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; text-decoration: none; color: #fff;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.next-ride .ic-wrap { width: 40px; height: 40px; border-radius: 10px; background: #fff; color: var(--red); display: grid; place-items: center; flex: none; }
.next-ride .grow { display: flex; flex-direction: column; min-width: 0; }
.next-ride b { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-ride small { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: .8rem; opacity: .9; }
.btn-glass { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-glass:hover { background: rgba(255,255,255,.26); }

.auth.photo-hero { color: var(--ink); }
.auth.photo-hero::after { background: linear-gradient(180deg, rgba(10,10,14,.35), rgba(10,10,14,.65)); }
.auth .auth-card { box-shadow: var(--shadow-lg); }

/* Onglet Club */
.hub { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 800px) { .hub { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
.hub-tile { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-height: 150px; padding: 14px; text-decoration: none; color: #fff; border: 0; }
.hub-photo { position: absolute; inset: 0; z-index: -2; background: var(--photo) center / cover, linear-gradient(135deg, #2A0006, #E3051A); transition: transform .4s ease; }
.hub-tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,10,14,.05), rgba(10,10,14,.78)); }
.hub-tile:hover .hub-photo { transform: scale(1.05); }
.hub-tile .ic-wrap { position: absolute; top: 12px; left: 12px; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.92); color: var(--red); }
.hub-tile .ic-wrap .ic { width: 20px; height: 20px; }
.hub-tile b { font-size: 1.05rem; line-height: 1.2; }
.hub-tile small { font-size: .8rem; opacity: .9; }
@media (min-width: 800px) { .hub-tile { min-height: 190px; padding: 18px; } .hub-tile b { font-size: 1.2rem; } }

/* Sorties de groupe */
.day-label { font-family: var(--font-d); font-weight: 700; text-transform: uppercase; font-size: 1rem; color: var(--muted); margin: 10px 2px -2px; letter-spacing: .04em; }
.event-card { display: flex; gap: 14px; padding: 14px; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.event-card:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(16,24,40,.08); }
.event-card.is-cancelled { opacity: .6; }
.event-card.is-cancelled h3 { text-decoration: line-through; }
.event-date { width: 58px; flex: none; border-radius: 12px; background: var(--red); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 0; line-height: 1; }
.event-date b { font-family: var(--font-d); font-size: 1.8rem; }
.event-date span { font-size: .75rem; font-weight: 700; text-transform: uppercase; margin-top: 2px; }
.event-date small { margin-top: 6px; font-size: .78rem; font-weight: 700; background: rgba(255,255,255,.2); padding: 2px 6px; border-radius: 6px; }
.event-body { flex: 1; min-width: 0; }
.event-body h3 { font-family: var(--font); font-size: 1.08rem; font-weight: 700; margin: 6px 0 2px; line-height: 1.25; }
.event-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.event-hero { border-radius: var(--radius); padding: 22px 18px; min-height: 220px; display: flex; flex-direction: column; justify-content: flex-end; }
.event-hero h1 { font-size: 2rem; text-transform: uppercase; margin: 10px 0 8px; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.event-when { display: flex; align-items: center; gap: 8px; margin: 2px 0; font-weight: 600; }
.event-when .ic { width: 18px; height: 18px; }
.event-hero .badge:not(.badge-red) { background: rgba(255,255,255,.2); color: #fff; }
.rsvp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rsvp button { min-height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: .92rem; }
.rsvp button .ic { width: 18px; height: 18px; }
.rsvp .on.yes { background: var(--green); border-color: var(--green); color: #fff; }
.rsvp .on.maybe { background: var(--amber); border-color: var(--amber); color: #fff; }
.rsvp .on.no { background: var(--ink); border-color: var(--ink); color: var(--card); }
.weather { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.weather .ic-wrap { width: 42px; height: 42px; border-radius: 12px; background: #E8F1FF; color: var(--blue); display: grid; place-items: center; flex: none; }
.weather .grow { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.weather-now { display: flex; align-items: center; gap: 6px; font-family: var(--font-d); font-size: 1.8rem; }
.wx-emo { font-size: 1.8rem; }
.picker-list { max-height: 260px; overflow-y: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; }
.picker-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-top: 1px solid var(--line); background: var(--card); text-align: left; cursor: pointer; font-weight: 600; font-size: .92rem; }
.picker-item:first-child { border-top: 0; }
.picker-item:hover { background: var(--bg); }
.picker-item .grow, .picked .grow { flex: 1; min-width: 0; }
.picked { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--red-soft); }
.picked .ic-wrap { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--red); color: #fff; flex: none; }
.picked small { display: block; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; font-weight: 600; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Import GPX + tracé sur les publications */
.import-box { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: var(--bg); }
.import-box .file-drop { background: var(--card); }
.gpx-help summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--red); list-style: none; }
.gpx-help summary::-webkit-details-marker { display: none; }
.gpx-help summary .ic { width: 16px; height: 16px; }
.gpx-help .stack { margin-top: 8px; color: var(--ink-2); }
.post-trace { position: relative; margin: 12px 16px 0; height: 150px; border-radius: 12px; background: linear-gradient(135deg, #1B1D22, #2E3139); padding: 12px; }
.post-trace svg { width: 100%; height: 100%; }
.post-trace .badge { position: absolute; right: 10px; bottom: 10px; background: rgba(255,255,255,.15); color: #fff; }

/* Défis */
.challenge { overflow: hidden; }
.challenge.is-done { border-color: color-mix(in srgb, var(--green) 45%, var(--line)); }
.challenge-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 8px; }
.challenge-head h3 { font-family: var(--font); font-size: 1.15rem; font-weight: 700; }
.challenge-head p { margin: 2px 0 0; }
.challenge-emoji { width: 52px; height: 52px; flex: none; border-radius: 14px; background: var(--amber-soft); display: grid; place-items: center; font-size: 1.8rem; }
.challenge-emoji.sm { width: 38px; height: 38px; font-size: 1.3rem; border-radius: 10px; }
.challenge-emoji.faded { filter: grayscale(1); opacity: .5; }
.progress-wrap { padding: 4px 16px 16px; }
.progress { height: 10px; border-radius: 999px; background: var(--bg); overflow: hidden; margin-top: 6px; border: 1px solid var(--line); }
.progress span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--red), #FF5A3C); transition: width .6s ease; }
.is-done .progress span { background: linear-gradient(90deg, var(--green), #34C77B); }
.challenge-board { border-top: 1px solid var(--line); }
.challenge-board summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 12px 16px; cursor: pointer; font-weight: 600; font-size: .92rem; }
.challenge-board summary::-webkit-details-marker { display: none; }
.challenge-board summary .chev { margin-left: auto; transition: transform .2s ease; }
.challenge-board[open] summary .chev { transform: rotate(90deg); }
.leader li.me { background: var(--red-soft); }
.leader .who { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mini-progress { display: block; height: 4px; border-radius: 4px; background: var(--bg); overflow: hidden; max-width: 160px; }
.mini-progress span { display: block; height: 100%; background: var(--red); }
.chip-sep { width: 1px; background: var(--line); margin: 4px 2px; flex: none; }
.badges-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.medal { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 84px; text-align: center; }
.medal > span { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; background: radial-gradient(circle at 30% 30%, #FFF4C8, #F2C94C); box-shadow: 0 0 0 3px #fff, 0 0 0 5px #F2C94C; }
.medal small { font-size: .72rem; font-weight: 600; color: var(--ink-2); line-height: 1.2; }
.medal.sm { width: auto; }
.medal.sm > span { width: 36px; height: 36px; font-size: 1.1rem; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #F2C94C; }

/* Petites annonces */
.annonce-card { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; }
.annonce-card.is-closed { opacity: .55; }
.annonce-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--bg); display: grid; place-items: center; overflow: hidden; }
.annonce-thumb img { width: 100%; height: 100%; object-fit: cover; }
.annonce-thumb .badge { position: absolute; top: 10px; left: 10px; }
.annonce-ic { width: 64px; height: 64px; border-radius: 18px; background: var(--card); color: var(--muted); display: grid; place-items: center; }
.annonce-ic .ic { width: 30px; height: 30px; }
.price { font-family: var(--font-d); font-weight: 800; font-size: 1.7rem; color: var(--red); margin: 4px 0; }
.price.sm { font-size: 1.25rem; margin: 2px 0 0; }
.price small { font-family: var(--font); font-size: .75rem; font-weight: 600; }
.annonce-photo { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); cursor: zoom-in; }
.seg-wrap { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .seg-wrap { grid-template-columns: repeat(4, 1fr); } }

/* Bénévolat */
.poste.is-mine { background: var(--green-soft); }
.names { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.name-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 2px; border-radius: 999px; background: var(--bg); font-size: .8rem; font-weight: 600; }
.name-chip .avatar { width: 22px; height: 22px; font-size: 9px; }

/* Boutique */
.shop-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .shop-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1250px) { .shop-grid { grid-template-columns: repeat(4, 1fr); } }
.product { display: flex; flex-direction: column; overflow: hidden; }
.product-img { aspect-ratio: 1; background: #fff; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.product-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.product-ph { font-family: var(--font-d); font-weight: 800; font-size: 2rem; color: var(--line); }
.product-body { display: flex; flex-direction: column; gap: 8px; padding: 12px; flex: 1; }
.product-body h3 { font-family: var(--font); font-size: .98rem; font-weight: 700; line-height: 1.25; }
.product-body .row { margin-top: auto; }
.sizes { display: flex; flex-wrap: wrap; gap: 5px; }
.sizes label { position: relative; }
.sizes input { position: absolute; opacity: 0; }
.sizes span { display: grid; place-items: center; min-width: 38px; height: 34px; padding: 0 6px; border-radius: 8px; border: 1.5px solid var(--line); font-size: .8rem; font-weight: 700; cursor: pointer; }
.sizes input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--card); }
.sizes input:focus-visible + span { outline: 2px solid var(--red); }
.input.sm, .select.sm { min-height: 38px; padding: 6px 10px; font-size: 15px; border-radius: 10px; }
.select.sm { padding-right: 34px; }
.qty { width: 62px; text-align: center; flex: none; }
.stepper { display: inline-flex; align-items: center; gap: 4px; border: 1.5px solid var(--line); border-radius: 10px; padding: 2px; }
.stepper button { width: 32px; height: 32px; border: 0; background: none; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.stepper button:hover { background: var(--bg); }
.stepper .ic { width: 16px; height: 16px; }
.stepper b { min-width: 20px; text-align: center; }

/* Nutrition : logo partenaire */
.partner-logo { position: relative; z-index: 1; height: 42px; width: auto; background: #fff; border-radius: 10px; padding: 6px 10px; margin-bottom: 12px; }
.grow { flex: 1; min-width: 0; }
a.chip { text-decoration: none; }
.product .row { gap: 6px; }
.product .qty { width: 50px; padding: 6px 4px; }
.product .row .btn { padding: 0 10px; min-width: 0; }
@media (max-width: 420px) { .product .row .btn .ic { display: none; } .product-body { padding: 10px; } .sizes span { min-width: 34px; } }

/* ==========================================================================
   v3 — refonte « app de club » : fond blanc, cartes grises arrondies,
   en-tête sombre sur l'accueil, barre du bas flottante avec bouton central.
   Couleurs du club conservées : rouge #E3051A, noir, blanc.
   ========================================================================== */
:root {
  --bg: #FFFFFF;
  --surface: #F3F3F5;
  --surface-2: #E9E9EC;
  --dark: #16181D;
  --radius: 22px;
  --radius-sm: 14px;
  --tabbar-h: 72px;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: none;
  --shadow-card: 0 10px 30px rgba(16,24,40,.08);
}
:root[data-theme="sombre"] { --bg: #0F1013; --surface: #1A1C21; --surface-2: #24272E; --dark: #0A0B0D; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { --bg: #0F1013; --surface: #1A1C21; --surface-2: #24272E; --dark: #0A0B0D; } }

body { font-size: 15.5px; letter-spacing: -.005em; }
h1, h2, h3 { font-family: var(--font); font-weight: 800; letter-spacing: -.01em; }
.big-num, .route-visual .km, .price, .leader .rank, .leader .val, .post-stats .v, .weather-now, .promo-code { font-family: var(--font-d); }

/* Cartes : surface grise, sans bordure */
.card { background: var(--surface); border: 0; box-shadow: none; border-radius: var(--radius); }
.card .card { background: var(--card); }
.auth-card, .sheet .card { background: var(--card); }
.list-row:hover { background: color-mix(in srgb, var(--card) 60%, transparent); }
.list > li, .leader li, .post-actions, .challenge-board, .notif + .notif, .club-week > div + div, .kv > div + div { border-color: color-mix(in srgb, var(--ink) 8%, transparent); }
.badge { background: var(--card); }
.sheet .seg, .sheet .import-box { background: var(--surface); }
.sheet .seg input:checked + span { background: var(--card); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.chip { border: 0; background: var(--surface); min-height: 40px; }
.chip[aria-pressed="true"], .chip.active { background: var(--dark); color: #fff; }
.input, .select, .textarea { border-radius: 14px; }
.btn { border-radius: 14px; font-weight: 700; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #000; }
:root[data-theme="sombre"] .btn-dark { background: #F2F2F0; color: #111; }
.btn-outline { background: var(--card); border: 1.5px solid var(--line); }
.section-title { margin: 26px 0 12px; }
.section-title h2 { font-size: 1.15rem; text-transform: none; }
.section-title a { color: var(--muted); font-weight: 600; }
.desk-title h1 { font-size: 2rem; text-transform: none; }
.topbar-title { font-family: var(--font); font-size: 1.05rem; font-weight: 800; text-transform: none; }
.topbar { border-bottom: 0; box-shadow: 0 1px 0 var(--line); }
.page-hero { border-radius: var(--radius); }
.page-hero h1, .home-hero h1, .event-hero h1 { text-transform: none; }
.sheet-head h2, .install-head h2, .auth-brand h1, .profile-head h2 { text-transform: none; }
.sheet-panel { border-radius: 28px 28px 0 0; }
@media (min-width: 700px) { .sheet-panel { border-radius: 28px; } }
.hub-tile { border-radius: var(--radius); }
.hub-tile .ic-wrap { border-radius: 12px; }
.announce { border-radius: var(--radius); background: var(--dark); }
.announce .ic { color: var(--red); }
.push-cta .ic-wrap, .tool .ic-wrap, .notif .ic-wrap { border-radius: 14px; }
.flash { border-radius: 14px; }

/* Logo : pastille blanche arrondie */
.brand-mark { border-radius: 12px; background: #fff; }
.brand-mark img { padding: 2px; }

/* ---------- Barre du bas flottante ---------------------------------------- */
.tabbar {
  grid-template-columns: 1fr 1fr 76px 1fr 1fr;
  align-items: center;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding: 0 10px var(--safe-b);
  background: var(--card);
  border-top: 0;
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -6px 30px rgba(16,24,40,.10);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.tabbar a { gap: 2px; font-size: 10.5px; color: var(--muted); }
.tab-ic { width: 46px; height: 36px; border-radius: 13px; display: grid; place-items: center; position: relative; transition: background .2s ease; }
.tabbar a.active { color: var(--ink); }
.tabbar a.active .tab-ic { background: var(--surface); }
.tabbar a.active .tab-ic::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 16px; height: 3px; border-radius: 3px; background: var(--red); transform: translateX(-50%); }
.tab-label { font-weight: 600; letter-spacing: .01em; }
.tab-fab {
  justify-self: center; width: 62px; height: 62px; margin-top: -30px; border: 0; border-radius: 20px; cursor: pointer;
  display: grid; place-items: center; background: var(--red); color: #fff;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--red) 40%, transparent), 0 0 0 6px var(--card);
  transition: transform .12s ease;
}
.tab-fab:active { transform: scale(.94); }
.tab-fab .ic { width: 28px; height: 28px; stroke-width: 2.6; }
.main { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 36px); }

/* Feuille « + » */
.quick-panel { display: flex; flex-direction: column; gap: 8px; }
.quick-item { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: var(--surface); text-decoration: none; }
.quick-item:active { transform: scale(.99); }
.quick-item b { display: block; font-size: .98rem; }
.quick-item small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.quick-item > .ic { color: var(--muted); width: 18px; height: 18px; }
.quick-ic { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--red); color: #fff; }
.quick-ic.dark { background: var(--dark); }
.quick-ic.soft { background: var(--card); color: var(--ink); }
:root[data-theme="sombre"] .quick-ic.dark { background: #2A2D34; }

/* Bouton flottant (liste des sorties) */
.fab {
  position: fixed; z-index: 25; left: 16px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px);
  display: inline-flex; align-items: center; gap: 8px; min-height: 50px; padding: 0 20px;
  border-radius: 16px; background: var(--dark); color: #fff; text-decoration: none; font-weight: 700;
  box-shadow: 0 12px 28px rgba(16,24,40,.28);
}
.fab .ic { width: 20px; height: 20px; }

/* ---------- Pages « immersives » : pas de barre du haut sur mobile -------- */
@media (max-width: 959px) {
  .is-immersive .topbar { display: none; }
  .is-immersive .main { padding-top: 0; }
}

/* ---------- Accueil -------------------------------------------------------- */
.home-head {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  margin: 0 -16px; padding: calc(var(--safe-t) + 18px) 18px 64px;
  background: #121317; border-radius: 0 0 32px 32px;
}
.home-head::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: var(--photo) center / cover; opacity: .28; filter: grayscale(.4);
}
.home-head::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(18,19,23,.55), rgba(18,19,23,.92) 70%),
              radial-gradient(420px 220px at 100% 0%, color-mix(in srgb, var(--red) 45%, transparent), transparent 70%);
}
.home-brand { display: flex; align-items: center; justify-content: center; gap: 10px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.12); }
.home-brand .brand-mark { width: 40px; height: 40px; }
.home-brand > span { display: flex; flex-direction: column; font-weight: 800; font-size: 1.05rem; line-height: 1.05; letter-spacing: -.01em; }
.home-brand small { font-size: .72rem; font-weight: 600; opacity: .65; letter-spacing: .08em; }
.home-user { display: flex; align-items: center; gap: 14px; }
.home-avatar { flex: none; border-radius: 50%; padding: 3px; background: #fff; }
.home-avatar .avatar-lg { width: 62px; height: 62px; font-size: 22px; }
.home-user h1 { font-size: 1.45rem; font-weight: 700; line-height: 1.15; }
.home-user p { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-weight: 600; font-size: .9rem; opacity: .85; }
.home-user p .ic { width: 16px; height: 16px; }
.home-btns { display: flex; gap: 8px; align-self: flex-end; }
.round-btn { position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.1); }
.round-btn .ic { width: 21px; height: 21px; }
.round-btn .dot { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid #121317; }

.shortcuts {
  position: relative; z-index: 2; margin: -40px 0 6px; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border-radius: 24px; padding: 14px 4px;
  box-shadow: var(--shadow-card);
}
.shortcuts a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 2px; text-decoration: none; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.shortcuts a + a { border-left: 1px solid color-mix(in srgb, var(--ink) 9%, transparent); }
.shortcuts .ic { width: 26px; height: 26px; color: var(--ink); stroke-width: 1.8; }
.shortcuts a:active .ic { color: var(--red); }

.bookings { display: flex; flex-direction: column; gap: 14px; }
.booking { position: relative; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--dark); box-shadow: var(--shadow-card); }
.booking.is-cancelled { opacity: .6; border-left-color: var(--muted); }
.booking-link { display: block; padding: 14px 16px 16px; text-decoration: none; }
.booking-when { display: block; padding: 0 0 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); font-weight: 800; font-size: .95rem; text-transform: uppercase; letter-spacing: .01em; padding-right: 90px; }
.booking-body { display: flex; align-items: center; gap: 14px; padding-right: 54px; }
.booking-thumb { width: 60px; height: 60px; flex: none; border-radius: 16px; background: var(--photo) center / cover, linear-gradient(135deg, #2A0006, var(--red)); }
.booking-title { display: block; font-weight: 800; font-size: 1.08rem; line-height: 1.2; }
.booking-sub { display: block; color: var(--muted); font-weight: 500; margin-top: 3px; font-size: .92rem; }
.booking-pill { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: var(--surface); font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--ink-2); }
.booking-pill .ic { width: 14px; height: 14px; }
.booking-x { position: absolute; right: 14px; bottom: 16px; margin: 0; }
.booking-x button { width: 46px; height: 46px; border: 0; border-radius: 14px; background: var(--red-soft); color: var(--red); display: grid; place-items: center; cursor: pointer; }
.booking-x button .ic { width: 20px; height: 20px; }
.home-section { margin-bottom: 8px; }
.home-section .section-title { margin-top: 22px; }

/* ---------- Liste des sorties --------------------------------------------- */
.ev-switch { display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 18px; border: 1.5px solid var(--line); margin-bottom: 14px; }
.ev-switch-ic { width: 38px; display: grid; place-items: center; color: var(--ink-2); }
.ev-switch-ic .ic { width: 20px; height: 20px; }
.ev-switch a { flex: 1; text-align: center; padding: 9px 8px; border-radius: 13px; text-decoration: none; font-weight: 700; font-size: .92rem; color: var(--muted); }
.ev-switch a.active { background: var(--surface); color: var(--ink); }

.day-strip { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 8px; padding: 6px 16px 12px; scroll-snap-type: x proximity; scrollbar-width: none; }
.day-strip::-webkit-scrollbar { display: none; }
.day { position: relative; flex: none; width: 64px; padding: 10px 0 12px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; scroll-snap-align: start; color: var(--ink); transition: background .2s ease, color .2s ease; }
.day small { font-size: .66rem; font-weight: 700; letter-spacing: .03em; color: var(--muted); }
.day b { font-size: 1.55rem; font-weight: 800; line-height: 1.1; }
.day.empty { opacity: .38; pointer-events: none; }
.day.has:hover { background: var(--surface); }
.day.active { background: var(--dark); color: #fff; box-shadow: 0 8px 20px rgba(16,24,40,.25); }
.day.active small { color: rgba(255,255,255,.7); }
.day-dot { position: absolute; bottom: 5px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--red); }
:root[data-theme="sombre"] .day.active { background: #F2F2F0; color: #111; }
:root[data-theme="sombre"] .day.active small { color: #555; }

.ev-list { display: flex; flex-direction: column; gap: 12px; }
.ev-day { position: relative; margin: 18px 0 8px; padding-bottom: 10px; font-size: 1.02rem; font-weight: 800; letter-spacing: .01em; scroll-margin-top: calc(var(--topbar-h) + var(--safe-t) + 16px); }
.ev-day:first-child { margin-top: 4px; }
.ev-day span { font-weight: 700; }
.ev-day::after { content: ""; position: absolute; left: 0; bottom: 0; width: 34px; height: 4px; border-radius: 4px; background: var(--dark); }
:root[data-theme="sombre"] .ev-day::after { background: var(--red); }
.ev-row { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.ev-time { width: 74px; flex: none; align-self: stretch; max-height: 104px; margin: auto 0; border-radius: 20px; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.ev-time .ic { width: 20px; height: 20px; }
.ev-time b { font-weight: 600; font-size: .95rem; color: var(--ink-2); }
.ev-card { flex: 1; min-width: 0; display: flex; gap: 12px; padding: 14px 14px 14px 18px; border-radius: 24px; background: var(--surface); transition: transform .12s ease, background .2s ease; }
.ev-row:hover .ev-card { background: var(--surface-2); }
.ev-row:active .ev-card { transform: scale(.99); }
.ev-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.ev-title { font-weight: 800; font-size: 1.05rem; line-height: 1.2; }
.ev-sub { color: var(--ink-2); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.ev-meta { display: flex; gap: 12px; margin-top: 4px; font-size: .85rem; color: var(--ink-2); flex-wrap: wrap; }
.ev-meta span { display: inline-flex; align-items: center; gap: 4px; }
.ev-meta .ic { width: 15px; height: 15px; }
.ev-text .badge { margin-top: 6px; }
.ev-text .badge .ic { width: 12px; height: 12px; }
.ev-thumb { position: relative; width: 72px; height: 72px; flex: none; border-radius: 18px; background: var(--photo) center / cover, linear-gradient(135deg, #2A0006, var(--red)); overflow: hidden; }
.ev-sport { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 0; text-align: center; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #fff; background: linear-gradient(180deg, transparent, rgba(0,0,0,.6)); }
.ev-row.is-mine .ev-time { background: var(--dark); }
.ev-row.is-mine .ev-time b, .ev-row.is-mine .ev-time .ic { color: #fff; }
.ev-row.is-cancelled { opacity: .55; }
.ev-row.is-cancelled .ev-title { text-decoration: line-through; }
@media (max-width: 380px) { .ev-time { width: 62px; } .ev-thumb { width: 58px; height: 58px; } .ev-card { padding-left: 14px; } }

/* ---------- Détail d'une sortie ------------------------------------------- */
.ev-cover {
  position: relative; isolation: isolate; overflow: hidden; color: #fff; text-align: center;
  margin: 0 -16px; min-height: 300px; padding: calc(var(--safe-t) + 70px) 24px 80px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px;
  background: #121317;
}
.ev-cover::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--photo) center / cover, linear-gradient(135deg, #2A0006, #7A0010 55%, var(--red)); }
.ev-cover::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.25) 45%, rgba(0,0,0,.5)); }
.ev-cover h1 { font-size: 1.8rem; font-weight: 800; line-height: 1.15; text-shadow: 0 2px 14px rgba(0,0,0,.45); max-width: 22ch; }
.cover-back { position: absolute; top: calc(var(--safe-t) + 14px); left: 16px; width: 46px; height: 46px; border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.cover-back .ic { width: 22px; height: 22px; stroke-width: 2.4; }
.cover-tags { display: flex; gap: 6px; }
.cover-tags .badge-red { background: var(--red); color: #fff; }

.ev-sheet { position: relative; z-index: 2; margin: -56px 0 0; padding: 18px 18px 8px; border-radius: 28px; background: var(--card); box-shadow: 0 -4px 30px rgba(0,0,0,.08); }
.ev-when-card { display: flex; gap: 16px; align-items: center; }
.date-tile { position: relative; width: 84px; height: 84px; flex: none; border-radius: 22px; background: var(--red-soft); color: var(--red); display: grid; place-items: center; }
.date-tile .ic { width: 50px; height: 50px; stroke-width: 1.6; }
.date-tile b { position: absolute; top: 34px; left: 0; right: 0; text-align: center; font-size: 1rem; font-weight: 700; }
.ev-when-day { font-weight: 800; font-size: 1.12rem; letter-spacing: .01em; }
.ev-when-hour { color: var(--ink-2); margin-top: 2px; }
.places { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 10px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--surface); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2); }
.places .ic { width: 14px; height: 14px; }
.rsvp2 { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.rsvp2 .btn-lg { min-height: 56px; font-size: 1.05rem; border-radius: 16px; }
.rsvp-alt { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rsvp-alt .btn { min-height: 42px; }
.rsvp-alt .btn.is-on { background: var(--dark); border-color: var(--dark); color: #fff; }
.rsvp2 > .btn-ghost { align-self: center; }
.rsvp-done { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; border-radius: 16px; background: var(--green-soft); color: var(--green); font-weight: 700; text-align: center; padding: 8px 14px; }
.ev-h2 { font-size: 1.3rem; margin: 6px 0 12px; }
.detail-list { list-style: none; margin: 0; padding: 0 0 8px; display: flex; flex-direction: column; gap: 14px; }
.detail-list li { display: flex; align-items: flex-start; gap: 14px; color: var(--ink-2); font-size: 1rem; }
.detail-list li > .ic { width: 22px; height: 22px; color: var(--ink); margin-top: 1px; }
.detail-list li > .avatar { width: 22px; height: 22px; font-size: 9px; }
.detail-list .notes .post-text { margin-top: 4px; }
.ev-more { margin-top: 18px; }

/* ---------- Ordinateur (colonne latérale) ---------------------------------- */
@media (min-width: 960px) {
  .main { padding-bottom: 48px; }
  .home-head { margin: 0; border-radius: 28px; padding: 22px 26px 70px; }
  .home-brand { justify-content: flex-start; }
  .shortcuts { margin: -44px 26px 6px; }
  .ev-cover { margin: 0; border-radius: 28px; padding-top: 70px; }
  .ev-sheet { margin: -56px 20px 0; }
  .fab { display: none; }
  .day-strip { margin: 0 0 8px; padding: 6px 0 12px; }
  .side-nav a.active { background: var(--surface); color: var(--ink); box-shadow: inset 3px 0 0 var(--red); }
  .sidebar { border-right: 0; background: var(--surface); }
  .desk-title .btn { flex: none; }
}

/* v3 — ajustements */
.home-user h1 { font-size: 1.3rem; }
.home-user p { white-space: nowrap; }
.home-user .grow { min-width: 0; }
.home-btns { align-self: center; }
.home-avatar .avatar-lg { width: 56px; height: 56px; font-size: 20px; }
.ev-title { font-size: 1rem; }
.ev-meta { gap: 10px; font-size: .82rem; }
.ev-thumb { width: 64px; height: 64px; }
.booking-title { font-size: 1.02rem; }
@media (min-width: 960px) {
  .side-nav a.active { background: var(--card); }
}
.badge:empty { display: none; }
.seg { background: var(--surface); }
.card .seg { background: var(--card); }
.seg input:checked + span, .sheet .seg input:checked + span { background: var(--dark); color: #fff; box-shadow: none; }
:root[data-theme="sombre"] .seg input:checked + span { background: #F2F2F0; color: #111; }
.list-row:has(.seg) { flex-wrap: wrap; }
.list-row .seg { min-width: 0 !important; flex: 1 1 100%; }
@media (min-width: 600px) { .list-row .seg { flex: 0 0 260px; } }
@media (min-width: 960px) { .brand-text strong { font-family: var(--font); text-transform: none; font-size: 1.1rem; } }

/* ---------- Admin membres : import, accès, sélection ---------------------- */
.adm-h2 { font-size: 1.2rem; }
.adm-h3 { font-family: var(--font); font-size: 1.02rem; font-weight: 800; }
.adm-grid { display: grid; gap: 14px; align-items: start; }
@media (min-width: 900px) { .adm-grid { grid-template-columns: 1.1fr 1fr; } }
.import-card .file-drop { background: var(--card); min-height: 64px; border-width: 2px; }
.import-card .check small { font-weight: 500; }
.invite-cta { display: flex; align-items: center; gap: 14px; padding: 14px 16px; flex-wrap: wrap; background: var(--red-soft); }
.invite-cta .ic-wrap { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--red); color: #fff; flex: none; }
.invite-cta p { margin: 2px 0 0; font-size: .88rem; color: var(--ink-2); }
.invite-cta .grow { min-width: 200px; }
.access-box { padding: 14px; border-radius: 16px; background: var(--card); display: flex; flex-direction: column; gap: 12px; }
.access-row { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.access-row small { display: block; color: var(--muted); font-size: .84rem; margin-top: 2px; }
.access-cell { display: flex; align-items: center; gap: 10px; }
.access-state { font-size: .78rem; font-weight: 600; color: var(--muted); max-width: 150px; line-height: 1.2; }
.members-table .col-check { width: 36px; }
.members-table input[type=checkbox]:not(.switch input) { width: 18px; height: 18px; accent-color: var(--dark); }
.members-table tr.is-off td:not(:nth-last-child(2)) { opacity: .5; }
.members-table .switch input:checked + span { background: var(--green); }
.members-table .switch span { background: var(--red); opacity: .85; }
.member-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.member-id small { color: var(--muted); font-size: .78rem; }
.member-id .badge { align-self: flex-start; }
.bulk-bar { position: sticky; top: calc(var(--topbar-h) + var(--safe-t) + 52px); z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 12px 10px; padding: 10px 14px; border-radius: 16px; background: var(--dark); color: #fff; }
.bulk-bar .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.bulk-bar .btn-dark { background: #fff; color: #111; }
.bulk-bar .btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
@media (min-width: 960px) { .bulk-bar { top: 12px; } }
@media (max-width: 700px) {
  .members-table td.col-check { position: absolute; right: 14px; top: 14px; padding: 0; }
  .members-table tr { position: relative; }
  .members-table th.col-check { display: none; }
}
.members-table .badge, .member-id b { white-space: nowrap; }
.members-table td[data-label="Connexion"] { white-space: nowrap; }
.check > span { flex: 1; min-width: 0; }
@media (min-width: 701px) { .members-table .btn-txt { display: none; } .members-table .actions .btn-sm { padding: 0 10px; } }

/* v3.2 — plein écran (barre d'état iPhone transparente) */
html { background: var(--bg); height: -webkit-fill-available; }
body { min-height: 100vh; min-height: 100dvh; overscroll-behavior-y: none; }
/* Pages avec barre du haut : bande sombre sous l'heure, le réseau et la batterie (texte blanc sur iPhone) */
.topbar {
  background:
    linear-gradient(#121317, #121317) top / 100% var(--safe-t) no-repeat,
    color-mix(in srgb, var(--card) 92%, transparent);
}
/* Accueil : sans le bandeau « Espace membres », avec la marge de sécurité pour la barre d'état */
.home-head { padding-top: calc(max(var(--safe-t), 10px) + 18px); }
.home-user { min-height: 64px; }
@media (min-width: 960px) { .home-head { padding-top: 26px; } }

/* v3.3 — sorties : jour sélectionné lisible, heure sur une ligne, GPX */
@media (hover: none) { .day.has:hover { background: transparent; } }
.day.active, .day.active:hover, .day.has.active:hover { background: var(--dark); color: #fff; }
.day.active small { color: rgba(255,255,255,.72); }
:root[data-theme="sombre"] .day.active, :root[data-theme="sombre"] .day.active:hover { background: #F2F2F0; color: #111; }
:root[data-theme="sombre"] .day.active small { color: #555; }
.day.active .day-dot { background: #fff; }
:root[data-theme="sombre"] .day.active .day-dot { background: var(--red); }

.ev-row { align-items: center; gap: 10px; }
.ev-time { width: auto; min-width: 84px; align-self: center; max-height: none; flex-direction: row; gap: 5px; padding: 11px 12px; border-radius: 16px; }
.ev-time .ic { width: 16px; height: 16px; flex: none; }
.ev-time b { font-size: .95rem; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 380px) { .ev-time { min-width: 76px; padding: 10px 9px; gap: 4px; } .ev-time .ic { width: 14px; height: 14px; } .ev-time b { font-size: .88rem; } }
.ev-gpx { font-size: .68rem; font-weight: 800; letter-spacing: .04em; padding: 1px 6px; border-radius: 6px; background: var(--dark); color: #fff; }

.gpx-card { border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.gpx-visual { position: relative; height: 150px; padding: 14px 90px 14px 18px; background: linear-gradient(135deg, #1B1D22, #2E3139); }
.gpx-visual svg { width: 100%; height: 100%; }
.gpx-visual .km { position: absolute; right: 14px; bottom: 10px; color: #fff; font-family: var(--font-d); font-weight: 800; font-size: 2.1rem; line-height: 1; }
.gpx-visual .km small { font-size: 1rem; opacity: .75; margin-left: 2px; }
.gpx-body { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px 6px; }
.gpx-body b { display: block; }
.gpx-body small { color: var(--muted); font-size: .82rem; }
.gpx-body .grow { min-width: 160px; }
.gpx-help { margin: 0; padding: 0 16px 14px; font-size: .82rem; color: var(--muted); }
/* Badges colorés : prioritaires sur le fond blanc générique des badges v3 */
.badge.badge-red { background: var(--red-soft); color: var(--red); }
.badge.badge-green { background: var(--green-soft); color: var(--green); }
.badge.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge.badge-dark { background: var(--dark); color: #fff; }
:root[data-theme="sombre"] .badge.badge-dark { background: #F2F2F0; color: #111; }

/* v3.4 — « Je ne peux pas » + bandeau « À toi de jouer » */
.ev-card { position: relative; flex-direction: column; gap: 10px; }
.ev-main { display: flex; gap: 12px; }
.ev-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.ev-quick { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 2px 0 0; }
.ev-quick .btn { min-height: 38px; padding: 0 8px; font-size: .84rem; }
.ev-quick .btn .ic { width: 16px; height: 16px; }
.ev-quick .btn-outline { background: var(--card); }
.ev-row:hover .ev-card { background: var(--surface-2); }
.ev-row.is-no .ev-time { background: transparent; border: 1.5px dashed var(--line); }
.ev-row.is-no .ev-title, .ev-row.is-no .ev-sub, .ev-row.is-no .ev-meta { opacity: .6; }
.badge.badge-cant { background: var(--card); color: var(--muted); border: 1px solid var(--line); }
.badge-cant .ic { width: 12px; height: 12px; }
.rsvp-done.is-no { background: var(--surface); color: var(--ink-2); }
.btn-cant .ic { width: 16px; height: 16px; }
.cant-list { border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.cant-list summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 12px 16px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--muted); }
.cant-list summary::-webkit-details-marker { display: none; }
.cant-list summary .ic { width: 16px; height: 16px; }
.cant-list summary .chev { margin-left: auto; transition: transform .2s ease; }
.cant-list[open] summary .chev { transform: rotate(90deg); }
.cant-list .list-row { opacity: .7; }
.next-rsvp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.next-rsvp .btn { min-height: 52px; font-size: .95rem; }

.act-strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 6px -16px 0; padding: 4px 16px 8px; scrollbar-width: none; }
.act-strip::-webkit-scrollbar { display: none; }
.act-card {
  position: relative; overflow: hidden; flex: 0 0 86%; max-width: 380px; scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 4px; padding: 16px 16px 14px; border-radius: 22px;
  text-decoration: none; color: var(--ink); background: var(--surface);
}
.act-strip.is-single .act-card { flex-basis: 100%; max-width: none; }
.act-card::after { content: ""; position: absolute; right: -36px; top: -36px; width: 120px; height: 120px; border-radius: 50%; background: currentColor; opacity: .05; }
.act-benevole { background: linear-gradient(135deg, var(--red), #9E0012); color: #fff; box-shadow: 0 12px 28px color-mix(in srgb, var(--red) 30%, transparent); }
.act-sorties { background: var(--dark); color: #fff; }
.act-top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.act-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.18); flex: none; }
.act-defi .act-ic { background: var(--amber-soft); color: var(--amber); }
.act-ic .ic { width: 19px; height: 19px; }
.act-kicker { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.act-title { font-size: 1.15rem; font-weight: 800; line-height: 1.2; }
.act-sub { font-size: .86rem; opacity: .85; }
.act-bar { display: block; height: 6px; border-radius: 6px; background: rgba(255,255,255,.25); overflow: hidden; margin: 8px 0 2px; }
.act-defi .act-bar { background: var(--card); }
.act-bar i { display: block; height: 100%; border-radius: 6px; background: #fff; }
.act-defi .act-bar i { background: linear-gradient(90deg, var(--red), #FF5A3C); }
.act-cta { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-weight: 700; font-size: .9rem; }
.act-cta .ic { width: 16px; height: 16px; }
.act-benevole .act-cta, .act-sorties .act-cta { align-self: flex-start; padding: 8px 12px; border-radius: 12px; background: #fff; color: var(--ink); }
.act-benevole .act-cta { color: var(--red); }
:root[data-theme="sombre"] .act-sorties { background: #24272E; }
.bene-evt { scroll-margin-top: calc(var(--topbar-h) + var(--safe-t) + 12px); }
.bene-evt:target { box-shadow: 0 0 0 3px var(--red); }
@media (min-width: 960px) { .act-strip { margin: 10px 0 0; padding: 4px 0 8px; } .act-card { flex-basis: calc(50% - 6px); } }
.ev-row { flex-wrap: wrap; }
.ev-row .ev-card { flex: 1 1 0; }
.ev-quick { flex: 1 1 100%; margin: -2px 0 4px; }
.ev-quick .btn { min-height: 42px; font-size: .88rem; }
.is-immersive .main > .flash {
  position: fixed; z-index: 40; left: 12px; right: 12px; top: calc(var(--safe-t) + 10px);
  box-shadow: 0 10px 30px rgba(16,24,40,.18); animation: flash-in .3s ease;
}
@keyframes flash-in { from { transform: translateY(-12px); opacity: 0; } }
@media (min-width: 960px) { .is-immersive .main > .flash { position: static; box-shadow: none; } }

/* v3.5 — bénévolat « Je ne peux pas » + partage WhatsApp (bureau) */
.bene-answer { margin-top: 14px; }
.bene-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bene-choice .btn { min-height: 46px; }
.bene-choice .ic { width: 18px; height: 18px; }
.bene-answer .rsvp-done { min-height: 48px; font-size: .92rem; margin-bottom: 8px; }
.bene-postes { scroll-margin-top: calc(var(--topbar-h) + var(--safe-t) + 12px); }

.btn-wa { background: #25D366; color: #fff; border-color: #25D366; }
.btn-wa:hover { background: #1EBE5B; }
.btn-wa .ic { width: 18px; height: 18px; }
.btn-wa.btn-icon span:empty { display: none; }
.wa-center { align-self: center; }
.wa-panel .sheet-head h2 { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; }
.wa-badge { width: 36px; height: 36px; border-radius: 11px; background: #25D366; color: #fff; display: grid; place-items: center; flex: none; }
.wa-badge .ic { width: 20px; height: 20px; }
.wa-text { min-height: 150px; font-size: 15px; line-height: 1.45; background: #E7FFDB; border-color: #CDEFC0; color: #111; }
:root[data-theme="sombre"] .wa-text { background: #1F2C22; border-color: #2E4433; color: #E9F5EC; }
.wa-actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.wa-actions .ic { width: 20px; height: 20px; }
.adm-mobile-actions { margin-bottom: 14px; }
@media (min-width: 960px) { .adm-mobile-actions { display: none; } }
.wa-actions { grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); } .wa-actions .btn { min-width: 0; padding: 0 12px; }

/* v3.6 — mise à jour de l'app */
.upd { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(10,10,14,.62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .2s ease; }
.upd-card { width: 100%; max-width: 380px; background: var(--card); border-radius: 28px; padding: 26px 22px 18px; text-align: center; box-shadow: var(--shadow-lg); animation: zoom .25s ease; }
.upd-card h2 { font-size: 1.35rem; margin: 12px 0 6px; }
.upd-card p { color: var(--ink-2); margin: 0 0 14px; }
.upd-card small { display: block; margin-top: 10px; color: var(--muted); font-size: .75rem; }
.upd-ic { width: 64px; height: 64px; margin: 0 auto; border-radius: 20px; display: grid; place-items: center; background: var(--red); color: #fff; font-size: 30px; }
.upd-ic svg { width: 32px; height: 32px; }
.upd-ic.ok { background: var(--amber-soft); }
.upd-notes { text-align: left; margin: 0 0 16px; padding: 12px 14px 12px 32px; border-radius: 16px; background: var(--surface); color: var(--ink-2); font-size: .92rem; }
.upd-notes li + li { margin-top: 6px; }
.upd-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.upd-stats > div { background: var(--card); border-radius: 16px; padding: 12px 8px; text-align: center; }
.upd-stats b { display: block; font-family: var(--font-d); font-size: 1.8rem; line-height: 1; }
.upd-stats span { font-size: .72rem; color: var(--muted); font-weight: 600; }
.upd-admin { scroll-margin-top: calc(var(--topbar-h) + var(--safe-t) + 60px); }

/* v3.7 — compétitions, randonnées, stages */
.type-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 700px) { .type-pick { grid-template-columns: repeat(4, 1fr); } }
.type-opt { position: relative; cursor: pointer; }
.type-opt input { position: absolute; opacity: 0; }
.type-opt > span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px 12px 12px; border-radius: 18px; background: var(--surface); border: 2px solid transparent; transition: border-color .15s ease, background .15s ease; }
.type-opt b { font-size: 1.4rem; line-height: 1.1; }
.type-opt strong { font-size: .95rem; }
.type-opt small { font-size: .74rem; color: var(--muted); line-height: 1.25; }
.type-opt input:checked + span { border-color: var(--dark); background: var(--card); box-shadow: var(--shadow-card); }
.type-opt input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.type-chips { margin: 0 -16px 10px; padding: 0 16px 4px; }
@media (min-width: 960px) { .type-chips { margin: 0 0 10px; padding: 0; } }

.ev-type { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; margin-bottom: 4px; border-radius: 8px; font-size: .7rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; background: var(--card); color: var(--ink-2); }
.ev-type.type-course { background: var(--red); color: #fff; }
.ev-type.type-rando { background: var(--green-soft); color: var(--green); }
.ev-type.type-stage { background: var(--dark); color: #fff; }
.ev-row.type-course .ev-card { box-shadow: inset 3px 0 0 var(--red); }
.ev-row.type-stage .ev-card { box-shadow: inset 3px 0 0 var(--dark); }
.ev-row.type-rando .ev-card { box-shadow: inset 3px 0 0 var(--green); }
.type-badge { background: #fff; color: #111; }
.type-badge.type-course { background: #fff; color: var(--red); }
.places.is-full { background: var(--dark); color: #fff; border-color: var(--dark); }
.rsvp-note { margin: -2px 0 0; text-align: center; font-size: .85rem; font-weight: 600; color: var(--red); }
.ev-quick a[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.info-card { overflow: hidden; border-radius: var(--radius); background: var(--surface); scroll-margin-top: calc(var(--safe-t) + 20px); }
.info-img { aspect-ratio: 1.91 / 1; background: var(--surface-2) center / cover no-repeat; }
.info-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.info-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.info-kicker .ic { width: 14px; height: 14px; }
.info-title { font-size: 1.08rem; line-height: 1.25; }
.info-desc { margin: 0 0 6px; color: var(--ink-2); font-size: .92rem; }
.info-help { text-align: center; color: var(--muted); font-size: .76rem; }
.quick-ic.soft { font-size: 1.3rem; }

/* v3.8 — boutique en ligne officielle (Fullboutik) dans l'app */
.shop-switch { margin-bottom: 14px; }
.eshop-hero { border-radius: var(--radius); padding: 22px 20px; min-height: 190px; display: flex; align-items: flex-end; margin-bottom: 10px; }
.eshop-hero h1 { font-size: 1.8rem; margin: 4px 0 6px; }
.eshop-hero p { margin: 0 0 12px; opacity: .92; }
.eshop-kicker { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 8px; background: var(--red); color: #fff; }
.eshop-kicker.dark { background: var(--surface); color: var(--ink-2); align-self: flex-start; }
.eshop-info { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 12px; border-radius: 14px; background: var(--surface); font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.eshop-info .ic { width: 18px; height: 18px; color: var(--red); flex: none; }
.eshop-cats { margin-bottom: 14px; }
.eshop-cats .chip { border: 0; font: inherit; font-weight: 600; font-size: .9rem; }
.eshop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 800px) { .eshop-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .eshop-grid { grid-template-columns: repeat(4, 1fr); } }
.eshop-card { display: flex; flex-direction: column; padding: 0; border: 0; text-align: left; cursor: pointer; border-radius: 20px; overflow: hidden; background: var(--surface); font: inherit; color: inherit; transition: transform .12s ease; }
.eshop-card:active { transform: scale(.98); }
.eshop-img { position: relative; aspect-ratio: 1; background: #fff; display: grid; place-items: center; overflow: hidden; }
.eshop-img > img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.eshop-img.is-ph::after { content: "C.L.S."; font-family: var(--font-d); font-weight: 800; font-size: 1.6rem; color: var(--line); }
.eshop-ph { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(145deg, #fff, var(--surface-2)); }
.eshop-ph img { width: 46%; opacity: .9; }
.eshop-body { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; flex: 1; }
.eshop-name { font-weight: 700; font-size: .92rem; line-height: 1.25; }
.eshop-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; }
.eshop-row b { font-family: var(--font-d); font-size: 1.25rem; color: var(--red); }
.swatches { display: flex; gap: 4px; }
.swatches i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; }
.swatches i.sw-noir { background: #111; border-color: #111; }
.eshop-panel { padding-top: 12px; }
.eshop-x { position: absolute; top: 14px; right: 14px; z-index: 2; background: var(--card); }
.eshop-big { border-radius: 20px; overflow: hidden; background: #fff; aspect-ratio: 1; max-height: 46vh; display: grid; place-items: center; margin-top: 8px; }
.eshop-big img { width: 100%; height: 100%; object-fit: contain; }
.eshop-big .eshop-ph img { width: 40%; }
.eshop-panel h2 { font-size: 1.35rem; }
.eshop-panel .price { margin: 0; }
.eshop-panel .label { display: block; margin-bottom: 6px; }
@media (min-width: 700px) { .eshop-big { max-height: 360px; } }
.eshop-ph { flex-direction: column; gap: 6px; }
.eshop-ph b { font-family: var(--font-d); font-weight: 800; font-size: 1.7rem; letter-spacing: .04em; color: color-mix(in srgb, var(--ink) 16%, transparent); }
.eshop-ph.is-big b { font-size: 3rem; }
.eshop-ph small { font-size: .8rem; color: var(--muted); }
.eshop-img.is-ph::after { color: color-mix(in srgb, var(--ink) 16%, transparent); }
.eshop-panel .badge { background: var(--surface); font-size: .85rem; padding: 5px 11px; }

/* v3.9 — coaching */
.coach-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px 4px; scrollbar-width: none; }
.coach-tabs::-webkit-scrollbar { display: none; }
.coach-tabs a { flex: none; padding: 9px 14px; border-radius: 999px; background: var(--surface); text-decoration: none; font-weight: 700; font-size: .9rem; color: var(--ink-2); }
.coach-tabs a.active { background: var(--dark); color: #fff; }
@media (min-width: 960px) { .coach-tabs { margin: 0 0 16px; padding: 0; } }
.coach-intro { border-radius: var(--radius); padding: 22px 20px; min-height: 180px; display: flex; align-items: flex-end; margin-bottom: 14px; }
.coach-intro h1 { font-size: 1.7rem; margin: 6px 0; }
.coach-intro p { margin: 0; opacity: .92; }
.choice-grid { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
@media (max-width: 420px) { .choice-grid { grid-template-columns: 1fr; } }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice > span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px; border-radius: 16px; background: var(--card); border: 2px solid transparent; }
.choice > span.row { flex-direction: row; align-items: center; gap: 10px; }
.choice small { color: var(--muted); font-size: .78rem; line-height: 1.3; display: block; }
.choice input:checked + span { border-color: var(--dark); box-shadow: var(--shadow-card); }
.choice input:focus-visible + span { outline: 2px solid var(--red); }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input, .field input[type=range] { flex: 1; accent-color: var(--red); height: 32px; }
.range-row b { min-width: 52px; text-align: right; font-family: var(--font-d); font-size: 1.3rem; }
.days-pick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.days-pick label { position: relative; }
.days-pick input { position: absolute; opacity: 0; }
.days-pick span { display: grid; place-items: center; height: 46px; border-radius: 12px; background: var(--card); font-weight: 700; font-size: .85rem; cursor: pointer; }
.days-pick input:checked + span { background: var(--dark); color: #fff; }

.coach-head { display: grid; gap: 10px; margin-bottom: 14px; }
.coach-goal { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius); background: var(--dark); color: #fff; }
.goal-j { flex: none; min-width: 66px; height: 66px; padding: 0 8px; border-radius: 18px; background: var(--red); display: grid; place-items: center; font-family: var(--font-d); font-weight: 800; font-size: 1.6rem; }
.coach-goal b { display: block; font-size: 1.1rem; }
.coach-goal small { opacity: .75; }
.coach-phase { padding: 10px 14px; border-radius: 14px; background: var(--surface); font-size: .88rem; color: var(--ink-2); }
.coach-phase b { color: var(--ink); }

.sess-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--radius); text-decoration: none; background: var(--surface); border-left: 6px solid var(--zc, var(--muted)); margin-bottom: 10px; }
.sess-kicker { font-size: .74rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.sess-title { font-size: 1.25rem; font-weight: 800; }
.sess-line { font-size: .9rem; color: var(--ink-2); }
.sess-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; color: var(--muted); }
.z0 { --zc: #9AA0AA; } .z1 { --zc: #8CA3B8; } .z2 { --zc: #1E9E5A; } .z3 { --zc: #D98A00; } .z4 { --zc: #E3051A; } .z5 { --zc: #7A0010; }
.session-hero { padding: 20px 18px; border-radius: var(--radius); background: var(--dark); color: #fff; margin-bottom: 12px; border-left: 8px solid var(--zc); }
.session-hero .sess-kicker { color: rgba(255,255,255,.7); }
.session-hero h1 { font-size: 1.7rem; margin: 6px 0 10px; }
.sess-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.sess-meta span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: .82rem; font-weight: 700; }
.sess-meta .ic { width: 15px; height: 15px; }
.sess-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; color: var(--ink); }
.sess-steps li::marker { color: var(--red); font-weight: 800; }
.sess-state { font-weight: 700; color: var(--green); display: inline-flex; align-items: center; gap: 6px; }
.sess-state.ratee { color: var(--muted); }
.sess-row { align-items: center; }
.sess-dot { width: 44px; height: 44px; flex: none; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; background: var(--card); box-shadow: inset 0 -4px 0 var(--zc); }
.sess-dot b { font-size: 1rem; }
.sess-dot small { font-size: .62rem; color: var(--muted); font-weight: 700; margin-top: 2px; }

.week { padding: 0; overflow: hidden; }
.week summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; }
.week summary::-webkit-details-marker { display: none; }
.week summary small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.week summary .chev { transition: transform .2s ease; color: var(--muted); }
.week[open] summary .chev { transform: rotate(90deg); }
.week.is-current { box-shadow: inset 4px 0 0 var(--red); }

.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.wday { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 14px; background: var(--surface); text-decoration: none; border-bottom: 4px solid var(--zc, transparent); }
.wday small { font-size: .66rem; font-weight: 700; color: var(--muted); }
.wday b { font-size: 1.05rem; }
.wday span { font-size: .66rem; font-weight: 700; color: var(--ink-2); }
.wday.is-rest { opacity: .55; pointer-events: none; }
.wday.is-today { background: var(--dark); color: #fff; }
.wday.is-today small, .wday.is-today span { color: rgba(255,255,255,.8); }
.wday.st-faite span { color: var(--green); font-size: .9rem; }
.wday.st-ratee span { color: var(--muted); }

.form-card .row { gap: 12px; }
.form-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; background: var(--muted); display: inline-block; }
.form-dot.green { background: var(--green); } .form-dot.amber { background: var(--amber); } .form-dot.red { background: var(--red); } .form-dot.blue { background: var(--blue); }
.fx { width: 100%; height: 120px; display: block; }
.fx polyline { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.fx-ctl { stroke: var(--red); } .fx-atl { stroke: var(--muted); stroke-dasharray: 4 3; }
.fx-bar { fill: color-mix(in srgb, var(--ink) 12%, transparent); }
.fx-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.fx-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }
.l-ctl { background: var(--red); } .l-atl { background: var(--muted); }

.zones { display: flex; flex-direction: column; gap: 6px; }
.zone { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--card); font-size: .88rem; border-left: 5px solid var(--zc); }
.zone b { width: 26px; } .zone span { white-space: nowrap; } .zone small { color: var(--muted); min-width: 56px; text-align: right; }
.zone.z1 { --zc: #8CA3B8; } .zone.z2 { --zc: #1E9E5A; } .zone.z3 { --zc: #D98A00; } .zone.z4 { --zc: #E3051A; } .zone.z5 { --zc: #7A0010; }
@media (max-width: 420px) { .zone { flex-wrap: wrap; } .zone .grow { flex-basis: 60%; } }

.scale { display: flex; align-items: center; gap: 6px; }
.scale label { position: relative; flex: 1; }
.scale input { position: absolute; opacity: 0; }
.scale span { display: grid; place-items: center; height: 42px; border-radius: 12px; background: var(--surface); font-weight: 800; cursor: pointer; }
.scale input:checked + span { background: var(--dark); color: #fff; }
.scale small { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.fuel { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .fuel { grid-template-columns: repeat(4, 1fr); } }
.fuel .kpi { background: var(--card); }

.strava-logo { width: 44px; height: 44px; border-radius: 12px; background: #FC4C02; color: #fff; display: grid; place-items: center; flex: none; }
.strava-logo svg { width: 24px; height: 24px; }
.btn-strava { background: #FC4C02; color: #fff; border-color: #FC4C02; }
.btn-strava:hover { background: #E34402; }
.strava-list .list-row { padding-left: 0; padding-right: 0; }

.athlete-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; }
.athlete-card small { display: block; color: var(--muted); font-size: .82rem; }
.athlete-meta { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; margin-top: 4px; color: var(--ink-2); }
.athlete-head { display: flex; flex-direction: column; gap: 10px; }
.athlete-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.athlete-facts span { display: flex; flex-direction: column; padding: 10px; border-radius: 14px; background: var(--card); font-size: .78rem; color: var(--muted); }
.athlete-facts b { font-family: var(--font-d); font-size: 1.35rem; color: var(--ink); }

/* ===== v3.10 : sortie Strava partagée par lien ===== */
.quick-ic.strava { background: #FC4C02; }
.quick-ic.strava svg, .strava-mini svg { width: 22px; height: 22px; }
.strava-logo.sm { width: 38px; height: 38px; border-radius: 11px; }
.strava-logo.sm svg { width: 20px; height: 20px; }
.strava-box { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1.5px solid color-mix(in srgb, #FC4C02 35%, transparent); }
.strava-box label b { display: block; }
.strava-box label small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.3; }
.paste-row { display: flex; gap: 8px; }
.paste-row .input { flex: 1; min-width: 0; }
.paste-row .btn { flex: none; }
[data-composer].is-strava [data-gpx-box] { display: none; }
.strava-embed { margin: 12px 16px 0; border-radius: 14px; overflow: hidden; background: var(--bg); min-height: 60px; }
.strava-embed iframe { display: block; width: 100% !important; max-width: 100%; border: 0; }   /* hauteur fixée par embed.js */
.strava-private { margin: 8px 16px 0; padding: 10px 14px; border-radius: 12px; background: var(--amber-soft); font-size: .86rem; }
.strava-private > summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 6px; list-style: none; }
.strava-private > summary::-webkit-details-marker { display: none; }
.strava-private > summary .ic { width: 16px; height: 16px; flex: none; }
.strava-private p { margin: 8px 0 6px; line-height: 1.45; }
.strava-private ol { margin: 0 0 10px; padding-left: 18px; line-height: 1.5; }
/* Carte de secours façon Strava */
.strava-fallback { margin: 12px 16px 0; border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid #F0E3DC; color: #242428; }
.strava-fallback[hidden] { display: none; }
.sf-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.sf-logo { width: 34px; height: 34px; border-radius: 9px; background: #FC4C02; color: #fff; display: grid; place-items: center; flex: none; }
.sf-logo svg { width: 18px; height: 18px; }
.sf-who { min-width: 0; }
.sf-who b { display: block; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-who small { color: #6D6D78; font-size: .78rem; }
.sf-map { display: block; width: 100%; aspect-ratio: 32 / 15; background: linear-gradient(160deg, #F6F1EC, #EFEAE4); }
.sf-grid path { stroke: #E2DBD3; stroke-width: 1; fill: none; }
.sf-river { stroke: #CFE3EE; stroke-width: 6; fill: none; stroke-linecap: round; }
.sf-halo { fill: none; stroke: #fff; stroke-width: 7; stroke-linejoin: round; stroke-linecap: round; }
.sf-route { fill: none; stroke: #FC4C02; stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; }
.sf-start { fill: #3BB273; stroke: #fff; stroke-width: 2.5; }
.sf-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 4px; padding: 10px 14px 4px; }
.sf-stats small { display: block; font-size: .7rem; color: #6D6D78; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.sf-stats b { font-size: 1.15rem; font-weight: 800; white-space: nowrap; }
.sf-stats i { font-style: normal; font-size: .75rem; font-weight: 600; color: #6D6D78; margin-left: 2px; }
.sf-photo { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #F1ECE6; }
.sf-mapwrap { position: relative; }
.sf-mapwrap[hidden], .strava-fallback .strava-embed[hidden] { display: none; }
.sf-badge { position: absolute; left: 10px; top: 10px; z-index: 1; padding: 4px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; line-height: 1.2; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.sf-badge.is-official { background: #FC4C02; color: #fff; }
.sf-badge.is-generated { background: #fff; color: #5B5B66; border: 1px dashed #B9B2AA; }
.sf-badge.is-gpx { background: #fff; color: #242428; }
.strava-fallback .strava-embed { margin: 0; border-radius: 0; }
.sf-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px 10px; }
.sf-note { font-size: .72rem; color: #8A8A94; }
.strava-fallback .sf-live { -webkit-appearance: none; appearance: none; flex: none; display: inline-flex; align-items: center; min-height: 32px; margin: 0;
  border: 1.5px solid #FC4C02; color: #FC4C02; background: #fff; border-radius: 999px; padding: 4px 14px; font: inherit; font-weight: 700; font-size: .8rem; line-height: 1; cursor: pointer; white-space: nowrap; }
.strava-fallback .sf-live:active { background: #FC4C02; color: #fff; }
.sf-note { min-width: 0; }
.strava-open { color: var(--ink); }
.strava-mini { width: 26px; height: 26px; border-radius: 8px; background: #FC4C02; color: #fff; display: grid; place-items: center; flex: none; }
.strava-mini svg { width: 15px; height: 15px; }
.strava-open > span:nth-child(2) { flex: 1; }
.post-link .strava-mini, .post-link .ai-ic { flex: none; overflow: visible; }   /* les pastilles ne s'étirent pas comme le texte du lien */
.post-link .strava-mini { width: 26px; } .post-link .ai-ic.sm { width: 28px; }   /* le logo ne doit pas s'étirer comme le texte du lien */

/* Bandeau « À toi de jouer » : la 1re carte ne colle plus au bord de l'écran */
.act-strip { scroll-padding-inline: 16px; }
.act-strip::after { content: ""; flex: 0 0 4px; }
@media (min-width: 960px) { .act-strip { scroll-padding-inline: 0; } .act-strip::after { display: none; } }

/* Prochain rendez-vous déjà décliné */
.booking.is-declined .booking-thumb { filter: grayscale(1); opacity: .6; }
.booking-sub .no { color: var(--red); font-weight: 700; }
.next-rsvp .btn.is-current { background: var(--dark); color: #fff; border-color: var(--dark); }
.next-rsvp.single { grid-template-columns: 1fr; }
.booking-back button { background: var(--green-soft, #E4F5EA); color: var(--green, #1B8A4B); }


/* ---------- Séance réalisée & coach IA (v3.11) --------------------------- */
.rpe-legend, .scale-legend { display: flex; justify-content: space-between; gap: 8px; margin-top: 2px; }
.rpe-legend small, .scale-legend small { font-size: .74rem; color: var(--muted); }
.realise-data { border: 1px solid var(--line); border-radius: 14px; padding: 0 12px; }
.realise-data[open] { padding-bottom: 12px; }
.realise-data > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 12px 0; cursor: pointer; }
.realise-data > summary::-webkit-details-marker { display: none; }
.realise-data > summary small { color: var(--muted); font-weight: 500; font-size: .8rem; }
.realise-data > summary .chev { transition: transform .2s; width: 18px; height: 18px; }
.realise-data[open] > summary .chev { transform: rotate(90deg); }
.realise-data > * + * { margin-top: 10px; }
.realise-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .realise-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.realise-grid .field { min-width: 0; }
.realise-grid .field > span:first-child { font-size: .8rem; }
.dur-pair { display: flex; align-items: center; gap: 4px; }
.dur-pair .input { min-width: 0; text-align: center; padding-left: 4px; padding-right: 4px; }
.dur-pair i { font-style: normal; font-size: .8rem; color: var(--muted); }
.input.is-out { display: flex; align-items: center; background: var(--surface); color: var(--ink-2); font-weight: 700; }
.fit-help { margin: 0; }
.fit-help summary { cursor: pointer; font-weight: 600; }
.fit-help ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.5; }
.file-drop small { display: block; font-weight: 500; color: var(--muted); font-size: .78rem; }
.import-fit { margin-top: 10px; }
.import-fit .file-drop { background: var(--card); }
.file-drop.is-busy { opacity: .6; pointer-events: none; }
.realise-edit > summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 8px; list-style: none; }
.realise-edit > summary::-webkit-details-marker { display: none; }
.realise-edit[open] > summary { margin-bottom: 12px; }

.ride-card { margin-top: 14px; }
.act-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .act-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.act-kpi { background: var(--surface); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.act-kpi b { display: block; font-size: 1.25rem; font-weight: 800; line-height: 1.1; white-space: nowrap; }
.act-kpi b small { font-size: .75rem; font-weight: 600; color: var(--muted); }
.act-kpi span { font-size: .75rem; color: var(--muted); }
.act-chart { width: 100%; height: 100px; display: block; }
.act-chart polyline { fill: none; stroke-width: 1.8; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.act-pw { stroke: #2F6FDE; } .act-hr { stroke: var(--red); }
.l-pw { background: #2F6FDE; } .l-hr { background: var(--red); }
.act-zones small { display: block; font-size: .78rem; color: var(--muted); margin-bottom: 4px; }
.zbar { display: flex; height: 22px; border-radius: 8px; overflow: hidden; gap: 2px; }
.zbar span { background: var(--zc); color: #fff; font-size: .68rem; font-weight: 800; display: grid; place-items: center; min-width: 3px; }
.act-more summary { cursor: pointer; font-weight: 700; font-size: .9rem; display: flex; align-items: center; gap: 6px; list-style: none; }
.act-more summary::-webkit-details-marker { display: none; }
.act-more summary .chev, .ai-analyse summary .chev { width: 16px; height: 16px; transition: transform .2s; }
.act-more[open] summary .chev, .ai-analyse[open] summary .chev { transform: rotate(90deg); }
.act-table { width: 100%; border-collapse: collapse; font-size: .85rem; margin-top: 8px; font-variant-numeric: tabular-nums; }
.act-table th { text-align: left; font-size: .72rem; color: var(--muted); font-weight: 600; padding: 4px 6px; }
.act-table td { padding: 6px; border-top: 1px solid var(--line); }

.ai-block { margin-top: 14px; border: 1.5px solid color-mix(in srgb, #6D4AFF 35%, var(--line)); }
.ai-head { display: flex; align-items: center; gap: 12px; }
.ai-head small { display: block; color: var(--muted); font-size: .8rem; }
.ai-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(135deg, #6D4AFF, #E3051A); }
.ai-ic .ic { width: 20px; height: 20px; }
.ai-wait { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; background: var(--surface); font-weight: 600; }
.ai-wait small { color: var(--muted); font-weight: 500; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid color-mix(in srgb, #6D4AFF 25%, transparent); border-top-color: #6D4AFF; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
.ai-text p, .ai-msg p { margin: 0 0 8px; line-height: 1.55; }
.ai-text p:last-child, .ai-msg p:last-child { margin-bottom: 0; }
.ai-msg { padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, #6D4AFF 8%, var(--card)); }
.ai-points { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.ai-points li { padding-left: 24px; position: relative; }
.ai-points li::before { position: absolute; left: 0; top: 0; }
.ai-points.ok li::before { content: '✅'; } .ai-points.warn li::before { content: '⚠️'; }
.ai-analyse > summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 6px; list-style: none; }
.ai-analyse > summary::-webkit-details-marker { display: none; }
.ai-analyse[open] > summary { margin-bottom: 8px; }
.ai-questions { border-top: 1px solid var(--line); padding-top: 14px; }
.ai-questions .label { font-weight: 600; }
.ai-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-choice { position: relative; }
.chip-choice input { position: absolute; opacity: 0; }
.chip-choice span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: 999px; background: var(--surface); font-weight: 600; font-size: .9rem; cursor: pointer; }
.chip-choice input:checked + span { background: var(--dark); color: #fff; }
.chip-choice input:focus-visible + span, .scale input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.ai-answers { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.ai-answers li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.ai-answers li:first-child { border-top: 0; }
.ai-answers b { text-align: right; }
.ai-changes s { color: var(--muted); font-size: .85rem; }
.ai-changes.is-reverted { opacity: .55; }
.ai-foot { margin: 0; font-size: .76rem; }
.coach-ai-note { margin: -4px 16px 12px 64px; font-size: .85rem; }
.coach-ai-note > summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
.coach-ai-note .ai-msg, .coach-ai-note .ai-answers { margin-top: 6px; }
.ai-ic.sm { width: 28px; height: 28px; border-radius: 9px; }
.ai-ic.sm .ic { width: 15px; height: 15px; }
.post-ai { font-weight: 700; }
.ai-tip { padding: 12px 14px; border-radius: 12px; background: var(--surface); }
.ai-tip b { display: flex; align-items: center; gap: 6px; font-size: .9rem; }
.ai-tip b .ic { width: 16px; height: 16px; }
.ai-tip p { margin: 4px 0 0; line-height: 1.5; }
.ai-cta { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; text-decoration: none; color: inherit;
  background: linear-gradient(135deg, color-mix(in srgb, #6D4AFF 12%, var(--card)), color-mix(in srgb, #E3051A 10%, var(--card))); }
.ai-cta small { display: block; color: var(--ink-2); font-size: .83rem; margin-top: 2px; line-height: 1.4; }
@media (max-width: 480px) { .ai-cta { flex-direction: column; align-items: stretch; } .ai-cta .btn { align-self: flex-start; } }
/* Blocs intérieurs : contraste sur les cartes grises (clair) comme en sombre */
.act-kpi, .ai-tip, .ai-wait, .input.is-out, .ai-block .scale span, .ai-block .chip-choice span { background: var(--bg); border: 1px solid var(--line); }
.ai-block .scale input:checked + span, .ai-block .chip-choice input:checked + span { background: var(--dark); border-color: var(--dark); color: #fff; }
.realise-form .rsvp-alt .btn { min-width: 0; white-space: normal; line-height: 1.2; }
.realise-form .help .ic, .ai-block .help .ic { width: 16px; height: 16px; vertical-align: -3px; }
.post-link .ai-ic .ic { color: #fff; }

/* Agenda de l'accueil : la réponse (« Tu ne viens pas », « Peut-être ») sur sa ligne, les inscrits en dessous */
.booking-sub .no, .booking-sub .maybe { display: block; }
.booking-sub .maybe { color: var(--amber); font-weight: 700; }

/* « + Ajouter » dans la colonne de gauche (ordinateur) */
.side-add { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 4px 0 10px; padding: 11px 14px; border: 0; border-radius: 14px;
  background: var(--red); color: #fff; font-weight: 800; font-size: .95rem; cursor: pointer; box-shadow: 0 8px 20px color-mix(in srgb, var(--red) 30%, transparent); }
.side-add .ic { width: 20px; height: 20px; stroke-width: 2.6; }
.side-add:hover { filter: brightness(1.06); }
.side-add:active { transform: scale(.98); }
.quick-ic.fit { background: color-mix(in srgb, var(--red) 12%, var(--card)); color: var(--red); }
/* Mode « importer un .fit » : le cadre du fichier est mis en avant */
.is-fit .import-box .file-drop { border-color: var(--red); color: var(--red); background: color-mix(in srgb, var(--red) 6%, var(--card)); }
