/* ==========================================================================
   ClaudIn — Layout : rail fixe + grille à filets + bento + CTA
   ========================================================================== */

/* ---- Shell ------------------------------------------------------------- */
.shell {
  display: grid;
  grid-template-columns: var(--rail-w) 1fr;
  min-height: 100vh;
}

/* ---- Rail de navigation (fixe, gauche) --------------------------------- */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.75rem 1.5rem;
  border-right: 1px solid var(--line);
  background: var(--bg);
  z-index: 40;
}

.rail__brand {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.rail__brand .dot { color: var(--accent); }

.rail__nav { display: flex; flex-direction: column; gap: 0.85rem; }
.rail__nav a {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s var(--ease);
  width: max-content;
}
.rail__nav a:hover,
.rail__nav a.is-active { color: var(--fg); }
.rail__nav a.is-active { position: relative; }
.rail__nav a.is-active::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 50%;
  width: 8px;
  height: 1px;
  background: var(--accent);
}

.rail__foot { display: flex; flex-direction: column; gap: 1rem; }
.rail__foot .mono { color: var(--muted); }
.rail__foot a:hover { color: var(--fg); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s var(--ease);
}
.theme-toggle:hover { color: var(--fg); }
.theme-toggle__dot {
  width: 9px; height: 9px; border-radius: 50%;
  border: 1px solid var(--line-strong);
}
:root[data-theme="light"] .theme-toggle__dot { background: var(--fg); border-color: var(--fg); }

/* ---- Persistent top-right CTA ------------------------------------------ */
.topcta {
  position: fixed;
  top: 1.75rem;
  right: var(--pad-x);
  z-index: 45;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  gap: 0.5rem;
  mix-blend-mode: normal;
}
.topcta .arrow { transition: transform 0.3s var(--ease); }
.topcta:hover .arrow { transform: translateX(4px); }

/* ---- Main content ------------------------------------------------------ */
.content {
  grid-column: 2;
  width: 100%;
  min-width: 0; /* empêche le contenu max-content (marquee) de gonfler la grille */
}

.section {
  padding: var(--pad-y) var(--pad-x);
  border-bottom: 1px solid var(--line);
  position: relative;
}

.section__kicker {
  display: inline-block;
  color: var(--accent);
  margin-bottom: 2.5rem;
}

.lead { font-size: var(--fs-lead); line-height: 1.25; max-width: 26ch; letter-spacing: -0.01em; }
.prose { max-width: var(--maxread); color: var(--muted); }
.prose + .prose { margin-top: 1.25rem; }
.prose strong { color: var(--fg); font-weight: 600; }

h2.section__title { font-size: var(--fs-h2); max-width: 18ch; }

/* ---- CTA pattern : phrase, filet, lien → aligné droite ----------------- */
.cta-block { margin-top: 3rem; }
.cta-block__hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
.link-arrow {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.link-arrow .arrow { transition: transform 0.3s var(--ease); }
.link-arrow:hover .arrow { transform: translateX(5px); }
.cta-block .link-arrow { float: right; }
.cta-block::after { content: ""; display: block; clear: both; }

/* ---- Bento grid -------------------------------------------------------- */
.bento {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
}
.cell {
  padding: clamp(1.75rem, 3vw, 3rem);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 320px;
}
.bento .cell:nth-child(2n) { border-right: 0; }
.bento .cell:nth-last-child(-n+2):not(:nth-child(2n-1) ~ *) {}
.cell__label { color: var(--accent); }
.cell__title { font-size: var(--fs-h3); letter-spacing: -0.015em; }
.cell__desc { color: var(--muted); max-width: 46ch; }
.cell__fig { margin-top: auto; padding-top: 1.5rem; }

/* ---- 3 colonnes (valeur) ----------------------------------------------- */
.cols3 {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.col {
  padding: 2.5rem 2rem 2.5rem 0;
  border-right: 1px solid var(--line);
  padding-left: 2rem;
}
.cols3 .col:first-child { padding-left: 0; }
.cols3 .col:last-child { border-right: 0; }
.col__num { color: var(--accent); margin-bottom: 1.25rem; display: block; }
.col__title { font-size: var(--fs-h3); margin-bottom: 1rem; }

/* ---- Liste numérotée i / ii / iii -------------------------------------- */
.problems { margin-top: 3rem; display: grid; gap: 0; border-top: 1px solid var(--line); max-width: 70ch; }
.problem {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
}
.problem__num { color: var(--accent); padding-top: 0.2rem; }
.problem__txt strong { display: block; color: var(--fg); margin-bottom: 0.35rem; font-weight: 600; }
.problem__txt span { color: var(--muted); }

/* ---- Exergue ----------------------------------------------------------- */
.pull {
  margin-top: 3rem;
  padding: 2rem 0 0;
  border-top: 1px solid var(--line);
  font-size: var(--fs-lead);
  line-height: 1.3;
  max-width: 30ch;
  letter-spacing: -0.01em;
}

/* ---- Timeline pilote (3 mois) ------------------------------------------ */
.timeline { margin-top: 3.5rem; border-top: 1px solid var(--line); }
.tl-step {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 2rem;
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--line);
}
.tl-step__m { color: var(--accent); }
.tl-step__t { font-size: var(--fs-h3); margin-bottom: 0.6rem; }
.tl-step__d { color: var(--muted); max-width: 60ch; }

/* ---- Figures blueprint -------------------------------------------------- */
.fig { width: 100%; height: auto; }
.fig [data-draw] {
  fill: none;
  stroke: var(--fg);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.fig .hidden-line { stroke-dasharray: 4 4; opacity: 0.45; }
.fig .dot-fill { fill: var(--fg); stroke: none; }
.fig .accent-stroke { stroke: var(--accent); }
.fig .accent-fill { fill: var(--accent); stroke: none; }
.fig text {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  fill: var(--muted);
  text-transform: uppercase;
}
/* schéma animé en boucle : clic = pause / relance (curseur inchangé, volontairement) */
.fig--anim { cursor: default; }
