/**
 * "Notre mission" page (template: archery-mission-template.php).
 *
 * Loaded only on pages using that template, on top of css/generique.css (see
 * inc/enqueue.php). Like "Notre approche" and "Notre conviction", the prototype
 * (demo/notre-mission (2).html) is built from the "Page modèle" blocks, and
 * generique.css already carries all of them — the four profile cards, the
 * lever tags (.lev-k), the ODD band — big-screen scaling included. This file
 * only holds what the page does differently, scoped under `.msn`:
 *
 * - the .odd-cta button gets the same sizing as the .lh-btns ones, and sits
 *   at its content width instead of the full column;
 * - the goals are their official logos alone (.odd-logo), three per row; on
 *   desktop the two rows stretch to the full height of the text beside them
 *   (template-parts/mission/sdg.php).
 *
 * The prototype's standalone-header hacks (.ui-banner / .ui-footer overrides,
 * sticky Menu clone) are dropped, as on every inner page: the theme's inner
 * banner (template-parts/inner-banner.php) renders that row.
 */

/* ============================================================
   Le cadre du parcours collectif
   ============================================================ */

/* .ui-btn-dark is display:flex, so in a plain block it stretches to the full
   column. A flex container shrinks it to its content, like in .lh-btns. */
.msn .odd-cta {
  display: flex;
}

.msn .odd-cta a {
  height: auto;
  padding: 6.8px 11.8px;
  line-height: normal;
  white-space: nowrap;
}

/* Logos, three per row. The list stretches to the text column's height and
   its rows share it equally, so two rows of logos fill the block. Each card
   keeps generique.css's border and padding; the logo fills the space inside
   that padding (absolutely, so it never pushes the rows taller) and contain
   keeps any non-square file uncropped. */
.msn .odd {
  align-items: stretch;
}

.msn .odd-list {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(0, 1fr);
}

.msn .odd-list li {
  position: relative;
  justify-content: center;
  align-items: center;
  min-height: 0;
}

.msn .odd-logo {
  position: absolute;
  top: 18px;
  right: 20px;
  bottom: 18px;
  left: 20px;
  width: calc(100% - 40px);
  height: calc(100% - 36px);
  object-fit: contain;
}

/* Stacked layout (text above the list): no column height to share, so each
   card is a square instead. */
@media (max-width: 1050px) {
  .msn .odd-list {
    grid-auto-rows: auto;
  }

  .msn .odd-list li {
    aspect-ratio: 1;
  }
}

/* ============================================================
   Responsive
   ============================================================ */

/* Big screens: px → vw at the 1440px design width, like generique.css. */
@media (min-width: 1700px) {
  .msn .odd-cta a {
    padding: 0.47225vw 0.81949vw;
  }

  .msn .odd-logo {
    top: 1.25008vw;
    right: 1.38897vw;
    bottom: 1.25008vw;
    left: 1.38897vw;
    width: calc(100% - 2.77794vw);
    height: calc(100% - 2.50016vw);
  }
}
