/* Mon Éval Sport — feuille de style unique. Préfixe des classes : mes- */

@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url(fonts/barlow-condensed-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(fonts/barlow-condensed-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(fonts/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-600-normal.woff2) format("woff2"); }

:root {
  --bg: #0E1116;
  --card: #171B22;
  --card-2: #1F242D;
  --line: #2A303B;
  --text: #F2F4F7;
  --text-2: #C9CED6;
  --muted: #8B93A1;
  --lime: #C6F432;
  --lime-ink: #0E1116;
  --pink: #FF5C8A;
  --blue: #3EC8FF;
  --amber: #FFB547;
  --danger: #FF6B6B;
  --radius: 16px;
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 16px/1.5 var(--sans); display: flex; flex-direction: column;
}
a { color: var(--lime); }
b, strong { font-weight: 600; }

/* ---------- Haut de page ---------- */
.mes-top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(14, 17, 22, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.mes-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: var(--display); font-size: 20px; letter-spacing: .02em; }
.mes-brand b { color: var(--lime); font-weight: 700; }
.mes-logo { width: 30px; height: 30px; border-radius: 9px; background: var(--lime); color: var(--lime-ink); display: grid; place-items: center; font-weight: 700; font-size: 18px; transform: rotate(-6deg); }
.mes-nav { display: flex; gap: 4px; }
.mes-nav a { color: var(--text-2); text-decoration: none; font-size: 14px; padding: 8px 10px; border-radius: 10px; }
.mes-nav a:hover { background: var(--card); color: var(--text); }

.mes-main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 20px 16px 48px; }
.mes-jeune .mes-main { max-width: 520px; }
.mes-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }

/* ---------- Typo ---------- */
.mes-kicker { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.mes-title { font-family: var(--display); font-weight: 700; font-size: clamp(40px, 11vw, 60px); line-height: .95; margin: 10px 0 24px; text-transform: uppercase; }
.mes-title-sm { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1; margin: 4px 0; text-transform: uppercase; }
.mes-accent { color: var(--lime); }
.mes-muted { color: var(--muted); font-size: 14px; margin: 6px 0; }
.mes-small { font-size: 12px; }
.mes-count { font-size: 18px; color: var(--muted); vertical-align: middle; }

/* ---------- Cartes ---------- */
.mes-card { background: var(--card); border-radius: var(--radius); padding: 18px; margin: 12px 0; }
.mes-empty { text-align: center; padding: 28px 18px; }
.mes-hero { padding-top: 6vh; }
.mes-hello { margin-bottom: 8px; }
.mes-sent { text-align: center; }
.mes-sent-icon { font-size: 34px; color: var(--lime); }
.mes-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.mes-back { display: inline-block; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 8px; }

/* ---------- Messages ---------- */
.mes-flash { border-radius: 12px; padding: 12px 14px; margin: 0 0 10px; font-size: 14px; }
.mes-flash-ok { background: rgba(198, 244, 50, .12); color: var(--lime); }
.mes-flash-warn { background: rgba(255, 181, 71, .12); color: var(--amber); }
.mes-errors { background: rgba(255, 107, 107, .12); color: var(--danger); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.mes-errors ul { margin: 0; padding-left: 18px; }

/* ---------- Formulaires ---------- */
.mes-form, .mes-login { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
input, select {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card-2); color: var(--text); font: 16px var(--sans); appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
input:focus, select:focus { outline: 2px solid var(--lime); outline-offset: 1px; border-color: transparent; }
input[type="checkbox"] { width: 20px; min-height: 20px; height: 20px; accent-color: var(--lime); appearance: auto; }
.mes-check { flex-direction: row; align-items: center; gap: 10px; font-size: 14px; color: var(--text); }
.mes-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mes-add summary { cursor: pointer; font-weight: 600; color: var(--lime); list-style: none; }
.mes-add summary::-webkit-details-marker { display: none; }
.mes-add[open] summary { margin-bottom: 14px; }

/* Lignes de points (saisie) */
.mes-rows { display: flex; flex-direction: column; gap: 10px; }
.mes-row { background: var(--card-2); border-radius: 14px; padding: 12px; }
.mes-row-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--display); font-size: 18px; margin-bottom: 8px; }
.mes-row-head button { background: none; border: 0; color: var(--muted); font-size: 13px; cursor: pointer; padding: 4px 8px; }
.mes-row-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mes-row-grid label { font-size: 11px; }
.mes-row-grid input { min-height: 44px; padding: 8px 10px; background: var(--bg); text-align: center; }
@media (max-width: 420px) { .mes-row-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Boutons ---------- */
.mes-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px;
  border: 1px solid var(--line); background: transparent; color: var(--text); font: 600 15px var(--sans); text-decoration: none; cursor: pointer; transition: transform .1s, background .2s; }
.mes-btn:active { transform: scale(.97); }
.mes-btn-main { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.mes-btn-main:hover { background: #d4ff4a; }
.mes-btn-ghost:hover { background: var(--card-2); }
.mes-btn-sm { min-height: 38px; padding: 0 14px; font-size: 13px; }
.mes-btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- Liste des jeunes ---------- */
.mes-list { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mes-list-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--card); border-radius: 14px; padding: 10px 12px; flex-wrap: wrap; }
.mes-list-item.is-off { opacity: .5; }
.mes-list-main { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); flex: 1; min-width: 200px; }
.mes-list-main small { display: block; color: var(--muted); font-size: 12px; }
.mes-list-actions { display: flex; gap: 6px; }
.mes-list-actions form { margin: 0; }
.mes-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--card-2); color: var(--lime); display: grid; place-items: center; font-weight: 600; font-size: 14px; flex-shrink: 0; }

