:root {
  --green-950: #06231a;
  --green-900: #0a2f23;
  --green-800: #0d3b2c;
  --green-700: #135039;
  --green-600: #1b6449;
  --lime: #cde23b;
  --lime-600: #b7cc22;
  --lime-soft: #f1f7c9;
  --bg: #f4f6f2;
  --surface: #ffffff;
  --text: #0e1f18;
  --muted: #6c7a72;
  --line: #e4e9e3;
  --chip: #eef2ec;
  --danger: #c0392b;
  --up: #1b8a4f;
  --radius: 18px;
  --nav-h: 76px;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- Cadre téléphone sur grand écran ---------- */
#app {
  position: relative; width: 100%; height: 100dvh; overflow: hidden;
  background: var(--bg); display: flex; flex-direction: column;
}
@media (min-width: 640px) {
  body {
    display: grid; place-items: center; min-height: 100vh;
    background: radial-gradient(1200px 600px at 50% 0%, #e9eee6, #cfd8cc);
  }
  #app {
    width: 400px; height: min(860px, calc(100vh - 40px));
    border-radius: 48px; border: 12px solid #111; box-shadow: 0 30px 80px rgba(6, 35, 26, .35), 0 0 0 2px #2a2a2a;
  }
  #app::before { /* encoche */
    content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
    width: 110px; height: 28px; background: #111; border-radius: 20px; z-index: 50;
  }
}

/* ---------- Écrans ---------- */
#screen { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
#screen::-webkit-scrollbar { display: none; }
#app.with-nav #screen { padding-bottom: calc(var(--nav-h) + 16px); }
.page { padding: 20px 18px 24px; animation: in .22s ease-out; }
@media (min-width: 640px) { .page, .phero { padding-top: 46px; } }
@keyframes in { from { opacity: 0; transform: translateY(6px); } }

h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
.title-xl { font-size: 28px; font-weight: 800; line-height: 1.12; }
.title-xl em { font-style: normal; color: var(--green-700); }
.section-h { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 12px; }
.section-h h2 { font-size: 17px; font-weight: 800; }
.section-h a, .link { font-size: 13px; font-weight: 700; color: var(--green-700); text-decoration: none; background: none; border: 0; padding: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* ---------- Barre du haut ---------- */
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.topbar h1 { font-size: 20px; font-weight: 800; flex: 1; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--green-800); color: var(--lime); font-weight: 800; font-size: 15px;
}
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-edit { position: relative; display: inline-block; cursor: pointer; }
.avatar-edit .cam {
  position: absolute; right: -2px; bottom: 2px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--lime); color: var(--green-900); border: 3px solid var(--bg); display: grid; place-items: center;
}
.avatar-edit .cam svg { width: 15px; height: 15px; }
.hello b { display: block; font-size: 15px; }
.hello span { font-size: 12.5px; color: var(--muted); }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; flex: none; padding: 0;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.glass { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.35); color: #fff; backdrop-filter: blur(6px); }
.icon-btn.glass.on { background: var(--lime); color: var(--green-900); border-color: var(--lime); }

