/* ==========================================================
   Page Template: Convention des entreprises pour le climat (CEC)
   Desktop calé sur la maquette Figma (canvas 1440, marge 123px).
   ========================================================== */

/* Le thème pousse un padding-top global (header fixe). On le recale sur la
   vraie hauteur du header (95px) pour cette page uniquement. */
body.page-template-page-cec,
body.page-template-page-cec-php,
body.page-template-page-cec.admin-bar,
body.page-template-page-cec-php.admin-bar {
  padding-top: 95px !important;
}

.tebior-cec {
  /* Couleurs exactes de la maquette Figma (le thème utilise un bleu/foncé
     légèrement différents : #26619C / #2C2C2C). */
  --cec-blue: #005da4;
  --cec-ink: #2f3031;
  --cec-cream: #f5efe6;
  --cec-columbia: #c1d9ec;
  background: var(--cec-cream);
  font-family: "Funnel Display", sans-serif;
}

.tebior-cec .cec-container {
  max-width: 1194px; /* 1440 - 2 x 123 */
  margin: 0 auto;
  padding: 0;
}

/* ===================== HERO ===================== */
.tebior-cec .cec-hero {
  position: relative;
  padding: 102px 0 70px;
  overflow: hidden;
}

.tebior-cec .cec-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-repeat: no-repeat, no-repeat;
  background-size: 1100px auto, 1100px auto;
  background-position: -260px -120px, calc(100% + 320px) 60px;
  background-image: var(--cec-topography-1, none), var(--cec-topography-2, none);
}

.tebior-cec .cec-hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--cec-blue);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 100px;
  font-size: 110px;
}

.tebior-cec .cec-divider {
  width: 100%;
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--cec-blue);
}

