/**
 * Block : CTA encadré
 * =================================
 * Reprend l'univers du CTA flottant (modal_cta) : dégradé bleu,
 * traits verts en diagonale, bouton vert "hover line".
 */

.ydu-cta-box {
  --ydu-cta-white: #ffffff;
  --ydu-cta-green: #b3f3a6;
  --ydu-cta-dark: #2c5566;

  position: relative;
  overflow: hidden;
  margin: 50px 0;
  border-radius: 5px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.25);
  background: radial-gradient(
    circle,
    rgba(43, 106, 133, 1) 10%,
    rgba(44, 85, 102, 1) 80%
  );
  color: var(--ydu-cta-white);
  font-family: "Inter", sans-serif;
  text-align: center;
}

/* Traits verts en diagonale (signature du site) */
.ydu-cta-box::before,
.ydu-cta-box::after {
  content: "";
  position: absolute;
  width: 100px;
  height: 2px;
  background-color: var(--ydu-cta-green);
  transform: rotate(-35deg);
  pointer-events: none;
}

.ydu-cta-box::before {
  top: 28px;
  left: -14px;
}

.ydu-cta-box::after {
  bottom: 28px;
  right: -14px;
}

.ydu-cta-box .ydu-cta-box__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 50px 60px;
}

.ydu-cta-box .ydu-cta-box__title {
  margin: 0 0 15px;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.15;
  color: var(--ydu-cta-white);
}

.ydu-cta-box .ydu-cta-box__text {
  max-width: 640px;
  margin: 0 0 30px;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--ydu-cta-white);
}

.ydu-cta-box .ydu-cta-box__title:last-child,
.ydu-cta-box .ydu-cta-box__text:last-child {
  margin-bottom: 0;
}

/* Bouton : même comportement que .button.button-hover-line du site */
.ydu-cta-box .ydu-cta-box__button {
  position: relative;
  z-index: 0;
  display: inline-block;
  padding: 20px 40px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1.2px;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ydu-cta-dark);
  background-color: transparent;
  border: 0;
  border-radius: 0;
  transition: color 0.3s;
}

.ydu-cta-box .ydu-cta-box__button::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--ydu-cta-green);
  transition: all 0.3s;
}

.ydu-cta-box .ydu-cta-box__button:hover,
.ydu-cta-box .ydu-cta-box__button:focus-visible {
  color: var(--ydu-cta-white);
  text-decoration: none;
}

.ydu-cta-box .ydu-cta-box__button:hover::before,
.ydu-cta-box .ydu-cta-box__button:focus-visible::before {
  width: 20px;
  left: calc(50% - 10px);
  clip-path: polygon(86% 0%, 100% 0%, 14% 100%, 0% 100%);
}

.ydu-cta-box .ydu-cta-box__button:focus-visible {
  outline: 2px solid var(--ydu-cta-green);
  outline-offset: 4px;
}

/* Éditeur : message quand le bloc est vide */
.ydu-cta-box__placeholder {
  padding: 20px;
  border: 1px dashed #2b6a85;
  color: #2b6a85;
  text-align: center;
}

@media screen and (max-width: 991px) {
  /* Pas d'effet "line" au survol sur tactile, comme le reste du site */
  .ydu-cta-box .ydu-cta-box__button:hover {
    color: var(--ydu-cta-dark);
  }

  .ydu-cta-box .ydu-cta-box__button:hover::before {
    width: 100%;
    left: 0;
    clip-path: none;
  }
}

@media screen and (max-width: 767px) {
  .ydu-cta-box {
    margin: 35px 0;
  }

  .ydu-cta-box::before {
    content: none;
  }

  .ydu-cta-box::after {
    opacity: 0.4;
  }

  .ydu-cta-box .ydu-cta-box__inner {
    padding: 35px 20px;
  }

  .ydu-cta-box .ydu-cta-box__title {
    font-size: 23px;
  }

  .ydu-cta-box .ydu-cta-box__text {
    font-size: 16px;
    margin-bottom: 25px;
  }

  .ydu-cta-box .ydu-cta-box__button {
    padding: 16px 25px;
    font-size: 13px;
  }
}