/* ---------- Bannière citron ---------- */
.banner {
  position: relative; overflow: hidden; background: var(--lime); border-radius: 22px; padding: 18px; margin-top: 18px;
  min-height: 132px; color: var(--green-900);
}
.banner h3 { font-size: 17px; font-weight: 800; max-width: 62%; }
.banner p { margin: 4px 0 12px; font-size: 13px; max-width: 60%; }
.banner .art { position: absolute; right: -14px; bottom: -18px; width: 150px; height: 150px; }
/* Photo de profil : en haut à droite, la raquette passe plus petite en dessous */
.banner .me-photo {
  position: absolute; top: 16px; right: 16px; width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--green-800); box-shadow: 0 0 0 3px var(--lime), 0 6px 16px rgba(6,35,26,.25); z-index: 1;
}
.banner.has-photo .art { width: 112px; height: 112px; right: -10px; bottom: -26px; }
.banner.has-photo h3, .banner.has-photo p, .banner.has-photo .big { max-width: calc(100% - 84px); }
.banner .big { font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.banner .big small { font-size: 14px; font-weight: 700; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 800; font-size: 14.5px; text-decoration: none;
  background: var(--green-800); color: #fff;
}
.btn.sm { padding: 8px 16px; font-size: 13px; }
.btn.lime { background: var(--lime); color: var(--green-900); }
.btn.ghost { background: var(--chip); color: var(--text); }
.btn.block { width: 100%; padding: 15px; font-size: 15.5px; }
.btn:disabled { opacity: .55; cursor: default; }

/* ---------- Cartes vert foncé (style « match ») ---------- */
.hscroll { display: flex; gap: 12px; overflow-x: auto; margin: 0 -18px; padding: 0 18px 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.mini {
  flex: 0 0 168px; scroll-snap-align: start; background: var(--green-800); color: #fff; border-radius: 18px; padding: 14px;
  border: 0; text-align: left;
}
.mini .ic { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--lime); display: grid; place-items: center; color: var(--lime); margin-bottom: 8px; }
.mini .ic svg { width: 16px; height: 16px; }
.mini b { display: block; color: var(--lime); font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini span { display: block; font-size: 12px; opacity: .85; margin-top: 4px; }

.tcard {
  width: 100%; display: flex; gap: 12px; align-items: center; text-align: left;
  background: var(--green-800); color: #fff; border: 0; border-radius: 20px; padding: 14px; margin-bottom: 10px;
}
.tcard .lvl {
  flex: none; width: 52px; height: 52px; border-radius: 16px; background: rgba(205, 226, 59, .14); color: var(--lime);
  display: grid; place-items: center; font-weight: 800; font-size: 13px; line-height: 1;
}
.tcard .body { flex: 1; min-width: 0; }
.tcard b { display: block; color: var(--lime); font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard .row { display: flex; align-items: center; gap: 6px; font-size: 12.5px; opacity: .9; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard .row svg { width: 13px; height: 13px; flex: none; }
.tcard .go { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--lime); color: var(--green-900); display: grid; place-items: center; }
.tcard .go svg { width: 16px; height: 16px; }

/* ---------- Formulaires ---------- */
.field { margin-bottom: 12px; position: relative; }
.field label { display: block; font-size: 12.5px; font-weight: 700; margin: 0 0 6px 4px; color: var(--muted); }
.input {
  width: 100%; border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 13px 14px; outline: none;
}
.input:focus { border-color: var(--green-700); }
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; padding: 0 14px; }
.search:focus-within { border-color: var(--green-700); }
.search svg { width: 19px; height: 19px; color: var(--muted); flex: none; }
.search input { flex: 1; border: 0; outline: none; background: none; padding: 13px 0; min-width: 0; }
.suggest { position: absolute; left: 0; right: 0; top: 100%; margin-top: 6px; z-index: 20; background: var(--surface); border-radius: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.14); overflow: hidden; }
.suggest button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 11px 14px; font-size: 14px; }
.suggest button:hover, .suggest button:focus { background: var(--lime-soft); outline: none; }
.err { color: var(--danger); font-size: 13.5px; font-weight: 600; margin: 8px 4px; }

/* Contrôle segmenté (Indoor / Outdoor) */
.seg { display: flex; background: var(--surface); border: 1.5px solid var(--green-800); border-radius: 999px; padding: 3px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 999px; padding: 9px 6px; font-weight: 700; font-size: 13.5px; color: var(--green-800); }
.seg button.on { background: var(--lime); color: var(--green-900); box-shadow: inset 0 0 0 1.5px var(--green-800); }

