/**
 * Formation block.
 *
 * @package Krizia
 */

/* ==========================================================
   BLOCK
   ========================================================== */

.krz-formation {
  --krz-formation-background: #e7dccf;
  --krz-formation-padding-top: 0px;
  --krz-formation-padding-bottom: 0px;

  min-height: 0;
  overflow: visible;
  position: relative;
  width: 100%;
}

/* ==========================================================
   SURFACE
   ========================================================== */

.krz-formation__surface {
  background: var(--krz-formation-background);
  min-height: 0;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 100%;
}

/* ==========================================================
   LAYOUT
   ========================================================== */

.krz-formation__container {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  width: 100%;
}

.krz-formation__row {
  align-items: stretch;
  min-height: 0;
}

.krz-formation__row > [class*="col-"] {
  min-height: 0;
  position: relative;
}

.krz-formation__content {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;

  margin-left: auto;
  margin-right: auto;

  max-width: 600px;
  min-height: 0;
  width: 100%;

  padding:
    clamp(8rem, 10vw, 10rem)    /* haut */
    0                           /* droite */
    clamp(11rem, 14vw, 13rem)   /* bas */
    clamp(1rem, 2vw, 2rem);     /* gauche */
}

/* ==========================================================
   TYPOGRAPHY
   ========================================================== */

.krz-formation__title {
  border: 0;
  clear: none;
  color: #361e0c;
  font-family: "Spectral", Georgia, serif;
  font-size: 36px;
  font-weight: 200;
  letter-spacing: 0.2em;
  line-height: 44px;
  margin: 0;
  margin-right: -0.2em;
  padding: 0;
  text-transform: uppercase;
}

.krz-formation__kicker {
  color: #7d451b;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.4em;
  line-height: 28px;
  margin: 1.25rem 0 0;
  margin-right: -0.4em;
  text-transform: uppercase;
}

.krz-formation__text {
  color: #361e0c;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 34px;
  margin-top: 2rem;
}

.krz-formation__text--alt {
  margin-top: 1.5rem;
}

.krz-formation__text p {
  margin: 0;
}

.krz-formation__text p + p {
  margin-top: 1.5rem;
}

.krz-formation__text strong {
  color: #361e0c;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 34px;
}

/* ==========================================================
   IMAGE
   ========================================================== */

.krz-formation__image {
  display: block;
  height: 100%;
  inset: 0;
  min-height: 0;
  object-fit: cover;
  object-position: center 40%;
  position: absolute;
  width: 100%;
}

/* ==========================================================
   TABLET
   ========================================================== */

@media screen and (max-width: 991px) {

  .krz-formation,
  .krz-formation__surface,
  .krz-formation__row {
    min-height: 0;
  }

  .krz-formation__row > [class*="col-"] {
    min-height: 0;
    position: relative;
  }

  .krz-formation__content {
    min-height: 0;

    /* Plus aucun padding horizontal */
    padding:
      4.5rem
      0
      4.5rem
      0;
  }

  .krz-formation__image {
    position: relative;
    inset: auto;

    /* On enlève complètement le recadrage desktop */
    width: 100%;
    height: auto;
    min-height: 0;

    object-fit: initial;
    object-position: initial;
  }
}

/* ==========================================================
   MOBILE
   ========================================================== */

@media screen and (max-width: 767px) {
  .krz-formation__content {
    padding: 4rem 2.15rem 3rem;
    text-align: center;
  }

  .krz-formation__title {
    font-size: 30px;
    letter-spacing: 0.2em;
    line-height: 48px;
    margin-right: -0.2em;
    text-align: center;
  }

  .krz-formation__kicker {
    font-size: 16px;
    letter-spacing: 0.4em;
    line-height: 28px;
    margin-right: -0.4em;
    margin-top: 1.5rem;
    text-align: center;
  }

  .krz-formation__text,
  .krz-formation__text strong {
    font-size: 18px;
    letter-spacing: 0.04em;
    line-height: 34px;
  }

  .krz-formation__text {
    margin-top: 1.65rem;
  }

  .krz-formation__text--alt {
    margin-top: 1.4rem;
  }

  .krz-formation__image {
    min-height: 0;
  }
}

/* ==========================================================
   GUTENBERG
   ========================================================== */

.editor-styles-wrapper .krz-formation__surface {
  min-height: 520px;
}

/* ==========================================================
   STATEMENT -> FORMATION OVERLAP FIX
   ========================================================== */

/*
 * Force le chevauchement standard lorsque Formation suit Statement.
 * La règle margin-block-start neutralise également le block gap
 * éventuellement ajouté par WordPress.
 */
.krz-statement + .krz-formation {
  margin-block-start: calc(var(--krz-block-overlap) * -1) !important;
  margin-top: calc(var(--krz-block-overlap) * -1) !important;
}