/* ==========================================================================
   Entropy — Grilles et rythme vertical
   ========================================================================== */

.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell--wide { max-width: 1600px; }
.shell--tight { max-width: 1080px; }

.section {
  position: relative;
  padding-block: var(--section-y);
}

.section--flush-top { padding-top: 0; }
.section--flush-bottom { padding-bottom: 0; }

.section--paper-deep { background: var(--paper-deep); }
.section--surface { background: var(--surface); }

.section--night {
  background: var(--night);
  color: #F2F1ED;
  --line: var(--line-invert);
  --line-strong: rgba(255, 255, 255, 0.24);
  --ink: #F6F5F1;
  --ink-soft: #D8D6CF;
  --ink-muted: #93918A;
  --ink-faint: #6E6C66;
  --surface: var(--night-soft);
}

/* --- En-tête de section : titre à gauche, chapô à droite (cf. référence) - */

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 5rem);
  align-items: end;
  margin-bottom: var(--block-y);
}

.section-head__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  max-width: 44ch;
  padding-bottom: 0.4rem;
}

.section-head__aside p {
  font-size: 0.95rem;
  line-height: 1.68;
  color: var(--ink-muted);
}

.section-head--stack {
  grid-template-columns: 1fr;
  justify-items: start;
}

/* --- Grille générique --------------------------------------------------- */

.grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.75rem);
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stack   { display: flex; flex-direction: column; }
.stack-1 { gap: 0.5rem; }
.stack-2 { gap: 1rem; }
.stack-3 { gap: 1.75rem; }
.stack-4 { gap: 2.75rem; }

.row {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.6vw, 1.25rem);
  flex-wrap: wrap;
}

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
}

/* --- Numérotation de section (01 / 02 / 03) ---------------------------- */

.section-index {
  font-family: var(--font-display);
  font-size: var(--fs-label);
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