/* Pastilles */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 0; background: var(--chip); border-radius: 12px; padding: 9px 14px; font-weight: 700; font-size: 13px; }
.chip.on { background: var(--green-800); color: var(--lime); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.label { font-size: 13px; font-weight: 800; margin: 16px 0 8px; }

/* ---------- Barre de navigation ---------- */
.nav {
  position: absolute; left: 12px; right: 12px; bottom: 12px; height: 64px; z-index: 40;
  background: var(--surface); border-radius: 999px; box-shadow: 0 10px 30px rgba(6, 35, 26, .16);
  display: flex; align-items: center; justify-content: space-between; padding: 0 8px;
}
.nav button {
  border: 0; background: none; height: 48px; min-width: 44px; border-radius: 999px; color: var(--green-800);
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; font-weight: 800; font-size: 13px;
  transition: background .2s;
}
.nav button svg { width: 21px; height: 21px; }
.nav button span { display: none; }
.nav button.on { background: var(--lime); padding: 0 16px; }
.nav button.on span { display: inline; }

/* ---------- Splash ---------- */
.splash {
  position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 30%, var(--green-700), var(--green-950));
  color: #fff; display: flex; flex-direction: column; align-items: center; overflow: hidden;
}
.splash .logo { margin-top: 18%; text-align: center; position: relative; }
.splash .logo h1 { font-size: 64px; font-weight: 800; line-height: .92; letter-spacing: -.04em; }
.splash .logo .ball { position: absolute; right: -26px; top: -8px; width: 46px; height: 46px; }
.splash .logo p { color: var(--lime); font-weight: 700; margin: 10px 0 0; letter-spacing: .04em; }
.splash .art { width: 78%; margin-top: 6%; flex: 1; min-height: 0; }
.splash .court { position: absolute; inset: auto 0 0 0; height: 45%; opacity: .5; pointer-events: none; }
.slide {
  position: relative; z-index: 2; margin: 0 22px 34px; width: calc(100% - 44px); max-width: 320px; height: 58px;
  border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(6px);
  display: flex; align-items: center; padding: 5px; color: #fff; font-weight: 800; user-select: none; touch-action: none;
}
.slide .knob { width: 48px; height: 48px; border-radius: 50%; background: var(--lime); color: var(--green-900); display: grid; place-items: center; flex: none; position: relative; z-index: 1; }
.slide .knob svg { width: 22px; height: 22px; }
.slide .txt { position: absolute; inset: 0; display: grid; place-items: center; padding-left: 40px; letter-spacing: .01em; }
.slide .txt i { font-style: normal; opacity: .7; margin-left: 8px; letter-spacing: -.1em; }

