/* ============================================================
   IRIQ · Mise en page
   Enveloppe, grille, sections, typographie appliquee.
   Mobile d'abord : une colonne, puis enrichissement par min-width.
   ============================================================ */

.enveloppe {
  max-width: var(--contenu-max);
  margin-inline: auto;
  padding-inline: var(--marge-laterale);
}
.enveloppe--etroite { max-width: 780px; }
/* Le catalogue perd un quart de sa largeur au profit de la colonne de
   filtres. Une enveloppe plus large lui rend la place necessaire pour
   presenter quatre cartes de front sur un ecran courant. */
.enveloppe--large { max-width: 1600px; }

.section { padding-block: var(--e-12); }
.section--serree { padding-block: var(--e-8); }
.section--creme { background: var(--surface-alt); }
.section--nuit { background: var(--surface-sombre); color: var(--iriq-marine-100); }
.section--nuit h1, .section--nuit h2, .section--nuit h3, .section--nuit h4 { color: var(--iriq-blanc); }
.section--nuit a { color: var(--iriq-bleu-200); }

/* Grille. En dessous de 768 px tout occupe la colonne unique.
   Les classes .col-N prennent effet a 768 px, les .col-b-N a 1024 px. */
.grille {
  display: grid;
  gap: var(--gouttiere);
  grid-template-columns: 1fr;
}
.grille > * { min-width: 0; }

.pile { display: flex; flex-direction: column; }
.pile--2 { gap: var(--e-2); }
.pile--3 { gap: var(--e-3); }
.pile--4 { gap: var(--e-4); }
.pile--6 { gap: var(--e-6); }

.rangee { display: flex; align-items: center; gap: var(--e-3); flex-wrap: wrap; }
.rangee--haut { align-items: flex-start; }
.rangee--entre { justify-content: space-between; }
.pousse { margin-inline-start: auto; }

.grille-auto {
  display: grid;
  gap: var(--gouttiere);
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.grille-auto--large { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grille-auto--petite { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

@media (min-width: 768px) {
  .section { padding-block: var(--e-16); }
  .section--serree { padding-block: var(--e-12); }
  .grille { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .col-1 { grid-column: span 1; }   .col-2 { grid-column: span 2; }
  .col-3 { grid-column: span 3; }   .col-4 { grid-column: span 4; }
  .col-5 { grid-column: span 5; }   .col-6 { grid-column: span 6; }
  .col-7 { grid-column: span 7; }   .col-8 { grid-column: span 8; }
  .col-9 { grid-column: span 9; }   .col-10 { grid-column: span 10; }
  .col-11 { grid-column: span 11; } .col-12 { grid-column: span 12; }
}

@media (min-width: 1024px) {
  .section { padding-block: var(--e-20); }
  .col-b-1 { grid-column: span 1; }   .col-b-2 { grid-column: span 2; }
  .col-b-3 { grid-column: span 3; }   .col-b-4 { grid-column: span 4; }
  .col-b-5 { grid-column: span 5; }   .col-b-6 { grid-column: span 6; }
  .col-b-7 { grid-column: span 7; }   .col-b-8 { grid-column: span 8; }
  .col-b-9 { grid-column: span 9; }   .col-b-10 { grid-column: span 10; }
  .col-b-11 { grid-column: span 11; } .col-b-12 { grid-column: span 12; }
}

/* ---------- Typographie appliquee ---------- */
.surtitre {
  font-family: var(--police-titre);
  font-size: var(--ts-surtitre);
  font-weight: 600;
  letter-spacing: var(--ls-surtitre);
  text-transform: uppercase;
  color: var(--iriq-bleu-800);
  display: flex;
  align-items: center;
  gap: var(--e-3);
  margin-bottom: var(--e-4);
}
.surtitre::before {
  content: ""; width: 18px; height: 1px; flex: none;
  background: var(--iriq-bleu-600);
  box-shadow: 0 -3px 0 -2.5px var(--iriq-bleu-600), 0 3px 0 -2.5px var(--iriq-bleu-600);
}
.section--nuit .surtitre { color: var(--iriq-bleu-200); }
.section--nuit .surtitre::before { background: var(--iriq-ocre-400); }

.affiche {
  font-family: var(--police-titre);
  font-size: var(--ts-affiche);
  line-height: var(--il-affiche);
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--iriq-marine-700);
  margin: 0 0 var(--e-5);
}
.chapo {
  font-size: var(--ts-corps-lg);
  line-height: var(--il-corps-lg);
  color: var(--texte-secondaire);
  max-width: 62ch;
}
.legende { font-size: var(--ts-legende); line-height: var(--il-legende); color: var(--texte-secondaire); }
.mention { font-size: var(--ts-mention); line-height: var(--il-mention); color: var(--texte-secondaire); }
.nombre { font-variant-numeric: tabular-nums; }
.mesure { max-width: 70ch; }