/* ---------- Blocs de test ---------- */
.mes-test { margin: 18px 0 28px; }
.mes-test-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 4px; }
.mes-test-title h2 { font-family: var(--display); font-weight: 700; font-size: 24px; text-transform: uppercase; margin: 0; }
.mes-chart { width: 100%; height: 280px; }
.mes-chart-sm { height: 220px; }
.mes-chart-label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 6px 0 0; }

/* Puces de dates */
.mes-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.mes-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); font: 500 13px var(--sans); cursor: pointer; }
.mes-chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); opacity: .35; }
.mes-chip.is-on { color: var(--text); border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.mes-chip.is-on i { opacity: 1; }
.mes-toggle { display: inline-flex; background: var(--card-2); border-radius: 10px; padding: 3px; }
.mes-toggle button { border: 0; background: transparent; color: var(--muted); font: 500 12px var(--sans); padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.mes-toggle button.is-on { background: var(--line); color: var(--text); }

/* Tuiles chiffres */
.mes-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 12px 0; }
.mes-stat { background: var(--card-2); border-radius: 14px; padding: 12px 14px; }
.mes-stat-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mes-stat-value { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1.1; margin-top: 2px; }
.mes-stat-value small { font-family: var(--sans); font-weight: 500; font-size: 13px; color: var(--muted); margin-left: 4px; }
.mes-stat-sub { font-size: 12px; color: var(--muted); }
.mes-stat.is-alert { box-shadow: inset 0 0 0 1px var(--amber); }
.mes-stat.is-alert .mes-stat-sub { color: var(--amber); }
.mes-up { color: var(--lime); }
.mes-down { color: var(--pink); }

/* Tableau d'historique */
.mes-table-wrap { overflow-x: auto; margin-top: 8px; }
.mes-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 520px; }
.mes-table th { text-align: right; color: var(--muted); font-weight: 500; padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mes-table td { text-align: right; padding: 9px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mes-table th:first-child, .mes-table td:first-child { text-align: left; }
.mes-table .is-alert { color: var(--amber); }
.mes-del { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; padding: 4px 6px; }
.mes-del:hover { color: var(--danger); }

/* ---------- Vue jeune : vitrine ---------- */
.mes-hero-stat { background: var(--lime); color: var(--lime-ink); border-radius: 20px; padding: 18px 18px 16px; position: relative; overflow: hidden; }
.mes-hero-stat::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; border: 22px solid rgba(14,17,22,.08); }
.mes-hero-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #3A4A00; }
.mes-hero-value { font-family: var(--display); font-weight: 700; font-size: 72px; line-height: .9; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.mes-hero-value small { font-size: 22px; margin-left: 4px; }
.mes-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; position: relative; z-index: 1; }
.mes-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--lime-ink); color: var(--lime); }
.mes-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mes-bar { height: 6px; border-radius: 9px; background: var(--line); margin-top: 10px; overflow: hidden; }
.mes-bar span { display: block; height: 100%; border-radius: 9px; width: 0; transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
.mes-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.mes-legend span::before { content: ""; display: inline-block; width: 14px; margin-right: 6px; vertical-align: middle; border-top: 3px solid var(--c); }
.mes-legend span.is-dash::before { border-top-style: dashed; border-top-width: 2px; }

@keyframes mes-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.mes-anim > * { animation: mes-rise .6s cubic-bezier(.2, .8, .2, 1) both; }
.mes-anim > *:nth-child(2) { animation-delay: .1s; }
.mes-anim > *:nth-child(3) { animation-delay: .2s; }
.mes-anim > *:nth-child(4) { animation-delay: .3s; }
.mes-anim > *:nth-child(5) { animation-delay: .4s; }
@media (prefers-reduced-motion: reduce) { .mes-anim > * { animation: none; } .mes-bar span { transition: none; } }

/* Demandes d'inscription en attente (vue coach) */
.mes-pending { box-shadow: inset 0 0 0 1px var(--lime); }
.mes-pending-title { font-family: var(--display); font-weight: 700; font-size: 22px; text-transform: uppercase; color: var(--lime); margin: 0 0 6px; }
.mes-pending-item { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.mes-pending-item small { display: block; color: var(--muted); font-size: 12px; }
.mes-pending-actions { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.mes-pending-btns { display: flex; gap: 6px; }
