/* ==========================================================================
   À propos page (template-a-propos.php).
   Loaded only for that page template (see functions.php), after main.css.

   Every section is dynamised through ACF; the .ui-apropos-intro-content rules
   style the raw output of the "Texte de présentation" WYSIWYG field.
   Animations live in js/a-propos.js.
   ========================================================================== */

/* ---- Reveal on scroll ---------------------------------------------------- */
/* Blocks are visible by default and only armed by js/a-propos.js when they
   start below the fold, so the copy stays readable without JavaScript. */
.ui-apropos-reveal {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.8s cubic-bezier(0.22, 0.7, 0.2, 1),
    transform 0.8s cubic-bezier(0.22, 0.7, 0.2, 1);
}

.ui-apropos-reveal.is-armed {
  opacity: 0;
  transform: translateY(28px);
}

.ui-apropos-reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---- Hero ---------------------------------------------------------------- */
.ui-apropos-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 400px;
  min-height: 300px;
  overflow: hidden;
  background: #111;
}

.ui-apropos-hero .ui-apropos-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

.ui-apropos-hero .ui-apropos-hero-title {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 900px;
  padding-inline: 20px;
  font-family: 'Neue Montreal', sans-serif;
  font-weight: 500;
  font-size: clamp(36px, 5.5vw, 72px);
  line-height: 1.1;
  letter-spacing: -1.8px;
  text-align: center;
  text-transform: uppercase;
  color: #fff;
}

/* one masked line per ACF line — the inner span is what slides up */
.ui-apropos-hero .ui-apropos-hero-line {
  display: block;
  overflow: hidden;
}

.ui-apropos-hero .ui-apropos-hero-line > span {
  display: block;
  will-change: transform;
}

/* ---- Présentation (ACF heading + WP editor content) ---------------------- */
.ui-apropos-intro {
  max-width: 1200px;
  margin-inline: auto;
  padding: clamp(48px, 6.5vw, 74px) clamp(20px, 4vw, 30px) clamp(32px, 4vw, 56px);
  background: #111;
}

.ui-apropos-intro .ui-apropos-intro-inner {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.4vw, 32px);
}

.ui-apropos-intro .ui-apropos-intro-title {
  margin: 0 auto;
  max-width: 610px;
  font-family: 'Neue Montreal', sans-serif;
  font-weight: 500;
  font-size: clamp(32px, 5vw, 36px);
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  color: #fff;
}

.ui-apropos-intro .ui-apropos-intro-highlight {
  display: inline-block;
  padding: 0 8px;
  border: 2px solid #c3ff74;
  background: #c3ff74;
  color: #111;
}

.ui-apropos-intro-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ui-apropos-intro-content p {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 150%;
  color: #b0b0b0;
}

.ui-apropos-intro-content strong,
.ui-apropos-intro-content b {
  color: #fff;
  font-weight: 500;
}

.ui-apropos-intro-content a {
  color: #c3ff74;
  text-decoration: underline;
}

.ui-apropos-intro-content a:hover {
  color: #eaff66;
}

/* Pasted embeds (Canva, YouTube…) keep their own size but never overflow. */
.ui-apropos-intro-content iframe {
  display: block;
  max-width: 100%;
  margin: 0 auto;
}

/* Rich text from the WYSIWYG: headings, lists, emphasis, quotes. */
.ui-apropos-intro-content h2,
.ui-apropos-intro-content h3,
.ui-apropos-intro-content h4 {
  margin: 0;
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  line-height: 1.15;
  color: #fff;
}

.ui-apropos-intro-content h2 {
  font-size: clamp(22px, 2.6vw, 30px);
}

.ui-apropos-intro-content h3 {
  font-size: clamp(20px, 2.2vw, 25px);
}

.ui-apropos-intro-content h4 {
  font-size: 20px;
}

.ui-apropos-intro-content ul,
.ui-apropos-intro-content ol {
  margin: 0;
  padding-left: 1.4em;
  font-size: 18px;
  font-weight: 500;
  line-height: 150%;
  color: #b0b0b0;
}

.ui-apropos-intro-content ul {
  list-style: disc;
}

.ui-apropos-intro-content ol {
  list-style: decimal;
}

.ui-apropos-intro-content li {
  margin: 0 0 8px;
}

.ui-apropos-intro-content li:last-child {
  margin-bottom: 0;
}

.ui-apropos-intro-content li::marker {
  color: #c3ff74;
}

.ui-apropos-intro-content em,
.ui-apropos-intro-content i {
  font-style: italic;
}

.ui-apropos-intro-content blockquote {
  margin: 0;
  border-left: 6px solid #c3ff74;
  padding-left: clamp(14px, 1.6vw, 22px);
  font-size: 18px;
  font-weight: 500;
  line-height: 150%;
  color: #fff;
}

/* ---- Éco-responsabilité -------------------------------------------------- */
.ui-apropos-eco {
  max-width: 1200px;
  margin-inline: auto;
  padding: 0 clamp(20px, 4vw, 30px) clamp(48px, 6vw, 90px);
  background: #111;
}

.ui-apropos-eco .ui-apropos-eco-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: clamp(16px, 2vw, 28px);
}