/* ---------- Authentification ---------- */
.auth-top { background: var(--green-900); color: #fff; padding: 46px 22px 70px; border-radius: 0 0 32px 32px; position: relative; overflow: hidden; }
.auth-top h1 { font-size: 30px; font-weight: 800; line-height: 1.1; }
.auth-top h1 em { font-style: normal; color: var(--lime); }
.auth-top p { opacity: .8; margin: 8px 0 0; font-size: 14px; max-width: 75%; }
.auth-top .ball { position: absolute; right: 20px; top: 40px; width: 54px; }
.auth-card { background: var(--surface); margin: -46px 16px 24px; border-radius: 24px; padding: 18px; box-shadow: 0 14px 40px rgba(6,35,26,.1); position: relative; }
.auth-card .seg { margin-bottom: 16px; }
.hint { font-size: 12px; color: var(--muted); margin: -4px 4px 12px; }

/* ---------- Détail tournoi ---------- */
.hero { position: relative; height: 270px; flex: none; }
.hero .court-img { position: absolute; inset: 0; }
.hero .bar { position: absolute; top: 14px; left: 16px; right: 16px; display: flex; justify-content: space-between; z-index: 2; }
@media (min-width: 640px) { .hero .bar { top: 44px; } }
.sheet { position: relative; margin-top: -28px; background: var(--surface); border-radius: 28px 28px 0 0; padding: 14px 20px 24px; min-height: 60%; }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
.sheet h1 { font-size: 22px; font-weight: 800; line-height: 1.2; }
.addr { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; margin-top: 4px; }
.addr svg { width: 14px; height: 14px; flex: none; }
.days { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px; padding: 2px 20px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day { flex: none; width: 50px; border-radius: 14px; background: var(--chip); text-align: center; padding: 8px 0; font-size: 12px; color: var(--muted); }
.day b { display: block; font-size: 17px; color: var(--text); }
.day.on { background: var(--green-800); color: var(--lime); }
.day.on b { color: var(--lime); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { border-radius: 12px; padding: 8px 12px; background: var(--chip); font-weight: 700; font-size: 13px; }
.pill.dark { background: var(--green-800); color: var(--lime); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; text-align: right; }
.infos { white-space: pre-line; background: var(--bg); border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.cta { position: sticky; bottom: 0; padding: 12px 0 4px; background: linear-gradient(transparent, var(--surface) 30%); display: grid; gap: 8px; }

/* ---------- Joueurs ---------- */
.prow {
  width: 100%; display: flex; align-items: center; gap: 12px; background: var(--surface); border: 0; border-radius: 16px;
  padding: 11px 14px; margin-bottom: 8px; text-align: left;
}
.rank { flex: none; min-width: 46px; height: 46px; padding: 0 6px; border-radius: 14px; background: var(--lime-soft); color: var(--green-800); display: grid; place-items: center; font-weight: 800; font-size: 13.5px; }
.rank.top { background: var(--green-800); color: var(--lime); }
.prow .body { flex: 1; min-width: 0; }
.prow b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .pts { text-align: right; font-weight: 800; font-size: 14px; white-space: nowrap; }
.prow .pts small { display: block; font-weight: 700; font-size: 12px; }
.prow.anon { opacity: .55; cursor: default; }
.up { color: var(--up); }
.down { color: var(--danger); }

.phero { background: var(--green-900); color: #fff; padding: 20px 18px 64px; position: relative; overflow: hidden; }
.phero .bar { display: flex; justify-content: space-between; margin-bottom: 18px; }
.phero h1 { font-size: 24px; font-weight: 800; }
.phero .sub { opacity: .75; font-size: 13px; }
.phero .big { margin-top: 14px; display: flex; align-items: baseline; gap: 10px; }
.phero .big b { font-size: 52px; line-height: 1; color: var(--lime); letter-spacing: -.04em; }
.phero .big span { font-weight: 700; opacity: .85; }
.phero .ball { position: absolute; right: -20px; top: 60px; width: 120px; opacity: .9; }
.pbody { margin-top: -40px; position: relative; padding: 0 16px 24px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: var(--surface); border-radius: 18px; padding: 14px; box-shadow: 0 6px 20px rgba(6,35,26,.06); }
.tile .v { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.card { background: var(--surface); border-radius: 18px; padding: 14px; margin-top: 12px; }
.card h3 { font-size: 14px; font-weight: 800; margin-bottom: 8px; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--line); }
.chart .axis { fill: var(--muted); font-size: 10px; font-family: inherit; }
.chart .line { fill: none; stroke: var(--green-800); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--lime); stroke: var(--green-800); stroke-width: 2; }
.chart .cross { stroke: var(--muted); stroke-dasharray: 3 3; }
.tip { position: absolute; pointer-events: none; background: var(--green-900); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -120%); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 700; padding: 6px 4px; border-bottom: 1px solid var(--line); }
td { padding: 9px 4px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.me td { font-weight: 800; color: var(--green-700); }

/* ---------- Profil ---------- */
.list { background: var(--surface); border-radius: 18px; overflow: hidden; }
.list > * { display: flex; align-items: center; gap: 12px; padding: 14px; border-bottom: 1px solid var(--line); width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; }
.list > *:last-child { border-bottom: 0; }
.list .k { color: var(--muted); font-size: 13px; flex: 1; }
.list .v { font-weight: 700; font-size: 14px; text-align: right; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Divers ---------- */
.empty { text-align: center; color: var(--muted); padding: 34px 10px; font-size: 14px; }
.spin { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--green-800); border-radius: 50%; animation: s .8s linear infinite; margin: 30px auto; }
@keyframes s { to { transform: rotate(360deg); } }
.toast { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--green-900); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 700; z-index: 60; white-space: nowrap; animation: in .2s; }

/* ---------- Partenaires ---------- */
.nav button { position: relative; }
.badge {
  position: absolute; top: 4px; left: 28px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 800; font-style: normal; line-height: 18px; text-align: center;
  border: 2px solid var(--surface); box-sizing: content-box;
}
.nav button.on .badge { left: 26px; }
.badge.inline { position: static; display: inline-block; border: 0; margin-left: 4px; vertical-align: 1px; }
.pill.lime { background: var(--lime); color: var(--green-900); }

/* Carte d'annonce façon « carte de joueur » */
.acard {
  position: relative; overflow: hidden; background: var(--green-800); color: #fff; border-radius: 22px;
  padding: 16px; margin-bottom: 12px; cursor: pointer; isolation: isolate;
}
.acard.full { cursor: default; }
.acard::before { /* lignes de terrain en filigrane */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .09; pointer-events: none;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), #fff calc(50% - 1px), #fff calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(transparent 62%, #fff 62%, #fff calc(62% + 2px), transparent calc(62% + 2px));
}
.acard::after { /* bande citron en coin */
  content: ""; position: absolute; top: -40px; right: -40px; width: 120px; height: 120px; z-index: -1;
  background: var(--lime); opacity: .14; transform: rotate(45deg);
}
.ac-top { display: flex; align-items: center; gap: 12px; }
.ac-av { width: 52px; height: 52px; font-size: 17px; background: var(--green-700); box-shadow: 0 0 0 3px var(--lime); }
.ac-who { flex: 1; min-width: 0; }
.ac-who b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-who span { font-size: 12.5px; opacity: .75; }
.ac-who .me { display: inline-block; font-size: 10.5px; background: var(--lime); color: var(--green-900); border-radius: 6px; padding: 1px 6px; vertical-align: 2px; opacity: 1; }
.ac-rank { text-align: right; flex: none; }
.ac-rank b { display: block; color: var(--lime); font-size: 22px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.ac-rank small { font-size: 11px; opacity: .75; font-weight: 700; }
.ac-rank.nc b { color: rgba(255,255,255,.45); }
.ac-t { display: flex; gap: 10px; align-items: center; margin-top: 14px; background: rgba(255,255,255,.07); border-radius: 14px; padding: 10px 12px; }
.ac-t svg { width: 18px; height: 18px; color: var(--lime); flex: none; }
.ac-t div { min-width: 0; }
.ac-t b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-t span { font-size: 12px; opacity: .8; }
.ac-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.acard .pill { background: rgba(255,255,255,.1); color: #fff; font-size: 12px; padding: 6px 10px; }
.acard .pill.lime { background: var(--lime); color: var(--green-900); }
.acard .pill.dark { background: rgba(205,226,59,.16); color: var(--lime); }
.ac-msg { margin: 12px 0 0; font-size: 14px; line-height: 1.45; opacity: .92; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.acard.full .ac-msg { -webkit-line-clamp: unset; display: block; }
.ac-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: 12px; opacity: .95; }
.ac-foot > span:first-child { opacity: .7; }

/* Choix du tournoi (publication) */
.topt { display: block; width: 100%; text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 11px 14px; margin-bottom: 8px; }
.topt b { display: block; font-size: 14px; }
.topt span { font-size: 12.5px; color: var(--muted); }
.topt.on { border-color: var(--green-800); background: var(--lime-soft); box-shadow: inset 0 0 0 1px var(--green-800); }
textarea.input { resize: none; font: inherit; line-height: 1.4; }

/* Liste des discussions */
.crow { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; background: var(--surface); border: 0; border-radius: 16px; padding: 12px 14px; margin-bottom: 8px; }
.crow .body { flex: 1; min-width: 0; }
.crow .l1 { display: flex; justify-content: space-between; gap: 8px; }
.crow .l1 b { font-size: 14.5px; }
.crow .l1 span, .crow .l2 { font-size: 12px; color: var(--muted); }
.crow .l2, .crow .l3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow .l3 { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.crow .l3.unread { color: var(--text); font-weight: 700; }
.crow .new { background: var(--lime); color: var(--green-900); font-size: 10.5px; font-weight: 800; border-radius: 6px; padding: 1px 6px; }
.crow .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); flex: none; }

/* Discussion */
.chat { display: flex; flex-direction: column; height: 100%; }
.chat-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--line); flex: none; }
@media (min-width: 640px) { .chat-h { padding-top: 44px; } }
.chat-h .avatar { width: 40px; height: 40px; font-size: 14px; }
.chat-m { flex: 1; overflow-y: auto; padding: 14px 14px 8px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: none; }
.chat-m::-webkit-scrollbar { display: none; }
.day-sep { align-self: center; font-size: 11.5px; color: var(--muted); font-weight: 700; margin: 8px 0 4px; }
.bubble {
  max-width: 78%; align-self: flex-start; background: var(--surface); border-radius: 18px 18px 18px 6px;
  padding: 9px 12px 6px; font-size: 14.5px; white-space: pre-line; overflow-wrap: anywhere; box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.bubble.me { align-self: flex-end; background: var(--green-800); color: #fff; border-radius: 18px 18px 6px 18px; }
.bubble time { display: block; text-align: right; font-size: 10.5px; opacity: .6; margin-top: 2px; }
.chat-in { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px 14px; background: var(--surface); border-top: 1px solid var(--line); flex: none; }
.chat-in textarea { flex: 1; border: 1.5px solid var(--line); border-radius: 20px; padding: 10px 14px; resize: none; font: inherit; outline: none; max-height: 110px; background: var(--bg); }
.chat-in textarea:focus { border-color: var(--green-700); }
.chat-in .send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--lime); color: var(--green-900); display: grid; place-items: center; flex: none; }
.chat-in .send svg { width: 19px; height: 19px; }
.toast.clickable { cursor: pointer; background: var(--lime); color: var(--green-900); box-shadow: 0 8px 24px rgba(6,35,26,.25); }

/* ---------- Notifications ---------- */
.notif-cta {
  display: flex; align-items: center; gap: 12px; background: var(--green-800); color: #fff; border-radius: 18px;
  padding: 12px 12px 12px 14px; margin: 0 0 16px; position: relative;
}
.notif-cta > svg { width: 24px; height: 24px; color: var(--lime); flex: none; }
.notif-cta > div { flex: 1; min-width: 0; }
.notif-cta b { display: block; font-size: 14px; }
.notif-cta span { font-size: 12px; opacity: .8; }
.notif-cta .btn { background: var(--lime); color: var(--green-900); flex: none; }
.notif-cta .x { background: none; border: 0; color: #fff; opacity: .6; font-size: 20px; padding: 0 4px; flex: none; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row > div { flex: 1; min-width: 0; }
.set-row b { display: block; font-size: 14.5px; }
.set-row span { font-size: 12.5px; color: var(--muted); }
.set-row.off { opacity: .45; }
.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: #d5dcd4; transition: background .2s; }
.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,.2); transition: transform .2s; }
.switch input:checked + span { background: var(--green-800); }
.switch input:checked + span::after { transform: translateX(20px); background: var(--lime); }
.switch input:focus-visible + span { outline: 2px solid var(--green-700); outline-offset: 2px; }
.switch input:disabled { cursor: default; }

