/* ==========================================================================
   Cnam — Base element defaults & helpers.
   Applies the brand voice to raw HTML: Raleway body, Bleu-foncé ink,
   Rouge Cnam links, editorial headings.
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--text-strong);
  line-height: var(--lh-heading);
  font-weight: var(--fw-bold);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-weight: var(--fw-extrabold); letter-spacing: var(--ls-tight); }
h2 { font-size: var(--fs-h2); font-weight: var(--fw-extrabold); letter-spacing: var(--ls-tight); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { margin: 0 0 1em; text-wrap: pretty; }
p.lead { font-size: var(--fs-lead); line-height: var(--lh-snug); color: var(--text-body); }

a { color: var(--text-link); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; transition: color var(--dur-fast) var(--ease-standard); }
a:hover { color: var(--text-link-hover); }

small { font-size: var(--fs-body-sm); }
strong, b { font-weight: var(--fw-bold); }

::selection { background: var(--cnam-rouge); color: #fff; }

:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

hr { border: 0; border-top: var(--border-hair) solid var(--border-subtle); margin: var(--space-6) 0; }

/* --- Signature editorial helpers -------------------------------------------
   Reusable brand motifs so raw markup can pick them up without a component.  */

/* Eyebrow / uppercase label in Raleway */
.cnam-eyebrow {
  font-family: var(--font-sans);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-caption);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--cnam-rouge);
}

/* The "surtitre-encadré": two offset framed blocks (lower block shifted right),
   Crimson Pro SemiBold, contour Bleu foncé #11304C, fond blanc (charte p.28).
   Always top-left, always double, min. two words, first word capitalised. */
.cnam-surtitre {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  font-family: var(--font-surtitre);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-surtitre);
  line-height: 1.1;
  color: var(--cnam-bleu-fonce);
}
.cnam-surtitre > span {
  border: var(--border-frame) solid var(--cnam-bleu-fonce);
  padding: 0.35em 0.6em;
  background: #fff;
}
.cnam-surtitre > span + span { margin-top: calc(-1 * var(--border-frame)); margin-left: 1.4em; }
