/* ============================================================
   layout.css — Conteneur, rythme des sections, grilles
   ============================================================ */

/* --- Conteneur principal : centré, gouttières fluides --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* Pied de page collé en bas : main absorbe l'espace libre sur les pages courtes */
main {
  flex: 1 0 auto;
}

/* --- Section générique (utilisée par les sections suivantes) --- */
.section {
  padding-block: var(--section-pad);
}

.section--mist { background: var(--bg-alt); }
.section--offwhite { background: var(--bg); }
.section--night {
  background: var(--bg-night);
  color: var(--text-on-night);
}

/* base.css impose `color: var(--text)` sur h1–h4 : sur fond nuit, le titre
   héritait bien du blanc de la section mais la règle sur l'élément lui-même
   reprenait la couleur du fond (titre invisible). On rétablit le blanc. */
.section--night h1,
.section--night h2,
.section--night h3,
.section--night h4 {
  color: var(--text-on-night);
}

/* En-tête de section : titre + introduction centrés */
.section__header {
  max-width: 42rem;
  margin-inline: auto;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

/* h1 sur les pages intérieures (ex. page Estimation) */
.section__header h1,
.section__header h2 { margin-bottom: 0.75rem; }

.section__header p {
  color: var(--text-muted);
}

.section--night .section__header p { color: var(--text-muted-night); }


.section__title {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 600;
}

/* Wrapper du contenu de section (pages simples : 404, confidentialité,
   mentions légales). Espace le contenu sous l'en-tête de section. */
.section__body {
  margin-top: 1rem;
}

/* Liens dans le texte courant : le soulignement les rend identifiables
   sans dépendre de la couleur (WCAG 1.4.1). */
.section__body a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
