/* ==========================================================================
   Mots des Ministres page (template-mot-des-ministres.php)
   Hero card over a photo, intro message, flip-card ministers grid, signatures
   band, CTA. Static UI ported from demo/Mots des Ministres.html. Scroll-reveal
   and tap-to-flip in js/mot-des-ministres.js.
   ========================================================================== */

/* ---- Scroll reveal (armed by JS; visible by default without JS) ----------- */
.mn-reveal.js-armed {
  opacity: 0;
  transform: translateY(24px);
}

.mn-reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 0.7, 0.2, 1);
}

/* ---- Hero ---------------------------------------------------------------- */
.mn-hero {
  position: relative;
  overflow: hidden;
  background: #111;
}

.mn-hero-media {
  position: relative;
  height: clamp(360px, 44vw, 560px);
}

.mn-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mn-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.55) 0%, rgba(17, 17, 17, 0.1) 45%, rgba(17, 17, 17, 0.6) 100%);
}

.mn-hero-eyebrow {
  position: absolute;
  top: clamp(20px, 3vw, 36px);
  left: clamp(20px, 4vw, 30px);
  background: #111;
  color: #efff8b;
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  padding: 8px 16px;
}

.mn-hero-card {
  position: absolute;
  left: clamp(20px, 4vw, 30px);
  right: clamp(20px, 4vw, 30px);
  bottom: 0;
  transform: translateY(clamp(24px, 4vw, 56px));
  max-width: 900px;
  background: #efff8b;
  border: 1px solid #111;
  padding: clamp(26px, 3.4vw, 52px) clamp(22px, 3vw, 44px);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 24px);
}

.mn-hero-title {
  margin: 0;
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  font-size: clamp(30px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -2px;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  color: #111;
}

.mn-hero-rule {
  height: 8px;
  background: #111;
}

.mn-hero-lead {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 150%;
  color: #1d2122;
}

.mn-hero-spacer {
  height: clamp(56px, 7vw, 96px);
  background: #111;
}

/* ---- Message ------------------------------------------------------------- */
.mn-message-section {
  padding: clamp(48px, 6.5vw, 110px) clamp(20px, 4vw, 30px) clamp(32px, 4vw, 56px);
  background: #111;
}

.mn-message {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.4vw, 32px);
  border-top: 1px solid #575757;
  padding-top: 24px;
}

.mn-message-title {
  margin: 0;
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1;
  letter-spacing: -1px;
  text-transform: uppercase;
  color: #fff;
}

.mn-message-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mn-message-body p {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 150%;
  color: #b0b0b0;
}

/* WYSIWYG links take the page's main colour (overrides the lime default
   set for all rich-text bodies in main.css). */
.mn-message-body a {
  color: #efff8b;
  text-decoration: underline;
  text-decoration-color: #efff8b;
  text-underline-offset: 3px;
}

.mn-message-body a:hover {
  color: #fff;
}

/* Bullets and numbering follow the same page colour (lime default in main.css). */
.mn-message-body li::marker {
  color: #efff8b;
}

/* ---- Ministers grid ------------------------------------------------------ */
.mn-list-section {
  padding: clamp(24px, 3vw, 44px) clamp(20px, 4vw, 30px) clamp(48px, 6vw, 90px);
  background: #111;
}

.mn-list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
  margin-bottom: clamp(16px, 2vw, 28px);
}

.mn-list-title {
  margin: 0;
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1;
  letter-spacing: -1px;
  text-transform: uppercase;
  color: #fff;
}

.mn-list-note {
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  color: #575757;
}

.mn-list-rule {
  height: 8px;
  background: #efff8b;
  margin-bottom: clamp(20px, 2.6vw, 36px);
}

.mn-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}

.mn-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #575757;
  background: #161616;
}

/* Flip: front portrait / back quote. Flips on hover and on tap (.is-flipped). */
.mn-flip {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  border: none;
  border-bottom: 1px solid #575757;
  padding: 0;
  background: transparent;
  overflow: hidden;
  perspective: 1400px;
  cursor: pointer;
}

/* No note → card does not flip: plain portrait, no pointer. */
.mn-flip--static {
  cursor: default;
}

.mn-flip-in {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.22, 0.7, 0.2, 1);
}

.mn-card:hover .mn-flip-in,
.mn-card.is-flipped .mn-flip-in {
  transform: rotateY(180deg);
}

.mn-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.mn-face-front {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  overflow: hidden;
}

.mn-face-front img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(1) contrast(1.04);
  transition: filter 0.45s ease;
}

/* Colour in on hover (flipping cards keep front visible only until they turn). */
.mn-card:hover .mn-face-front img {
  filter: none;
}

.mn-por-ph {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #575757;
}

.mn-face-back {
  background: var(--ac, #efff8b);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: clamp(18px, 2vw, 26px);
  transform: rotateY(180deg);
}

.mn-back-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #111;
  opacity: 0.72;
}

.mn-back-quote {
  margin: 0;
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  font-size: clamp(15px, 1.5vw, 20px);
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: #111;
  text-wrap: pretty;
}

.mn-back-bar {
  width: 44px;
  height: 8px;
  background: #111;
}

.mn-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(18px, 2vw, 26px);
}

.mn-name {
  margin: 0;
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.06;
  letter-spacing: -0.6px;
  text-transform: uppercase;
  color: #fff;
}

.mn-role {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 145%;
  color: #fff;
}

.mn-region {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 150%;
  color: #8a8a8a;
}

/* ---- Signatures media band ----------------------------------------------- */
.mn-media-section {
  padding: 0 clamp(20px, 4vw, 30px);
  background: #111;
}

.mn-media {
  border: 1px solid #575757;
}

.mn-media-figure {
  line-height: 0;
}

.mn-media-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.mn-media-band {
  background: #161616;
  min-height: clamp(200px, 24vw, 320px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.mn-media-line {
  width: 56px;
  height: 1px;
  background: #575757;
}

.mn-media-label {
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  color: #575757;
  text-align: center;
  padding-inline: 16px;
}

.mn-media-caption {
  border-top: 1px solid #575757;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  color: #575757;
}

/* ---- CTA ----------------------------------------------------------------- */
.mn-cta-section {
  padding: clamp(48px, 6vw, 90px) clamp(20px, 4vw, 30px) clamp(72px, 9vw, 140px);
  background: #111;
}

.mn-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  background: #c3ff74;
  padding: clamp(28px, 3.5vw, 44px) clamp(24px, 3vw, 40px);
}

.mn-cta-text {
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.6px;
  text-transform: uppercase;
  color: #111;
}

.mn-cta-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  background: #111;
  color: #c3ff74;
  font-size: 18px;
  font-weight: 500;
  text-transform: uppercase;
  text-decoration: none;
}

.mn-cta-btn svg {
  flex: none;
}

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 960px) {
  .mn-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .mn-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mn-flip-in {
    transition: none;
  }
}