/* ---------- Administration ---------- */
.adm-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.adm-h b { font-size: 15px; }
.adm-who { margin-top: 10px; padding: 8px 10px; background: var(--bg); border-radius: 12px; }
.adm-who span { display: block; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.adm-who b { display: block; font-size: 14px; }
.adm-who small { font-size: 12px; color: var(--muted); }

/* ---------- Signaler / bloquer (fenêtres du bas) ---------- */
.sheet-bg { position: absolute; inset: 0; z-index: 70; background: rgba(6, 35, 26, .45); display: flex; align-items: flex-end; animation: in .15s; }
.sheet-box { width: 100%; max-height: 88%; overflow-y: auto; background: var(--surface); border-radius: 24px 24px 0 0; padding: 12px 18px 22px; }
.sheet-box .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
.sheet-t { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.sheet-act { display: block; width: 100%; border: 0; background: var(--bg); border-radius: 14px; padding: 14px; margin-bottom: 8px; font-weight: 700; text-align: center; }
.sheet-act.danger { color: var(--danger); }
.radio { display: flex; align-items: flex-start; gap: 10px; padding: 9px 4px; font-size: 14.5px; cursor: pointer; }
.radio input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--green-800); flex: none; }
.radio.cgu { font-size: 13px; color: var(--muted); padding: 2px 4px 10px; }
.mod-links { text-align: center; margin: 20px 0 0; font-size: 13px; color: var(--muted); }
.mod-links .link { color: var(--muted); font-weight: 600; }
.chat-closed { padding: 14px 16px 18px; background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; font-weight: 600; text-align: center; flex: none; }

