/* ============================================================
   Charte des pages parent (accueil + pages marché)
   Style : moderne et chaleureux — fond crème, indigo profond,
   cartes arrondies, typographie Plus Jakarta Sans.
   Non versionné : les pages parent ne sont pas figées et se
   déploient toujours avec ce fichier.
   ============================================================ */

:root {
  --bg: #faf7f1;
  --ink: #1b1f3b;
  --muted: #6e7191;
  --accent: #3b3bd8;
  --accent-ink: #2e2eb8;
  --accent-soft: #ececfb;
  --coral: #f4684f;
  --card: #ffffff;
  --line: #ece7de;
  --line-hover: #ddd5c8;
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* Largeur fluide : marges latérales = la moitié de celles d'un conteneur fixe de 880px,
   à toute largeur d'écran — aucun saut de breakpoint (validé Elena, 2026-06-11). */
.shell { max-width: calc(50vw + 440px); margin: 0 auto; padding: 32px 24px 80px; }

/* ---------- en-tête de site (sticky, fin, uniforme sur tout le sous-domaine) ---------- */

.siteheader {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 241, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
/* Géométrie IDENTIQUE sur toutes les pages du sous-domaine (y compris les runs) :
   le logo ne bouge jamais d'une page à l'autre. Toute modification ici doit être
   répercutée dans le CSS inline des pages de runs. */
.siteheader-inner {
  max-width: calc(50vw + 550px);
  margin: 0 auto;
  padding: 11px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.siteheader .brand { font-size: 15.5px; }
.siteheader .crumb { margin-bottom: 0; }

/* décalage des ancres sous l'en-tête sticky */
[id] { scroll-margin-top: 74px; }
.brand {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.brand .dot { color: var(--coral); }
.crumb {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.crumb:hover { color: var(--accent); }

/* ---------- héros ---------- */

.hero { position: relative; margin-bottom: 56px; }
.hero::before {
  content: "";
  position: absolute;
  top: -120px; right: -80px;
  width: 420px; height: 420px;
  background: radial-gradient(closest-side, rgba(59, 59, 216, 0.07), transparent 70%);
  pointer-events: none;
}
.kicker {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
h1 {
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin: 0 0 16px;
}
.lede {
  font-size: 17px;
  color: var(--muted);
  max-width: 640px;
  margin: 0;
}

/* ---------- sections ---------- */

.section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 52px 0 18px;
}
.section-title:first-of-type { margin-top: 0; }
.section-title .sk { color: var(--accent); }

/* ---------- cartes (marchés et runs) ---------- */

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(27, 31, 59, 0.09);
  border-color: var(--line-hover);
}
.card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.card-body { min-width: 0; }
.card-title {
  display: block;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.card-meta {
  display: block;
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 3px;
}
.card-arrow {
  margin-left: auto;
  flex: none;
  color: var(--accent);
  font-weight: 700;
  font-size: 19px;
  transition: transform 0.18s ease;
}
.card:hover .card-arrow { transform: translateX(4px); }

.run-num {
  flex: none;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 7px 14px;
}

.empty {
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--line-hover);
  border-radius: var(--radius);
  padding: 22px 26px;
  font-size: 14.5px;
}

/* ---------- cartes compactes (liens de documentation) ---------- */

.cards.compact { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.cards.compact .card { padding: 16px 19px; gap: 12px; }
.cards.compact .card-title { font-size: 15px; }
.cards.compact .card-meta { font-size: 12.5px; }

/* ---------- navigation documentation (volontairement discrète — le cœur de la page, ce sont les marchés) ---------- */

.docnav {
  margin-top: 150px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
/* quand la navigation doc est présente, le footer se rattache à elle (zone de pied unique) */
main:has(.docnav) + .sitefoot {
  margin-top: 22px;
  padding-top: 0;
  border-top: none;
}
.docnav-title {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  opacity: 0.75;
  margin-bottom: 7px;
}
.docnav-links {
  font-size: 13.5px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 4px;
}
.docnav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.docnav-links a:hover { color: var(--accent); }
.docnav-links .sep { margin: 0 10px; color: var(--line-hover); }

/* ---------- pages de documentation ---------- */

.placeholder {
  background: var(--card);
  border: 1px dashed var(--line-hover);
  border-radius: var(--radius);
  padding: 30px;
  color: var(--muted);
  font-size: 15px;
}

.doc-section-h {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
}

.doc-table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.doc-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
.doc-table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 15px 18px 12px;
  border-bottom: 2px solid var(--line);
}
.doc-table td { padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.55; }
.doc-table tr:last-child td { border-bottom: none; }
.doc-table td.q { font-weight: 600; min-width: 190px; max-width: 240px; }

.kpis { list-style: none; margin: 0; padding: 0; }
.kpis li { margin-bottom: 7px; padding-left: 14px; position: relative; }
.kpis li::before { content: "·"; position: absolute; left: 2px; color: var(--accent); font-weight: 800; }
.kpis li:last-child { margin-bottom: 0; }

.fw {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 12.5px;
  padding: 6px 13px;
  border-radius: 999px;
  white-space: nowrap;
}
.fw-note { display: block; margin-top: 7px; font-size: 11.5px; color: var(--muted); }
a.fw { text-decoration: none; transition: background 0.15s ease, transform 0.15s ease; }
a.fw:hover { background: #dcdcf8; transform: translateY(-1px); }

/* fiches framework (bas de page Focus Skill 2) */
.fw-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 36px;
  scroll-margin-top: 76px;
}
.fw-card h3 { margin: 0 0 4px; font-size: 21px; letter-spacing: -0.015em; }
.fw-origin { color: var(--muted); font-size: 12.5px; margin: 0 0 10px; }
.fw-q { font-style: italic; color: var(--accent-ink); font-size: 14px; margin: 0 0 10px; }
.fw-card p { font-size: 14.5px; margin: 8px 0; line-height: 1.65; }
.fw-back {
  display: inline-block;
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
}
.fw-back:hover { color: var(--accent); }

/* visuel de framework (schéma SVG à droite du texte) */
.fw-body { display: flex; gap: 26px; align-items: center; }
.fw-text { flex: 1; min-width: 0; }
.fw-viz { flex: none; width: 232px; margin: 0; }
.fw-viz svg { display: block; width: 100%; height: auto; }
.fw-cap { font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 6px; }
@media (max-width: 720px) {
  .fw-body { flex-direction: column; align-items: stretch; }
  .fw-viz { width: 100%; max-width: 340px; margin: 0 auto; }
}

/* ---------- pied de page ---------- */

.sitefoot {
  margin-top: 72px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
}
.sitefoot a { color: var(--muted); }

@media (max-width: 560px) {
  .shell { padding-top: 24px; }
  .card { padding: 18px 20px; gap: 14px; }
}