.ui-apropos-eco .ui-apropos-eco-head h2 {
  margin: 0;
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 1;
  letter-spacing: -1px;
  text-transform: uppercase;
  color: #fff;
}

.ui-apropos-eco .ui-apropos-eco-head p {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 150%;
  color: #b0b0b0;
}

.ui-apropos-eco .ui-apropos-eco-list {
  display: flex;
  flex-direction: column;
}

/* the row shifts right on hover — 14px stays inside the section padding, so
   it never pushes the page into a horizontal scroll */
.ui-apropos-eco .ui-apropos-eco-row {
  display: grid;
  grid-template-columns: clamp(64px, 7vw, 120px) minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(16px, 2.5vw, 40px);
  align-items: start;
  border-top: 1px solid #575757;
  padding: clamp(22px, 2.6vw, 36px) 0 clamp(22px, 2.6vw, 36px) 12px;
  transition:
    background 0.35s ease,
    transform 0.35s cubic-bezier(0.22, 0.7, 0.2, 1);
}

.ui-apropos-eco .ui-apropos-eco-row:last-child {
  border-bottom: 1px solid #575757;
}

.ui-apropos-eco .ui-apropos-eco-row:hover {
  background: var(--row-accent, #c3ff74);
  transform: translateX(14px);
}

.ui-apropos-eco .ui-apropos-eco-row:hover .ui-apropos-eco-num,
.ui-apropos-eco .ui-apropos-eco-row:hover h3,
.ui-apropos-eco .ui-apropos-eco-row:hover p {
  color: #111;
}

.ui-apropos-eco .ui-apropos-eco-num {
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  font-size: 36px;
  line-height: 0.9;
  letter-spacing: -2px;
  color: var(--row-accent, #c3ff74);
  transition: color 0.35s ease;
}

.ui-apropos-eco .ui-apropos-eco-row h3 {
  margin: 0;
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.08;
  letter-spacing: -0.6px;
  text-transform: uppercase;
  color: #fff;
  transition: color 0.35s ease;
}

.ui-apropos-eco .ui-apropos-eco-row p {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 150%;
  color: #b0b0b0;
  transition: color 0.35s ease;
}

/* ---- Média (poster + click-to-play YouTube embed) ----------------------- */
.ui-apropos-media {
  padding: 0 clamp(20px, 4vw, 30px);
  background: #111;
}

.ui-apropos-media .ui-apropos-media-frame {
  border: 1px solid #575757;
}

.ui-apropos-media .ui-apropos-media-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.ui-apropos-media .ui-apropos-media-player img,
.ui-apropos-media .ui-apropos-media-player iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.ui-apropos-media .ui-apropos-media-player img {
  object-fit: cover;
}

.ui-apropos-media .ui-apropos-media-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: rgba(17, 17, 17, 0.35);
}

.ui-apropos-media .ui-apropos-media-play span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(64px, 7vw, 88px);
  height: clamp(64px, 7vw, 88px);
  background: #c3ff74;
  color: #000;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

.ui-apropos-media .ui-apropos-media-play:hover span {
  background: #0082fe;
  color: #fff;
}

.ui-apropos-media .ui-apropos-media-play svg {
  flex: none;
}

.ui-apropos-media .ui-apropos-media-caption:first-child {
  border-top: 0; /* link-only media: no player above, so no divider */
}
.ui-apropos-media .ui-apropos-media-caption {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  border-top: 1px solid #575757;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  color: #575757;
}

.ui-apropos-media .ui-apropos-media-caption a {
  color: #c3ff74;
  text-decoration: underline;
}

.ui-apropos-media .ui-apropos-media-caption a:hover {
  color: #eaff66;
}

/* ---- CTA ---------------------------------------------------------------- */
.ui-apropos-cta {
  padding: clamp(48px, 6vw, 90px) clamp(20px, 4vw, 30px);
  background: #111;
}

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

.ui-apropos-cta .ui-apropos-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;
}

.ui-apropos-cta .ui-apropos-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;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

.ui-apropos-cta .ui-apropos-cta-btn:hover {
  background: #0082fe;
  color: #fff;
}

.ui-apropos-cta .ui-apropos-cta-btn svg {
  flex: none;
}

/* ---- Responsive ---------------------------------------------------------- */
/* the éco rows drop the third column, the description moving under the title */
@media (max-width: 900px) {
  .ui-apropos-eco .ui-apropos-eco-row {
    grid-template-columns: clamp(48px, 10vw, 64px) minmax(0, 1fr);
  }

  .ui-apropos-eco .ui-apropos-eco-row > div {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .ui-apropos-eco .ui-apropos-eco-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .ui-apropos-eco .ui-apropos-eco-row > div {
    grid-column: 1;
  }

  .ui-apropos-cta .ui-apropos-cta-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding-inline: 16px;
    font-size: 16px;
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ui-apropos-reveal,
  .ui-apropos-eco .ui-apropos-eco-row,
  .ui-apropos-eco .ui-apropos-eco-num,
  .ui-apropos-eco .ui-apropos-eco-row h3,
  .ui-apropos-eco .ui-apropos-eco-row p {
    transition: none;
  }

  .ui-apropos-eco .ui-apropos-eco-row:hover {
    transform: none;
  }
}