/* ---------- Administration ---------- */
.adm-preuve { margin-top: 10px; background: var(--bg); border-radius: 12px; padding: 10px 12px; max-height: 260px; overflow-y: auto; }
.adm-preuve > span { display: block; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 6px; }
.adm-preuve p { margin: 0 0 8px; font-size: 13.5px; white-space: pre-line; overflow-wrap: anywhere; }
.adm-preuve p.sig { border-left: 3px solid var(--danger); padding-left: 8px; }
.adm-preuve small { color: var(--muted); }
.adm-dec { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.adm-dec .btn { flex: 1 1 auto; }

/* ---------- Pages légales ---------- */
.legal h2 { font-size: 16px; font-weight: 800; margin: 22px 0 8px; }
.legal p, .legal li { font-size: 14px; line-height: 1.55; color: #24342c; }
.legal ul { padding-left: 18px; margin: 0; }
.legal li { margin-bottom: 6px; }
.legal-links { text-align: center; font-size: 12px; color: var(--muted); margin: 22px 0 0; }
.legal-links a { color: var(--muted); }

#admTabs button { font-size: 12px; padding: 9px 2px; }

/* ---------- Simulateur ---------- */
.simu-cta { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; border: 0; border-radius: 18px; padding: 14px 16px; margin-bottom: 14px;
  background: linear-gradient(120deg, var(--green-800), var(--green-600)); color: #fff; }
.simu-cta b { display: block; color: var(--lime); font-size: 15px; }
.simu-cta span { display: block; font-size: 12.5px; opacity: .85; }
.simu-cta > div { flex: 1; }
.simu-cta svg { width: 22px; height: 22px; color: var(--lime); flex: none; }

.simu-hero { background: radial-gradient(120% 90% at 100% 0%, var(--green-600), var(--green-900) 60%); color: #fff; padding: 20px 18px 64px; }
@media (min-width: 640px) { .simu-hero { padding-top: 46px; } }
.simu-hero .bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.simu-hero h1 { font-size: 24px; font-weight: 800; }
.simu-hero .sub { opacity: .75; font-size: 13px; margin-top: 2px; }
.simu-src { background: rgba(205,226,59,.16); color: var(--lime); font-size: 11.5px; padding: 6px 10px; }
.simu-duo { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.simu-duo > div:not(.arrow) { flex: 1; background: rgba(255,255,255,.07); border-radius: 16px; padding: 10px 12px; min-width: 0; }
.simu-duo span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; opacity: .7; font-weight: 700; }
.simu-duo b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.simu-duo small { font-size: 12.5px; opacity: .8; font-variant-numeric: tabular-nums; }
.simu-duo .proj { background: rgba(205,226,59,.14) !important; box-shadow: inset 0 0 0 1.5px rgba(205,226,59,.5); }
.simu-duo .proj b { color: var(--lime); }
.simu-duo .arrow svg { width: 20px; height: 20px; color: var(--lime); }
.simu-delta { margin-top: 12px; font-size: 13.5px; opacity: .9; min-height: 20px; }
.simu-delta b { color: var(--lime); font-size: 16px; }
.meter { position: relative; height: 26px; margin-top: 14px; }
.meter .track { position: absolute; left: 0; right: 0; top: 11px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, rgba(255,255,255,.15), rgba(205,226,59,.6)); }
.meter i { position: absolute; top: 4px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; transition: left .5s cubic-bezier(.2,.8,.2,1); }
.meter .m-now { background: #fff; border: 3px solid var(--green-900); }
.meter .m-proj { background: var(--lime); border: 3px solid var(--green-900); box-shadow: 0 0 0 3px rgba(205,226,59,.3); }
.meter .m-goal { top: 0; width: 4px; height: 26px; margin-left: -2px; border-radius: 2px; background: #fff; opacity: .8; }
.meter-l { display: flex; justify-content: space-between; font-size: 11px; opacity: .6; margin-top: 2px; }

.simu-card { margin-top: 12px; }
.simu-card h3 { font-size: 15px; margin-bottom: 10px; }
.chip.lock { opacity: .45; }
.goal-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.goal-h b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--green-800); }
.goal-r { text-align: right; font-weight: 800; font-size: 13px; color: var(--muted); }
.gbar { position: relative; height: 10px; border-radius: 5px; background: var(--chip); overflow: hidden; margin-top: 8px; }
.gbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; transition: width .5s ease; }
.gbar .g-proj { background: var(--lime); }
.gbar .g-now { background: var(--green-800); z-index: 1; }
.plan { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 11px 12px; margin-bottom: 6px; text-align: left; font-size: 14px; }
.plan span { color: var(--green-700); font-weight: 800; font-size: 12.5px; white-space: nowrap; }
.plan:hover { border-color: var(--green-800); }

.sres { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sres:last-of-type { border-bottom: 0; }
.sres .lvl { flex: none; min-width: 52px; text-align: center; border-radius: 12px; background: var(--green-800); color: var(--lime); font-weight: 800; font-size: 12.5px; padding: 8px 6px; }
.sres .body { flex: 1; min-width: 0; border: 0; background: none; text-align: left; padding: 0; }
.sres .body b { display: block; font-size: 14px; }
.sres .body span { font-size: 12px; color: var(--muted); }
.sres .gain { text-align: right; font-weight: 800; color: var(--up); font-size: 15px; white-space: nowrap; }
.sres .gain.zero { color: var(--muted); }
.sres .gain small { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.sres .x { border: 0; background: var(--chip); width: 28px; height: 28px; border-radius: 50%; font-size: 17px; line-height: 1; color: var(--muted); flex: none; }

.range { width: 100%; accent-color: var(--green-800); margin: 4px 0 2px; }
.stepper { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.stepper button { width: 46px; height: 46px; border-radius: 14px; border: 0; background: var(--chip); font-size: 22px; font-weight: 800; color: var(--green-800); flex: none; }
.stepper > div { flex: 1; text-align: center; background: var(--bg); border-radius: 14px; padding: 6px; }
.stepper b { display: block; font-size: 18px; }
.stepper span { font-size: 12px; color: var(--muted); }
.epreview { margin-top: 12px; background: var(--lime-soft); border-radius: 14px; padding: 10px 12px; font-size: 14px; }

.xt td, .xt th { padding: 7px 4px; }
.xt tr.top td { background: var(--lime-soft); }
.xt td .small { font-size: 11px; }
.how summary { font-weight: 800; cursor: pointer; font-size: 14px; }
.how p { font-size: 13.5px; line-height: 1.5; margin: 10px 0 0; }

.potentiel { background: var(--bg); border-radius: 18px; padding: 14px; }
.pot-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pot-rows { margin-top: 8px; }
.pot-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.pot-row:last-child { border-bottom: 0; }
.pot-row b { color: var(--green-800); font-variant-numeric: tabular-nums; }
.pot-rank { min-width: 96px; text-align: right; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