/* ============== SECTION GRADIENT (intro + leviers) ============== */
.tebior-cec .cec-section-gradient {
  position: relative;
  overflow: hidden;
  background: linear-gradient(196deg, #f5efe6 8%, #c1d9ec 78%);
  isolation: isolate;
}

.tebior-cec .cec-topography {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.5;
  pointer-events: none;
  background-repeat: no-repeat, no-repeat;
  background-size: 1481px auto, 1481px auto;
  background-position: center top, center 980px;
  background-image: var(--cec-topography-1, none), var(--cec-topography-2, none);
}

/* ===================== INTRO ===================== */
.tebior-cec .cec-intro {
  position: relative;
  z-index: 1;
  padding: 83px 0 72px;
}

.tebior-cec .cec-intro .cec-container {
  position: relative;
  min-height: 548px;
}

.tebior-cec .cec-h2 {
  margin: 0 0 35px;
  color: var(--cec-blue);
  font-weight: 300;
  line-height: 66px;
  font-size: 60px;
  max-width: 811px;
}

.tebior-cec .cec-two-cols {
  display: flex;
  flex-wrap: nowrap;
  gap: 94px;
  align-items: flex-start;
  justify-content: flex-start;
}

.tebior-cec .cec-two-cols > .cec-body {
  width: 372px;
  flex: 0 0 372px;
}

.tebior-cec .cec-two-cols > .cec-col-right {
  width: 432px;
  flex: 0 0 432px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.tebior-cec .cec-body {
  color: var(--cec-ink);
  font-weight: 300;
  font-size: 18px;
  line-height: 22px;
}

/* Le thème force globalement p { font-size:24px; font-weight:400 } en !important
   (style.css @media min-width:1024px). On rétablit les valeurs Figma ici. */
.tebior-cec .cec-body p {
  margin: 0 0 14px;
  font-family: "Funnel Display", sans-serif !important;
  font-size: 18px !important;
  font-weight: 300 !important;
  line-height: 22px !important;
}

.tebior-cec .cec-body p:last-child {
  margin-bottom: 0;
}

.tebior-cec .cec-body strong {
  font-weight: 700;
}

.tebior-cec .cec-body span {
  font-weight: 300;
  /* Le thème colore globalement les <span> en bleu : on rétablit la couleur
     du paragraphe parent (foncé) pour le corps de texte. */
  color: inherit !important;
}

.tebior-cec .cec-objective {
  color: var(--cec-blue);
}

.tebior-cec .cec-objective .cec-objective-title {
  margin: 0;
  font-family: "Funnel Display", sans-serif !important;
  font-weight: 400 !important;
  font-size: 34px !important;
  line-height: 40px !important;
}

.tebior-cec .cec-objective .cec-objective-title strong {
  font-weight: 700 !important;
}

.tebior-cec .cec-objective .cec-objective-scopes {
  font-size: 24px !important;
}

.tebior-cec .cec-objective-sub {
  max-width: 432px;
}

/* Image arche du hero (fleur) — coin haut-gauche arrondi r=150, comme Figma */
.tebior-cec .cec-masks {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  pointer-events: none;
}

.tebior-cec .cec-mask {
  position: absolute;
  border-radius: 150px 0 0 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.tebior-cec .cec-mask.cec-mask--flower {
  top: 9px;
  left: 953px;
  width: 230px;
  height: 518px;
  background-image: var(--cec-img-hero-left, none);
}

/* ===================== LEVIERS ===================== */
.tebior-cec .cec-levers {
  position: relative;
  z-index: 1;
  padding: 0 0 88px;
  overflow: hidden;
}

.tebior-cec .cec-lever-swiper-wrap {
  width: 100%;
  --cec-track-offset: 123px;
  padding-left: var(--cec-track-offset);
  box-sizing: border-box;
  overflow: visible;
  min-height: min-content;
}

.tebior-cec .cec-lever-swiper {
  width: 100%;
  padding: 0 0 8px;
  overflow: visible;
}

.tebior-cec .cec-lever-swiper .swiper-wrapper {
  display: flex;
  align-items: flex-start;
  transition-duration: 0ms !important;
  transition-timing-function: linear !important;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.tebior-cec .cec-lever-slide {
  --cec-slide-height: 508px;
  height: var(--cec-slide-height) !important;
  overflow: visible;
  flex-shrink: 0;
  display: block;
  align-self: flex-start;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.tebior-cec .cec-lever-slide--clone {
  pointer-events: none;
}

.tebior-cec .cec-lever-slide--clone .cec-card-toggle {
  display: none;
}

.tebior-cec .cec-lever-slide.is-expanded {
  z-index: 5;
  height: var(--cec-slide-open-height) !important;
}

/* Quand une carte est ouverte, laisser le contenu dépasser la hauteur
   fixe du slide (508px) et agrandir la section leviers. */
.tebior-cec .cec-levers:has(.cec-lever.is-open) {
  overflow: visible;
}

.tebior-cec .cec-section-gradient:has(.cec-lever.is-open) {
  overflow: visible;
}

.tebior-cec .cec-lever-slide--w555 {
  width: 555px;
}

.tebior-cec .cec-lever-slide--w611 {
  width: 611px;
}

.tebior-cec .cec-lever {
  height: 100%;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.tebior-cec .cec-lever.cec-collapsible.is-open {
  position: relative;
  z-index: 2;
}

.tebior-cec .cec-lever-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  background: var(--cec-blue);
  color: var(--cec-cream);
  font-weight: 400;
  font-size: 22px;
  line-height: 26px;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  padding: 16px 20px;
}

.tebior-cec .cec-card {
  position: relative;
  flex: 1;
  background: var(--cec-cream);
  border: 1px solid var(--cec-blue);
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.03);
  padding: 0 0 40px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* --- Cartes repliables (JS : initCollapsibles) --- */
.tebior-cec .cec-lever.cec-collapsible .cec-card {
  flex: 0 0 auto;
  height: 450px;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 74px;
  transition: height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.tebior-cec .cec-lever.cec-collapsible.is-open .cec-card {
  height: auto;
  overflow: visible;
}

.tebior-cec .cec-lever.cec-collapsible .cec-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 96px;
  pointer-events: none;
  background: linear-gradient(rgba(245, 239, 230, 0), var(--cec-cream) 78%);
  transition: opacity 0.25s ease;
}

.tebior-cec .cec-lever.cec-collapsible.is-open .cec-card::after {
  opacity: 0;
}

.tebior-cec .cec-card-toggle {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: auto;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--cec-blue);
  border-radius: 50%;
  background: var(--cec-cream);
  color: var(--cec-blue);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.tebior-cec .cec-card-toggle:hover {
  background: var(--cec-blue);
  color: var(--cec-cream);
}

.tebior-cec .cec-card-toggle svg {
  transition: transform 0.3s ease;
}

.tebior-cec .cec-lever.is-open .cec-card-toggle svg {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .tebior-cec .cec-lever.cec-collapsible .cec-card {
    transition: none;
  }
}

.tebior-cec .cec-lever-photo-wrap {
  width: 100%;
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
}

.tebior-cec .cec-lever-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tebior-cec .cec-card-intro,
.tebior-cec .cec-card-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 40px;
}

.tebior-cec .cec-card-intro {
  padding-top: 30px;
}

.tebior-cec .cec-card h3 {
  margin: 0;
  color: var(--cec-blue);
  font-weight: 400;
  font-size: 34px;
  line-height: 40px;
}

.tebior-cec .cec-card .cec-kicker {
  margin: 0;
  color: var(--cec-ink);
  font-family: "Funnel Display", sans-serif !important;
  font-weight: 300 !important;
  font-size: 18px !important;
  line-height: 22px !important;
}

.tebior-cec .cec-card h4 {
  margin: 0;
  color: var(--cec-ink);
  font-weight: 400;
  font-size: 22px;
  line-height: 26px;
  letter-spacing: 0.88px;
  text-transform: uppercase;
}

.tebior-cec .cec-card ul {
  margin: 0;
  padding-left: 27px;
  color: var(--cec-ink);
  font-weight: 300;
  font-size: 18px;
  line-height: 26px;
}

.tebior-cec .cec-card li {
  margin-bottom: 0;
}

/* ===================== SECTION ÉCOSYSTÈME ===================== */
.tebior-cec .cec-section-ecosystem {
  position: relative;
  background: var(--cec-columbia);
  padding: 90px 0 110px;
  overflow: hidden;
}

.tebior-cec .cec-section-ecosystem .cec-container {
  position: relative;
  min-height: 640px;
}

.tebior-cec .cec-section-ecosystem .cec-h2 {
  margin: 0;
}

.tebior-cec .cec-eco-grid {
  position: static;
}

.tebior-cec .cec-eco-text-block {
  width: 288px;
  margin-top: 26px;
  margin-left: 4px;
}

.tebior-cec .cec-eco-lead {
  font-family: "Funnel Display", sans-serif !important;
  font-weight: 400 !important;
  font-size: 24px !important;
  line-height: 30px !important;
  color: var(--cec-ink);
  margin: 0 0 10px;
}

.tebior-cec .cec-eco-text {
  font-family: "Funnel Display", sans-serif !important;
  font-weight: 300 !important;
  font-size: 18px !important;
  line-height: 22px !important;
  color: var(--cec-ink);
  margin: 0;
}

.tebior-cec .cec-eco-masks {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  pointer-events: none;
}

.tebior-cec .cec-mask.cec-mask--eco-bg {
  top: 156px;
  left: 429px;
  width: 893px;
  height: 421px;
  background-image: var(--cec-img-eco, none);
}

/* ==========================================================
   RESPONSIVE (approche maison, à partir de 1199px)
   ========================================================== */
@media (max-width: 1199px) {
  .tebior-cec .cec-container {
    padding: 0 32px;
  }

  .tebior-cec .cec-hero h1 {
    font-size: clamp(40px, 7.6vw, 96px);
    line-height: 0.92;
  }

  .tebior-cec .cec-h2 {
    font-size: clamp(32px, 4.8vw, 56px);
    line-height: 1.1;
  }

  /* Intro : on repasse en flux normal, image sous le texte */
  .tebior-cec .cec-intro .cec-container {
    min-height: 0;
  }

  .tebior-cec .cec-two-cols {
    flex-wrap: wrap;
    gap: 40px;
  }

  .tebior-cec .cec-two-cols > .cec-body,
  .tebior-cec .cec-two-cols > .cec-col-right {
    width: 100%;
    flex: 1 1 320px;
  }

  .tebior-cec .cec-masks {
    position: static;
    height: auto;
    margin-top: 40px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
  }

  .tebior-cec .cec-mask.cec-mask--flower {
    position: static;
  }

  .tebior-cec .cec-mask.cec-mask--flower {
    width: 280px;
    height: 520px;
  }

  /* Écosystème : image sous le texte */
  .tebior-cec .cec-section-ecosystem .cec-container {
    min-height: 0;
  }

  .tebior-cec .cec-eco-text-block {
    width: 100%;
    max-width: 520px;
    margin-top: 30px;
  }

  .tebior-cec .cec-eco-masks {
    position: static;
    height: auto;
    margin-top: 40px;
  }

  .tebior-cec .cec-mask.cec-mask--eco-bg {
    position: static;
    width: 100%;
    max-width: 893px;
    height: clamp(280px, 40vw, 421px);
  }
}

@media (max-width: 992px) {
  .tebior-cec .cec-hero {
    padding: 70px 0 48px;
  }

  .tebior-cec .cec-intro {
    padding: 56px 0 30px;
  }

  .tebior-cec .cec-lever-slide--w555,
  .tebior-cec .cec-lever-slide--w611 {
    width: 86vw;
    max-width: 460px;
  }

  .tebior-cec .cec-lever-swiper-wrap {
    --cec-track-offset: 32px;
  }

  .tebior-cec .cec-section-ecosystem {
    padding: 64px 0 72px;
  }
}

@media (max-width: 576px) {
  .tebior-cec .cec-container {
    padding: 0 20px;
  }

  .tebior-cec .cec-lever-swiper-wrap {
    --cec-track-offset: 20px;
  }

  .tebior-cec .cec-card {
    padding-bottom: 26px;
    gap: 24px;
  }

  .tebior-cec .cec-card-intro,
  .tebior-cec .cec-card-block {
    padding-left: 26px;
    padding-right: 26px;
  }

  .tebior-cec .cec-card-intro {
    padding-top: 24px;
  }

  .tebior-cec .cec-lever-photo-wrap {
    height: 160px;
  }

  .tebior-cec .cec-card h3 {
    font-size: 28px;
    line-height: 34px;
  }

  .tebior-cec .cec-mask.cec-mask--flower {
    width: 220px;
    height: 410px;
  }
}
