/* ==========================================================================
   MovieSport — ms-pages.css (DA v3) : composants de pages (formules, boutique,
   comparatif, catalogue). Chargé sur toutes les pages.
   ========================================================================== */

/* ---------- En-tête éditorial sur fond sombre (formules, collection) ---------- */
.ms-formules, .ms-shop { background: var(--ms-ink); color: var(--ms-bone); --fg: var(--ms-bone); --bg: var(--ms-ink); --muted: var(--ms-sand); --line: rgb(242 237 228 / .2); }
.ms-formules__head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: end; gap: 18px clamp(28px, 6vw, 120px); padding-top: var(--ms-sec); padding-bottom: clamp(40px, 5vw, 72px); }
.ms-formules__head .ms-paper__kicker { grid-column: 1 / -1; margin-bottom: 0; }
.ms-formules__title { font-size: clamp(2.8rem, 6.2vw, 6.6rem); line-height: .98; letter-spacing: -.03em; }
.ms-formules__title em { font-style: italic; }
.ms-formules__lead { color: var(--muted); max-width: 44ch; padding-bottom: .5em; }
.ms-formules--page .ms-formules__head { padding-top: calc(var(--ms-hh) + clamp(56px, 9vw, 130px)); }
@media (max-width: 900px) { .ms-formules__head { grid-template-columns: 1fr; } }

/* ---------- Boutique : tuiles produit (maquettes Tops / Hydration) ---------- */
.ms-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
.ms-tile { position: relative; isolation: isolate; overflow: clip; display: grid; place-items: end center; aspect-ratio: 4 / 5; max-height: 110vh; color: var(--ms-bone); scroll-margin-top: var(--ms-hh); }
.ms-tile--wide { grid-column: 1 / -1; aspect-ratio: 16 / 9; max-height: none; }
.ms-tile .ms-media img { transition: transform 1.6s var(--ms-ease); }
.ms-tile:hover .ms-media img { transform: scale(1.04); }
.ms-tile__n { position: absolute; top: clamp(18px, 2.4vw, 36px); left: clamp(18px, 2.4vw, 36px); }
.ms-tile__center { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 24px 24px clamp(28px, 4vw, 56px); }
.ms-tile .ms-scrim { background: linear-gradient(0deg, rgb(8 6 4 / .85) 0%, rgb(8 6 4 / .35) 38%, rgb(8 6 4 / 0) 60%), linear-gradient(180deg, rgb(8 6 4 / .35), rgb(8 6 4 / 0) 22%); }
.ms-tile__name { font-size: clamp(2.6rem, 5vw, 5.4rem); line-height: .98; letter-spacing: -.025em; }
.ms-tile__center .ms-prod__base { margin-top: 0; font-size: .74rem; }
.ms-tile__center .ms-btn { margin-top: 8px; }
@media (max-width: 760px) { .ms-tiles { grid-template-columns: 1fr; } .ms-tile--wide { aspect-ratio: 4 / 5; } }

/* ---------- Comparatif (page magazine) ---------- */
.ms-compare { overflow-x: auto; border-top: 1.5px solid var(--fg); }
.ms-compare table { width: 100%; min-width: 620px; border-collapse: collapse; table-layout: fixed; }
.ms-compare thead th:first-child { width: 38%; }
@media (max-width: 700px) {
	.ms-compare { overflow: visible; }
	.ms-compare table { min-width: 0; table-layout: auto; }
	.ms-compare thead tr, .ms-compare tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ms-compare thead th:first-child { display: none; }
	.ms-compare thead th { font-size: 1.15rem; padding: 18px 4px; }
	.ms-compare thead th span { font-size: .56rem; letter-spacing: .1em; }
	.ms-compare tbody th { grid-column: 1 / -1; padding: 14px 0 2px; border-bottom: 0; font-size: .92rem; }
	.ms-compare tbody td { font-size: .56rem; letter-spacing: .08em; padding: 6px 2px 14px; }
}
.ms-compare th, .ms-compare td { padding: 15px 12px; border-bottom: 1px solid var(--line); text-align: center; font-weight: 400; }
.ms-compare thead th { font-family: var(--ms-f-serif); font-size: clamp(1.5rem, 2.2vw, 2.2rem); line-height: 1; letter-spacing: -.02em; padding-block: 26px; vertical-align: bottom; }
.ms-compare thead th span { display: block; margin-top: 10px; font-family: var(--ms-f-mono); text-transform: uppercase; font-size: .7rem; letter-spacing: .2em; color: var(--muted); }
.ms-compare tbody th { text-align: left; padding-left: 0; font-size: .98rem; }
.ms-compare tbody td { font-family: var(--ms-f-mono); text-transform: uppercase; font-size: .7rem; letter-spacing: .16em; }
.ms-compare td:nth-child(3), .ms-compare thead th:nth-child(3) { background: rgb(11 10 9 / .05); }

/* ---------- Catalogue /programmes/ (index typographique) ---------- */
.ms-catalog__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; margin-bottom: clamp(32px, 4vw, 56px); padding-block: 18px; border-block: 1px solid var(--line); }
.ms-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ms-chip { min-height: 38px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--fg); cursor: pointer; font: 400 .66rem/1 var(--ms-f-mono); letter-spacing: .16em; text-transform: uppercase; transition: background-color var(--ms-d) var(--ms-ease), color var(--ms-d) var(--ms-ease), border-color var(--ms-d) var(--ms-ease); }
.ms-chip:hover { border-color: var(--fg); }
.ms-chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.ms-catalog__count { font-family: var(--ms-f-mono); text-transform: uppercase; font-size: .7rem; letter-spacing: .2em; color: var(--muted); white-space: nowrap; }
.ms-catalog__group { scroll-margin-top: calc(var(--ms-hh) + 24px); }
.ms-catalog__group + .ms-catalog__group { margin-top: clamp(48px, 6vw, 88px); }
.ms-catalog__note { margin-top: clamp(40px, 5vw, 64px); }
