/* ============================================================
   LA CALLISTHÉNIE — Design System
   Sombre · sportif · punchy · pensé SEO
   ============================================================ */

/* ---- Fonts self-hosted (Archivo 400/700/800/900 + Space Mono 400/700) ---- */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/archivo-400.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('fonts/archivo-700.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('fonts/archivo-800.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 900; font-display: swap;
  src: url('fonts/archivo-900.woff2') format('woff2'); }
@font-face { font-family: 'Space Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/spacemono-400.woff2') format('woff2'); }
@font-face { font-family: 'Space Mono'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('fonts/spacemono-700.woff2') format('woff2'); }

:root {
  /* ---- Couleurs ---- */
  --bg:        #0e0e0f;
  --bg-2:      #141416;
  --surface:   #18181b;
  --surface-2: #1f1f23;
  --line:      #2a2a2e;
  --line-soft: #202024;

  --text:      #f3f3f0;
  --text-2:    #b6b6b0;
  --muted:     #82827c;

  --accent:    #d6ff3e;   /* vert acide */
  --accent-d:  #b8e018;
  --accent-ink:#13160a;   /* texte sur accent */

  --warn:      #ff7a45;   /* orange (niveaux/avertis) */
  --ok:        #57e08f;

  /* niveaux */
  --lvl-deb:  #57e08f;
  --lvl-int:  #ffcf4d;
  --lvl-adv:  #ff6b5e;

  /* ---- Type ---- */
  --sans: 'Archivo', system-ui, -apple-system, sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;

  /* ---- Rythme ---- */
  --maxw: 1240px;
  --readw: 720px;
  --radius: 4px;
  --radius-lg: 8px;
  --gut: clamp(20px, 5vw, 56px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: var(--accent-ink); }

/* ---- Layout helpers ---- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.wrap-read { max-width: var(--readw); margin-inline: auto; padding-inline: var(--gut); }
.section { padding-block: clamp(56px, 9vw, 120px); }
.section-tight { padding-block: clamp(40px, 6vw, 72px); }

/* ============================================================
   TYPOGRAPHIE
   ============================================================ */
.kicker {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.kicker::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--accent);
  display: inline-block;
}
.kicker.is-muted { color: var(--muted); }
.kicker.is-muted::before { background: var(--muted); }

h1, h2, h3, h4 { font-family: var(--sans); margin: 0; line-height: 1.02; letter-spacing: -0.02em; }

.display {
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(44px, 7.5vw, 96px);
  line-height: 0.92;
  letter-spacing: -0.03em;
}
.h-xl { font-weight: 800; text-transform: uppercase; font-size: clamp(34px, 5.2vw, 64px); line-height: 0.98; letter-spacing: -0.025em; }
.h-lg { font-weight: 800; text-transform: uppercase; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.02; letter-spacing: -0.02em; }
.h-md { font-weight: 700; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.1; letter-spacing: -0.01em; }

