/* ============================================================================
 * cloudflare-pages/assets/exercices.css
 * Theme premium dark cohérent avec l'app LIXUM mobile (Silhouette v4 palette)
 * ============================================================================ */

:root {
  --bg-deep: #0A0D10;
  --bg-panel: #14181D;
  --bg-card: rgba(255, 255, 255, 0.025);
  --border: rgba(255, 255, 255, 0.06);
  --border-gold: rgba(212, 175, 55, 0.30);
  --gold: #D4AF37;
  --gold-soft: #F5D67A;
  --emerald: #00D984;
  --emerald-soft: #5DFFB4;
  --danger: #FF6B6B;
  --blue: #4DA6FF;
  --text-high: #FFFFFF;
  --text-mid: #C2CAD4;
  --text-low: #8892A0;
  --text-muted: #5C6470;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg-deep);
  color: var(--text-high);
  min-height: 100vh;
  line-height: 1.5;
}

a { color: var(--gold); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--gold-soft); }

/* ── Layout ────────────────────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header / Navigation ───────────────────────────────────────────────── */
header.site-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(10, 13, 16, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
}

header.site-header .nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

header.site-header .logo {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #00D984 0%, #5DFFB4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header.site-header .nav-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

header.site-header .nav-links a {
  color: var(--text-mid);
  font-size: 14px;
  font-weight: 600;
}
header.site-header .nav-links a:hover { color: var(--gold); }
header.site-header .nav-links a.active { color: var(--gold); }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  padding: 60px 0 40px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 900;
  margin-bottom: 14px;
  letter-spacing: -1px;
}
.hero .sub {
  font-size: clamp(15px, 2.5vw, 18px);
  color: var(--text-mid);
  max-width: 620px;
  margin: 0 auto 24px;
}
.hero .badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(212, 175, 55, 0.10);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 18px;
}

/* ── Filter bar ───────────────────────────────────────────────────────── */
.filter-bar {
  padding: 16px;
  margin-bottom: 24px;
  border-radius: 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.filter-bar label {
  color: var(--text-low);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 6px;
}
.filter-bar select, .filter-bar input[type="text"] {
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-high);
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}
.filter-bar select:focus, .filter-bar input:focus { border-color: var(--gold); }
.filter-bar .reset {
  padding: 8px 14px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-low);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
}
.filter-bar .reset:hover { color: var(--gold); border-color: var(--border-gold); }
.filter-bar .count {
  margin-left: auto;
  color: var(--text-low);
  font-size: 12px;
  font-weight: 700;
}
.filter-bar .count strong { color: var(--gold); }

/* ── Grid exercices ───────────────────────────────────────────────────── */
.grid-exercices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 60px;
}

.card-exercice {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  transition: transform 0.15s, border-color 0.15s;
  display: block;
  color: inherit;
}
.card-exercice:hover {
  transform: translateY(-2px);
  border-color: var(--border-gold);
}
.card-exercice h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-high);
}
.card-exercice .desc {
  font-size: 12px;
  color: var(--text-low);
  margin-bottom: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-exercice .meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Pills (muscles, level, equipment) ─────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.pill.muscle { background: rgba(77, 166, 255, 0.10); color: var(--blue); border: 1px solid rgba(77, 166, 255, 0.25); }
.pill.level-beginner { background: rgba(0, 217, 132, 0.10); color: var(--emerald); border: 1px solid rgba(0, 217, 132, 0.30); }
.pill.level-intermediate { background: rgba(212, 175, 55, 0.10); color: var(--gold); border: 1px solid var(--border-gold); }
.pill.level-advanced { background: rgba(255, 107, 107, 0.10); color: var(--danger); border: 1px solid rgba(255, 107, 107, 0.30); }
.pill.equipment { background: rgba(255, 255, 255, 0.05); color: var(--text-mid); border: 1px solid var(--border); }

/* ── Page exercice détail ─────────────────────────────────────────────── */
.exercice-detail {
  padding: 30px 0 60px;
}
.exercice-detail .breadcrumb {
  font-size: 12px;
  color: var(--text-low);
  margin-bottom: 14px;
  font-weight: 600;
}
.exercice-detail .breadcrumb a { color: var(--text-mid); }
.exercice-detail h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.exercice-detail .name-en {
  color: var(--text-low);
  font-size: 14px;
  margin-bottom: 18px;
  font-style: italic;
}
.exercice-detail .meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.exercice-detail .lead {
  font-size: 16px;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 30px;
}

.section {
  padding: 20px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
}
.section h2 {
  font-size: 14px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.section ol, .section ul {
  list-style: none;
  padding: 0;
}
.section ol li {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
  align-items: flex-start;
}
.section ol li::before {
  content: counter(li);
  counter-increment: li;
  width: 26px;
  height: 26px;
  border-radius: 13px;
  background: var(--gold);
  color: var(--bg-deep);
  font-size: 13px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.section ol { counter-reset: li; }
.section ol li p {
  flex: 1;
  color: var(--text-mid);
  font-size: 14px;
  line-height: 1.6;
}
.section ul.tips li, .section ul.mistakes li {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--text-mid);
  font-size: 13px;
  line-height: 1.6;
}
.section ul.tips li::before { content: "✓"; color: var(--emerald); font-weight: 900; flex-shrink: 0; }
.section ul.mistakes li::before { content: "✕"; color: var(--danger); font-weight: 900; flex-shrink: 0; }

.session-summary {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.session-summary .stat {
  flex: 1;
  min-width: 150px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid var(--border-gold);
}
.session-summary .stat .label {
  color: var(--text-low);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.session-summary .stat .value {
  color: var(--gold);
  font-size: 22px;
  font-weight: 900;
  margin-top: 4px;
  font-family: "SF Mono", Menlo, monospace;
}

/* ── Deeplink banner ──────────────────────────────────────────────────── */
.deeplink-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #14181D 0%, #1F252D 100%);
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 50;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.deeplink-banner .icon { font-size: 28px; }
.deeplink-banner .text { flex: 1; }
.deeplink-banner .title { color: var(--text-high); font-size: 13px; font-weight: 800; }
.deeplink-banner .sub { color: var(--text-low); font-size: 11px; margin-top: 2px; }
.deeplink-banner .cta {
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--gold);
  color: var(--bg-deep);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.deeplink-banner .close {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 11px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  color: var(--text-low);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* ── Footer ───────────────────────────────────────────────────────────── */
footer.site-footer {
  padding: 30px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-low);
  font-size: 12px;
  margin-top: 60px;
}
footer.site-footer .links {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
footer.site-footer a { color: var(--text-mid); font-weight: 600; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  header.site-header .nav-links { gap: 14px; }
  header.site-header .nav-links a { font-size: 12px; }
  .grid-exercices { grid-template-columns: 1fr; }
  .deeplink-banner { flex-direction: column; align-items: stretch; }
  .deeplink-banner .cta { text-align: center; }
}
