/* ============================================================
   Mondrian rich pages — Références prestigieuses & Références métiers
   Adapted to the existing Isoar/SQUALP site:
   - Verdana everywhere (no Jost/Hanken/Space Mono)
   - existing --mondrian-* palette (red #FE0908, etc.)
   - black gridlines via the .wall gap+border trick
   Scoped under .mz so it never touches the rest of the site.
   ============================================================ */
.mz {
  --wl: var(--line-wall, 6px);                 /* black grid line thickness (site-consistent, bold) */
  --maxw: 1180px;
}

/* page wrapper overrides the single-card chapter look → full-flow rich page */
.refs-page {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  min-height: 0 !important;
  max-width: var(--maxw);
  margin: 0 auto !important;
  padding: 8px 16px 96px !important;
}

/* MÊMES règles de largeur que les cartes du livre (cf. menu.css --card) :
   sommaire OUVERT → contenu docké sous la colonne « fond blanc » du menu
   (Références→Actualités), largeur var(--card)+4px, marge gauche 180px ;
   sommaire FERMÉ → recentré en min(1500px, 100vw - 300px). */
@media (min-width: 1100px) {
  .mz.refs-page {
    width: min(1500px, calc(100vw - 300px));
    max-width: none;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  body.has-book-nav:not(.book-nav-collapsed) .mz.refs-page {
    width: calc(var(--card) + 4px);
    max-width: calc(var(--card) + 4px);
    margin-left: 180px !important;
    margin-right: auto !important;
  }
}

/* ---------- typography ---------- */
.mz h1, .mz h2, .mz h3, .mz .display {
  font-family: Verdana, Geneva, sans-serif;
  font-weight: 900; text-transform: uppercase; line-height: 1.1; letter-spacing: 0;   /* 1.02→1.1 : les accents É/È ne rognent plus / ne chevauchent plus la ligne au-dessus */
  color: var(--mondrian-black);
}
.mz .display-xl { font-size: clamp(2.2rem, 5.6vw, 4.6rem); }
.mz .display-l  { font-size: clamp(1.6rem, 3.4vw, 2.8rem); }
.mz .kicker {
  font-family: Verdana, Geneva, sans-serif; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.72rem;
}
.mz .lead { font-family: Verdana, Geneva, sans-serif; font-size: 1.05rem; line-height: 1.5; max-width: 60ch; }
.mz .muted { color: var(--mondrian-grey, #5B5B54); }
.mz a { color: inherit; text-decoration: none; }

/* ---------- the Mondrian wall primitive ---------- */
.mz .wall {
  display: grid; gap: var(--wl);
  background: var(--mondrian-black);
  border: var(--wl) solid var(--mondrian-black);
}
.mz .cell { background: #fff; position: relative; overflow: hidden; }
.mz .cell.red    { background: var(--mondrian-red);    color: #fff; }
.mz .cell.blue   { background: var(--mondrian-blue);   color: #fff; }
.mz .cell.yellow { background: var(--mondrian-yellow); color: var(--mondrian-black); }
.mz .cell.black  { background: var(--mondrian-black);  color: #fff; }

.mz .pad    { padding: clamp(1.1rem, 2.4vw, 2.2rem); }
.mz .pad-lg { padding: clamp(1.6rem, 4vw, 3.4rem); }
.mz .flexcol { display: flex; flex-direction: column; height: 100%; }
.mz .between { justify-content: space-between; }
.mz .center  { align-items: center; justify-content: center; text-align: center; }
.mz .grow    { flex: 1; }
.mz .label {
  font-family: Verdana, Geneva, sans-serif; font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.0;
}
.mz .statnum {
  font-family: Verdana, Geneva, sans-serif; font-weight: 900;
  font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1;
}

/* ---------- hover fill (colour sweeps up from the bottom) ---------- */
.mz .fill::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 0;
  background: var(--swatch, var(--mondrian-yellow));
  transition: height .42s cubic-bezier(.16,.84,.34,1); z-index: 0;
}
.mz .fill:hover::after { height: 100%; }
.mz .fill > * { position: relative; z-index: 1; }
.mz .fill.on-fill-dark:hover, .mz .fill.on-fill-dark:hover .muted { color: #fff !important; }

/* ---------- scroll reveal ---------- */
.mz .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.16,.84,.34,1); }
.mz .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .mz .reveal { opacity: 1; transform: none; transition: none; }
}

.mz .section { margin-top: var(--wl); }   /* 6px VOLONTAIRE : les murs consécutifs forment une grille continue (≠ --sp-*) */
.mz .section:first-child { margin-top: 0; }
.mz .section-head { margin: var(--sp-4, 32px) 0 var(--sp-2, 16px); }
/* sur-titre des sections : blanc cassé — le rouge sur le fond sarcelle était illisible
   (retour client 2026-07-07, « Un cadre commun à toutes nos formations »). */
.mz .section-head .kicker { display: block; margin-bottom: 0.7em; color: var(--mondrian-white, #F7F4EF); }

/* ---------- bandeau presse « SQUALP & Microsoft » (pages Références) ---------- */
.rm-press { display: grid; grid-template-columns: auto 1fr auto; gap: var(--wl, 6px); margin-top: var(--wl, 6px);
  margin-bottom: 22px;   /* écarte le bandeau du bloc « pays » → le survol (translate + ombre) ne couvre plus sa bordure */
  background: var(--mondrian-black); border: var(--wl, 6px) solid var(--mondrian-black); text-decoration: none;
  transition: box-shadow .2s ease, transform .2s ease; }
.rm-press:hover { box-shadow: 9px 9px 0 var(--mondrian-black); transform: translate(-3px,-3px); }
.rm-press > span { display: flex; align-items: center; padding: 15px 22px; }
.rm-press__tag { background: var(--mondrian-red); color: #fff; font-family: Verdana, Geneva, sans-serif; font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.86rem; white-space: nowrap; }
.rm-press__txt { background: #fff; color: var(--mondrian-black); font-weight: 700; font-size: 1.02rem; line-height: 1.35; }
.rm-press__go { background: var(--mondrian-yellow); color: var(--mondrian-black); font-weight: 900; white-space: nowrap; letter-spacing: 0.04em; }
@media (max-width: 700px){ .rm-press { grid-template-columns: 1fr; } .rm-press__tag, .rm-press__go { justify-content: center; } }