.lead { font-size: clamp(18px, 2.1vw, 22px); line-height: 1.5; color: var(--text-2); font-weight: 400; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .18s ease, color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #e6ff6e; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--text); }
.btn-arrow::after { content: "→"; font-family: var(--mono); font-weight: 700; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav {
  display: flex; align-items: center; gap: 32px;
  height: 68px;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  font-weight: 900; text-transform: uppercase; letter-spacing: -0.02em;
  font-size: 18px;
}
.brand .mark {
  width: 30px; height: 30px; border-radius: 6px;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center;
  font-family: var(--sans); font-weight: 900; font-size: 19px;
  line-height: 1;
}
.brand .mark span { transform: translateY(-1px); }
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a {
  font-weight: 600; font-size: 15px;
  padding: 9px 13px; border-radius: var(--radius);
  color: var(--text-2);
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.is-active { color: var(--text); }
.nav-cta { margin-left: 12px; }
.nav-toggle { display: none; }

@media (max-width: 1040px) {
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; margin-left: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 12px var(--gut) 20px;
    display: none;
  }
  .nav-links a { padding: 13px 4px; border-bottom: 1px solid var(--line-soft); font-size: 17px; border-radius: 0; }
  .nav-links a:hover { background: transparent; color: var(--accent); }
  .nav-cta { display: none; }
  .site-header.is-open .nav-links { display: flex; }
  .nav-toggle {
    display: inline-flex; margin-left: auto;
    background: var(--surface); border: 1px solid var(--line);
    color: var(--text); border-radius: var(--radius);
    padding: 10px 14px; font-family: var(--mono); font-size: 13px; cursor: pointer;
    text-transform: uppercase; letter-spacing: 0.08em;
  }
  .site-header.is-open .nav-toggle { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
}

/* ============================================================
   PLACEHOLDERS D'IMAGE (rayés + label mono)
   ============================================================ */
.ph {
  position: relative;
  background-color: var(--surface);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0 11px,
    color-mix(in oklab, var(--line) 70%, transparent) 11px 12px
  );
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: grid; place-items: center;
  overflow: hidden;
  color: var(--muted);
}
.ph::after {
  content: attr(data-label);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 100px;
}
.ph-accent {
  background-color: color-mix(in oklab, var(--accent) 12%, var(--bg));
  background-image: repeating-linear-gradient(
    -45deg, transparent 0 11px,
    color-mix(in oklab, var(--accent) 22%, transparent) 11px 12px);
  border-color: color-mix(in oklab, var(--accent) 30%, var(--line));
}

/* ============================================================
   BADGES NIVEAU & TAGS
   ============================================================ */
.level {
  font-family: var(--mono); font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 9px; border-radius: 100px;
  border: 1px solid var(--line);
  color: var(--text-2);
}
.level::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.level.deb::before { background: var(--lvl-deb); }
.level.int::before { background: var(--lvl-int); }
.level.adv::before { background: var(--lvl-adv); }

.tag {
  font-family: var(--mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 6px 12px; border-radius: 100px;
  border: 1px solid var(--line); color: var(--text-2);
  background: var(--surface);
  transition: border-color .15s, color .15s;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.tag:hover { border-color: var(--text-2); color: var(--text); }
.tag.is-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ============================================================
   CARTES
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .18s, transform .18s;
  display: flex; flex-direction: column;
}
.card:hover { border-color: var(--line); transform: translateY(-3px); }
.card .ph { border: 0; border-radius: 0; aspect-ratio: 16/10; }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.card-title { font-weight: 700; font-size: 19px; line-height: 1.15; letter-spacing: -0.01em; }
.card:hover .card-title { color: var(--accent); }
.card-excerpt { color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.card-foot {
  margin-top: auto; padding-top: 14px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  display: flex; gap: 14px; border-top: 1px solid var(--line-soft);
}

/* grilles */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line-soft);
  background: var(--bg-2);
  padding-block: 64px 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 40px;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
.footer-col h4 {
  font-family: var(--mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--muted); margin-bottom: 16px; font-weight: 700;
}
.footer-col a { display: block; color: var(--text-2); padding: 5px 0; font-size: 15px; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12.5px; color: var(--muted);
}

/* ============================================================
   UTILITAIRES
   ============================================================ */
.eyebrow-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.divider { height: 1px; background: var(--line-soft); border: 0; }
.stack-sm > * + * { margin-top: 12px; }
.flex { display: flex; }
.center { align-items: center; }
.between { justify-content: space-between; }
.gap-sm { gap: 12px; }
.gap-md { gap: 20px; }
.wrap-flex { flex-wrap: wrap; }
.pill-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* breadcrumb */
.breadcrumb { font-family: var(--mono); font-size: 12.5px; color: var(--muted); display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--line); }

/* ============================================================
   ARTICLE OVERLAY — pages WP existantes en mode redesign=preview
   Cible: body.lc-redesign (ajouté par mu-plugin sur pages WP article)
   Restyle Astra prose sans toucher au HTML.
   ============================================================ */
body.lc-redesign {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}
body.lc-redesign a { color: inherit; }
body.lc-redesign .entry-content,
body.lc-redesign .entry-content p,
body.lc-redesign .entry-content li { color: var(--text-2); }
body.lc-redesign .entry-content { max-width: var(--readw); margin-inline: auto; padding-inline: var(--gut); }
body.lc-redesign h1.entry-title,
body.lc-redesign .entry-content h1 {
  font-family: var(--sans);
  font-weight: 800; text-transform: uppercase;
  font-size: clamp(34px, 5.2vw, 64px);
  line-height: 0.98; letter-spacing: -0.025em;
  color: var(--text); margin: 0 0 22px;
}
body.lc-redesign .entry-content h2 {
  font-family: var(--sans); font-weight: 800; text-transform: uppercase;
  font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.02em;
  color: var(--text); margin: 56px 0 18px; scroll-margin-top: 96px;
}
body.lc-redesign .entry-content h3 {
  font-family: var(--sans); font-weight: 700;
  font-size: 21px; letter-spacing: -0.01em;
  color: var(--text); margin: 36px 0 12px;
}
body.lc-redesign .entry-content h4 { color: var(--text); font-weight: 700; margin: 24px 0 10px; }
body.lc-redesign .entry-content p { margin: 0 0 20px; }
body.lc-redesign .entry-content strong { color: var(--text); font-weight: 700; }
body.lc-redesign .entry-content a { color: var(--accent); border-bottom: 1px solid color-mix(in oklab, var(--accent) 40%, transparent); }
body.lc-redesign .entry-content a:hover { border-color: var(--accent); }
body.lc-redesign .entry-content ul { margin: 0 0 22px; padding: 0; list-style: none; }
body.lc-redesign .entry-content ul li {
  position: relative; padding: 8px 0 8px 26px;
  color: var(--text-2); border-bottom: 1px solid var(--line-soft); list-style: none;
}
body.lc-redesign .entry-content ul li::before {
  content: "→"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono);
}
body.lc-redesign .entry-content ol { color: var(--text-2); padding-left: 22px; margin: 0 0 22px; }
body.lc-redesign .entry-content blockquote {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: var(--radius);
  padding: 22px 24px; margin: 28px 0; color: var(--text-2);
}
body.lc-redesign .entry-content blockquote p { margin: 0; color: var(--text-2); font-size: 15.5px; }
body.lc-redesign .entry-content img,
body.lc-redesign .entry-content figure img { border-radius: var(--radius-lg); border: 1px solid var(--line-soft); }
body.lc-redesign .entry-content table {
  width: 100%; border-collapse: collapse; margin: 28px 0;
  border: 1px solid var(--line-soft); border-radius: var(--radius-lg); overflow: hidden;
}
body.lc-redesign .entry-content th { background: var(--surface); font-family: var(--mono);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted);
  text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
body.lc-redesign .entry-content td { padding: 14px 16px; border-top: 1px solid var(--line-soft); color: var(--text-2); }
body.lc-redesign .entry-content code { background: var(--surface); padding: 2px 6px; border-radius: 4px; font-family: var(--mono); font-size: 0.92em; color: var(--accent); }
body.lc-redesign .entry-content details { border-top: 1px solid var(--line-soft); }
body.lc-redesign .entry-content details summary {
  list-style: none; cursor: pointer; padding: 22px 0;
  display: flex; justify-content: space-between; gap: 20px;
  font-weight: 700; font-size: 18px; align-items: center; color: var(--text);
}
body.lc-redesign .entry-content details summary::-webkit-details-marker { display: none; }
body.lc-redesign .entry-content details summary::after {
  content: "+"; font-family: var(--mono); color: var(--accent); font-size: 24px; flex-shrink: 0; transition: transform .2s;
}
body.lc-redesign .entry-content details[open] summary::after { transform: rotate(45deg); }

/* Astra header/footer rendus dans le theme : on les noircit pour cohérence */
body.lc-redesign .site-header,
body.lc-redesign header.site-header,
body.lc-redesign .ast-primary-header-bar,
body.lc-redesign .main-header-bar {
  background: color-mix(in oklab, var(--bg) 86%, transparent) !important;
  border-bottom: 1px solid var(--line-soft) !important;
}
body.lc-redesign .site-title a,
body.lc-redesign .site-title,
body.lc-redesign .menu-item a,
body.lc-redesign .main-navigation a {
  color: var(--text) !important;
}
body.lc-redesign .site-footer,
body.lc-redesign footer.site-footer,
body.lc-redesign .site-below-footer-wrap {
  background: var(--bg-2) !important;
  color: var(--text-2) !important;
  border-top: 1px solid var(--line-soft) !important;
}
body.lc-redesign .site-footer a { color: var(--text-2) !important; }
body.lc-redesign .site-footer a:hover { color: var(--accent) !important; }

/* Bandeau preview retiré (bascule prod 02/06) */

/* CTA nav-cta : blindage couleur texte (anti-override par wp_head global a{color}) */
.site-header .btn-primary,
.site-header .btn-primary:hover,
.site-header .btn-primary:visited,
.site-header .btn-primary:focus,
body.lc-redesign .btn-primary { color: var(--accent-ink) !important; }
body.lc-redesign .btn-ghost { color: var(--text) !important; }

/* Override des inline styles ancien design (orange #EA580C + beige #FFF7ED) dans le contenu WP */
body.lc-redesign .body-inner [style*="background:#FFF7ED"],
body.lc-redesign .body-inner [style*="background:#fff7ed"] {
  background: var(--surface) !important;
  border-left-color: var(--accent) !important;
  color: var(--text-2) !important;
}
body.lc-redesign .body-inner [style*="color:#EA580C"],
body.lc-redesign .body-inner [style*="color:#ea580c"],
body.lc-redesign .body-inner [style*="color:#1e293b"],
body.lc-redesign .body-inner [style*="color:#1E293B"] { color: var(--accent) !important; }
body.lc-redesign .body-inner [style*="border-left:3px solid #EA580C"],
body.lc-redesign .body-inner [style*="border-left:3px solid #ea580c"] {
  border-left-color: var(--accent) !important;
}
/* Cards grid (ex: "Nos guides Programmes de callisthénie") : adapter au dark */
body.lc-redesign .body-inner [style*="background:#F8FAFC"],
body.lc-redesign .body-inner [style*="background:#f8fafc"],
body.lc-redesign .body-inner [style*="background:#FFFFFF"],
body.lc-redesign .body-inner [style*="background:#fff"],
body.lc-redesign .body-inner [style*="background:white"] {
  background: var(--surface) !important;
  color: var(--text) !important;
  border: 1px solid var(--line-soft) !important;
}
body.lc-redesign .body-inner a[style*="color"] { color: var(--accent) !important; }
body.lc-redesign .body-inner strong[style] { color: var(--text) !important; }

/* ===== Catégories home grid (sprint feedback : navigation thématique) ===== */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 980px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .cat-grid { grid-template-columns: 1fr; } }
.cat-card {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 22px 20px 56px; background: var(--surface);
  border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  transition: border-color .18s, transform .18s, background .18s;
  overflow: hidden;
}
.cat-card:hover { border-color: var(--accent); transform: translateY(-3px); background: color-mix(in oklab, var(--accent) 6%, var(--surface)); }
.cat-num {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: 0.14em; text-transform: uppercase;
}
.cat-card:hover .cat-num { color: var(--accent); }
.cat-title {
  font-family: var(--sans); font-weight: 800; font-size: 22px;
  text-transform: uppercase; letter-spacing: -0.01em; color: var(--text);
}
.cat-desc { font-size: 14px; line-height: 1.5; color: var(--muted); }
.cat-arrow {
  position: absolute; bottom: 18px; right: 20px;
  font-family: var(--mono); font-size: 22px; color: var(--accent);
  transition: transform .2s;
}
.cat-card:hover .cat-arrow { transform: translateX(4px); }
