:root {
  --esc-ink: #1a2f1b;
  --esc-olive: #6c6d33;
  --esc-sage: #57735d;
  --esc-sand: #f2eadd;
  --esc-cream: #f7f3eb;
  --esc-paper: #fdfaF4;
  --esc-copy: rgba(26, 47, 27, .78);
}

.esc-formations {
  background: var(--esc-sand);
}

.esc-formations__hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  width: 100vw;
  height: 430px;
  overflow: hidden;
  isolation: isolate;
  background-color: #111111;
  background-position: center;
  background-repeat: no-repeat;
}

/* Cream gradient overlay */
.esc-formations__hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    180deg,
    rgba(242, 234, 221, 0.90) 0%,
    rgba(242, 234, 221, 0.70) 50%,
    rgba(242, 234, 221, 0.95) 100%
  );
}

/* Content container */
.esc-formations__hero-container{
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  margin-top: auto;
  margin-bottom: auto;
  padding: 0 192px;
  min-height: 280px;
}

/* Eyebrow */
.esc-formations__hero-eyebrow {
  font-family: "Poppins", sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 17px;
  letter-spacing: 2.534px;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* Title (two lines, different type treatments) */
.esc-formations__hero-title {
  display: flex;
  flex-direction: column;
  margin: 0px 0px 8px 0px;
  width: 100%;
  line-height: 0.98;
}

.esc-formations__hero-title-line1,
.esc-formations__hero-title-line2 {
  display: block;
  font-size: 72px;
  letter-spacing: -1.8px;
}

.esc-formations__hero-title-line1 {
  font-family: "Cormorant-Garamond";
  font-weight: 400;
  color: var(--color-text);
}

.esc-formations__hero-title-line2 {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400;
  color: var(--color-accent);
}

/* Description */
#esc-formations__hero-description span {
  display: block;
  max-width: 800px;
  font-family: "Poppins";
  font-weight: 400;
  font-size: 18px;
  line-height: 29px;
  color: var(--color-text-faint);
}

/* ==========================================
   Formations
   ========================================== */

.esc-formations-body {
  padding: 64px 24px;
  background: #f2eadd;
}

.esc-formations__container {
  display: flex;
  flex-direction: column;
  gap: 32px;

  width: min(1104px, 100%);
  margin: 0 auto;
}

/* Card */

.esc-formations__card {
  box-sizing: border-box;
  display: flex;
  align-items: stretch;
  gap: 32px;

  width: 100%;
  min-height: 329px;
  padding: 40px;

  background: #fdfaf4;
  border: 1px solid rgba(26, 47, 27, 0.1);
  border-radius: 20px;
}

.esc-formations__main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

/* Metadata */

.esc-formations__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 12px;
  min-height: 24px;
}

.esc-formations__level {
  color: #57735d;
  font-family: "Poppins", sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 2.534px;
  text-transform: uppercase;
}

.esc-formations__separator {
  color: rgba(26, 47, 27, 0.3);
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  line-height: 24px;
}

.esc-formations__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  color: rgba(26, 47, 27, 0.65);
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
}

/* Text */

.esc-formations__title {
  margin: 16px 0 0;

  color: #1a2f1b;
  font-family: "Cormorant-Garamond", serif;
  font-size: 36px;
  font-weight: 400;
  line-height: 40px;
  letter-spacing: -0.36px;
}

.esc-formations__description {
  max-width: 671px;
  margin: 12px 0 0;

  color: rgba(26, 47, 27, 0.8);
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
}

.esc-formations__audience {
  max-width: 671px;
  margin: 12px 0 0;

  color: rgba(26, 47, 27, 0.6);
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.esc-formations__audience span {
  display: inline-block;
  margin-right: 10px;

  color: #57735d;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 2.534px;
  text-transform: uppercase;
}

/* Program link */

.esc-formations__program-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0px;
  border-radius: 20px;
  text-decoration: none;
  font-family: "Poppins";
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  white-space: normal;
  color: var(--color-text);
  width: fit-content;
  transition:
    transform  0.2s ease,
    opacity    0.2s ease;
}

.esc-formations__program-link a {
  position: relative;
  font-family: "Poppins";
  font-weight: 400 !important; /* !important keeps theme from overriding */
  color: var(--color-primary) !important;
  white-space: nowrap;
}

.esc-formations__program-link a::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  bottom: -4px;
}

.esc-formations__program-link a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Reverse direction on mouse-out */
.esc-formations__program-link a:not(:hover)::after {
  transform-origin: right;
}

/* Price panel */

.esc-formations__offer {
  box-sizing: border-box;
  display: flex;
  flex: 0 0 318px;
  flex-direction: column;
  justify-content: space-between;
  align-self: flex-start;

  min-height: 212px;
  padding: 24px;

  background: #f2eadd;
  border: 1px solid rgba(26, 47, 27, 0.1);
  border-radius: 16px;
}

.esc-formations__price-label {
  margin: 0;

  color: #57735d;
  font-family: "Poppins", sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 2.534px;
  text-transform: uppercase;
}

.esc-formations__price {
  margin: 8px 0 0;

  color: #1a2f1b;
  font-family: "Cormorant-Garamond", serif;
  font-size: 36px;
  font-weight: 400;
  line-height: 40px;
}

.esc-formations__payment {
  margin: 8px 0 0;

  color: rgba(26, 47, 27, 0.6);
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
}

/* Registration button */

.esc-formations__button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  width: 100%;
  min-height: 48px;
  margin-top: 24px;
  padding: 12px 24px;

  color: #f7f3eb;
  background: #1a2f1b;
  border: 1px solid #1a2f1b;
  border-radius: 999px;

  font-family: "Poppins", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  text-align: center;
  text-decoration: none;

  transition:
    color 0.25s ease,
    background 0.25s ease;
}


.esc-formations__button:hover {
  color: #1a2f1b;
  background: transparent;
  text-decoration: none;
}

/* --- Category hero: mobile --- */
@media (max-width: 768px) {
  .esc-formations__hero {
    height: 460px;
    display: block;
    padding: 64px 12px 36px;
  }

  .esc-formations__hero-container {
    padding: 0 12px;
    gap: 20px;
  }

  .esc-formations__hero-title-line1,
  .esc-formations__hero-title-line2 {
    font-size: 40px;
    line-height: 46px;
    letter-spacing: -1.2px;
    max-width: 100%;
  }

  .esc-formations__hero-description {
    font-size: 16px;
    line-height: 26px;
  }

  .esc-formations__card {
    flex-direction: column;
  }

  .esc-formations__offer {
    flex: none;
    align-self: stretch;
    width: 100%;
  }

  .esc-formations__title {
    font-size: 30px;
  }

  .esc-formations__offer a {
    margin-top: 12px;
  }

}