/**
 * Theme Name: Coach en amour
 */

@keyframes bump {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-0.5rem);
  }
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.05);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(1);
  }
}

* {
  box-sizing: border-box;
}

:root {
  --rose: var(--wp--preset--color--custom-rose);
  --orange: var(--wp--preset--color--custom-orange);
  --jaune: var(--wp--preset--color--custom-jaune);
  --cyan: var(--wp--preset--color--custom-cyan);
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background-color: var(--rose);
  color: white;
  font-family: var(--wp--preset--font-family--ibm-plex-sans);
  overflow-x: hidden;
  font-size: 1.125rem;
  line-height: 1.875rem;
  &:not(.home) {
    *:has(> .site-header) + .wp-block-group {
      padding-top: 5rem;
      flex-grow: 1;
    }
  }
}

@media (width> 724px) {
  body {
    &:not(.home) {
      *:has(> .site-header) + .wp-block-group {
        padding-top: 9rem;
      }
    }
  }
}

body .wp-site-blocks {
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  header + .wp-block-group {
    flex-grow: 1;
  }
}

strong {
  font-weight: 600;
}

h3 + p,
h3 + ul {
  margin-top: -1rem !important;
}

a {
  color: inherit;
}

h2.wp-block-heading {
  font-size: 2.5rem;
  line-height: 3rem;
  margin-left: -0.75rem;
}

.site-header {
  padding: 1rem 1.5rem;
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 20;
  transition: all 0.5s ease;
  h1 {
    font-size: 1.25rem;
    font-weight: 500;
  }
  nav {
    ul {
      gap: 0.5rem;
    }
  }
  button {
    padding: 0;
    svg {
      width: 1.25rem;
      height: auto;
    }
  }
  &.header--hidden {
    transform: translateY(-110%);
  }
  &.header--scrolling {
    background-color: var(--rose);
    color: white;
    box-shadow: 0 0.125rem 0.125rem rgba(0, 0, 0, 0.2);
  }

  .wp-block-navigation-item {
    padding: 0.25em 0.75em;
    border-radius: 1em;
    border: solid thin transparent;
    transition: all 0.3s;
    &.current-menu-item,
    &:hover {
      border: solid thin white;
      background-color: rgba(255, 255, 255, 0.1);
      margin-left: 1.25rem;
    }
  }
}

.wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
  display: none !important;
}
.wp-block-navigation__responsive-container-open:not(.always-shown) {
  display: block !important;
}
@media (width> 724px) {
  .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: none !important;
  }
  .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
    display: block !important;
  }
  .site-header {
    .wp-block-navigation-item {
      &.current-menu-item,
      &:hover {
        margin-left: 0;
      }
    }
  }
}

.wp-block-navigation-overlay-close {
  svg {
    width: 2rem !important;
    height: auto;
  }
}

.site-footer {
  padding: 1.5rem;
  color: black;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: white;
  position: relative;
  z-index: 10;
  .wp-block-social-links {
    svg {
      width: 2rem;
      height: auto;
      &:hover {
        fill: var(--rose) !important;
      }
    }
  }
}

.menu-mentions {
  ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    .current-menu-item {
      color: grey;
    }
  }
}

@media (width> 724px) {
  .menu-mentions {
    ul {
      flex-direction: row;
      align-items: flex-start;
      gap: 1rem;
    }
  }
}

.wp-block-post-title {
  font-size: 3.25rem;
  margin-block: 1em;
  line-height: 1.1;
  width: 100%;
}

.no-underline {
  text-decoration: none;
  &:hover {
    text-decoration: underline;
  }
}

@media (width> 724px) {
  .wp-block-post-title {
    text-align: center;
  }
}

.hero-home {
  .contenu {
    height: 100vh;
    height: 100svh;
    padding-block: clamp(6rem, 24vw, 12rem) 2rem;
    gap: clamp(1rem, 9vw, 3rem);
    justify-content: center;
    flex-wrap: nowrap;
    .logo {
      /* flex-grow: 4;
      max-height: 8rem; */
      height: clamp(6rem, 18vw, 12rem);
      width: auto;
      img {
        height: 100%;
      }
    }

    p {
      font-size: clamp(1.25rem, 7.5vw, 3rem);
      line-height: 1.25;
      text-align: center;
      padding-inline: 3rem;
      max-width: 48rem;
      letter-spacing: 4%;
      strong {
        font-weight: 600;
      }
    }
    .btn-svg-block {
      animation: bump 1s 2s alternate infinite linear;
    }
  }
}

.section-presentation {
  border-top: solid 5rem var(--rose);
  .contenu {
    align-items: center;
    padding: 3rem clamp(1.75rem, 3vw, 2rem);
    figure {
      width: 16.375rem;
      aspect-ratio: 1;
      margin-top: -7rem;
    }
    p {
      font-size: 1.5rem;
      line-height: 2.25rem;
      text-align: center;
      margin-block: 3rem;
      max-width: 48rem;
      padding-inline: 1rem;
    }
  }
  .bloc-texte {
    margin-bottom: -10rem;
    position: relative;
    z-index: 1;
  }
}

.section-comment {
  border-top: solid 0.5rem var(--cyan);
  background-color: var(--rose);
  padding: 1.5rem;
  padding-top: 8rem;
  /* padding-bottom: 4rem; */
  .contenu {
    max-width: 48rem;
    .title-svg-block {
      margin-left: -0.5rem;
      & + * {
        margin-left: 0.5rem;
        width: calc(100% - 0.5rem);
      }
    }
    .wp-block-group {
      max-width: 100%;
    }
  }
}

.section-pret {
  background-color: var(--orange);
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  padding-bottom: 4rem;
  border-top: solid 2rem var(--rose);

  .title-svg-block {
    --offset: calc(var(--height) / 30) !important;
    .shadow {
      margin-top: -4rem;
    }
  }
  .contenu {
    max-width: 48rem;
    gap: 4rem 8rem;
    .wp-block-buttons {
      flex-basis: 100%;
      justify-content: center;
    }
  }
}

/* page coaching */
.section-intro-coaching {
  .contenu {
    align-items: center;
    padding: 0 clamp(1.75rem, 3vw, 2rem);
    p {
      max-width: 48rem;
    }
    .bloc-texte {
      position: relative;
      z-index: 1;
      margin-bottom: -2rem;
    }
  }
}

/* page à propos */
.titre-a-propos {
  position: relative;
  align-self: flex-start !important;
  width: auto !important;
  .shadow {
    position: absolute !important;
    right: 0;
    top: 0;
    transform: translate(5rem, 4rem);
    svg {
      animation: heartbeat 1.6s ease-in-out infinite;
    }
  }
}
.section-intro-a-propos,
.section-texte-a-propos {
  .contenu {
    align-items: center;
    padding: 0 clamp(1.75rem, 3vw, 2rem) 3rem;
    p,
    ul {
      max-width: 48rem;
    }
  }
}

.section-intro-a-propos {
  margin-bottom: 5rem;
}

.section-texte-a-propos {
  figure {
    margin-top: -3rem;
    position: relative;
    &::after {
      content: url("assets/arrow.svg");
      position: absolute;
      top: 0;
      right: 0;
      transform: translate(calc(100% - 1rem), calc(-100%));
    }
  }
}

.contenu-page {
  max-width: 48rem;
  align-items: center;
  padding: 0 clamp(1.75rem, 3vw, 2rem) 3rem;
}

.wpcf7 {
  width: 100%;
  form.wpcf7-form {
    display: flex;
    flex-direction: column;
    label {
      display: block;
      width: 100%;
      font-size: 1rem;
      padding-left: 0.5rem;
    }
    input,
    textarea {
      width: 100%;
      border: none;
      padding: 0.5rem 1rem;
      border-radius: 1rem;
      display: block;
      font-size: 1rem;
      font-family: inherit;
      &.wpcf7-not-valid {
        border: solid 0.25rem var(--cyan);
      }
      outline-color: var(--cyan);
    }
    p:has(.cta) {
      align-self: center;
      margin-block: 1.5rem;
    }
  }
  .wpcf7-spinner {
    display: none;
  }
  .wpcf7-not-valid-tip {
    font-size: 1rem;
    color: var(--cyan);
    font-weight: 600;
  }
  .wpcf7-response-output {
    border-radius: 1rem !important;
    border: solid 0.25rem var(--cyan) !important;
    font-weight: 600 !important;
    text-align: center;
  }
}

@media (width> 724px) {
  .section-intro-coaching {
    .contenu {
      .bloc-texte {
        margin-bottom: 4rem;
      }
    }
  }
  .mobile-only {
    display: none !important;
  }

  .titre-a-propos {
    align-self: center !important;

    .shadow {
      top: 50%;
      transform: translate(5rem, -50%);
    }
  }
}

.section-offre {
  padding: 0rem 1.5rem 4rem;
  align-items: center;
  .contenu {
    max-width: 48rem;
    figure {
      width: calc(100% + 4rem) !important;
      height: auto;
      margin-inline: -2rem;
      img {
        aspect-ratio: 1.2;
        width: 100% !important;
        object-fit: cover;
      }
    }
    .title-svg-block {
      align-self: flex-start;
      margin-block: 0;
      h2 {
        font-size: 2.5rem !important;
        line-height: 3rem !important;
      }
      margin-left: -0.5rem;
      & + * {
        align-items: flex-start;
        margin-left: 0.5rem;
        width: calc(100% - 0.5rem);
      }
    }
    *:not(h2) {
      width: 100%;
    }
    .wp-block-buttons {
      margin-block: 1rem;
    }
    .wp-block-separator {
      /* height: 0.25rem; */
      margin-bottom: 1rem;
      /* margin-inline: -2rem;
      width: calc(100% + 4rem) !important; */
    }
    /* align-items: center; */
    /* padding: 0 clamp(1.5rem, 3vw, 2rem); */
    p {
      max-width: 48rem;
    }
  }
  .more-btn {
    text-align: center;
    a {
      all: unset;
      color: inherit;
      font-weight: 700;
      cursor: pointer;
    }
  }
  #more-1,
  #more-2,
  #more-3 {
    height: 0;
    overflow: hidden;
    margin-bottom: -2rem;
    transition: all 1s;
    &.element-visible {
      margin-bottom: 1rem;
    }
  }
}

.separator-cyan {
  width: 100%;
  height: 0.25rem;
}

@media (width> 724px) {
  .section-offre {
    .contenu {
      figure {
        margin-top: 2rem;
        margin-inline: -2.3125rem;
        overflow: hidden;
        border-radius: 1rem;
        border: solid 0.3125rem white;
        img {
          aspect-ratio: 1.7;
        }
      }
    }
  }
}

/* composants */

ul.liste {
  padding-left: 1.5rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  li {
    position: relative;
    &::before {
      content: url("assets/plus.svg");
      position: absolute;
      left: -1.5rem;
      top: 0.125rem;
      height: 1rem;
      width: 1rem;
    }
  }
}

body .wp-site-blocks {
  .bloc-texte {
    background-color: white;
    color: #333;
    padding: 3rem clamp(0.75rem, 4vw, 2rem) 2rem;
    border-radius: 1rem;
    position: relative;
    margin-inline: -1rem;
    p {
      font-size: 1.125rem;
      line-height: 1.75rem;
      margin: 0;
      padding: 0;

      text-align: left;
    }
    &::after {
      content: url("assets/logo-coach-en-amour.svg");
      position: absolute;
      top: -1.75rem;
      left: clamp(0.75rem, 4vw, 2rem);
      width: 4rem;
      height: auto;
      animation: heartbeat 1.6s ease-in-out infinite;
    }
  }
  .btn-svg-block {
    position: relative;
    display: inline-block;
    --height: calc(var(--taille, 4) * 1rem);
    --offset: calc(var(--height) / 20);
    .btn-svg-icon,
    .btn-svg-shadow {
      height: var(--height);
      display: inline-block;
      svg {
        height: 100%;
        width: auto;
        stroke-width: 0.125rem;
      }
    }

    .btn-svg-icon {
      position: relative;
      top: 0;
      left: 0;
      svg {
        fill: var(--color);
        stroke: var(--color);
      }
    }

    .btn-svg-shadow {
      position: absolute;
      top: var(--offset);
      left: var(--offset);
      svg {
        fill: var(--shadowColor);
        stroke: var(--color);
      }
    }
  }
  .title-svg-block {
    width: 100%;
    h1,
    h2 {
      font-size: 3.25rem;
      white-space: nowrap;
      margin: 0;
    }
    h1 {
      width: 100%;
    }
    margin-block: 1rem 0;
    line-height: 1;
    position: relative;
    display: inline-flex;
    gap: 1rem;
    align-items: center;
    --height: calc(var(--svgHeight, 4) * 1rem);
    --offset: calc(var(--height) / 20);
    .shadow {
      position: relative;
      .title-svg-icon,
      .title-svg-shadow {
        height: var(--height);
        display: inline-block;
        svg {
          height: 100%;
          width: auto;
          stroke-width: 0.125rem;
        }
      }

      .title-svg-icon {
        position: relative;
        top: 0;
        left: 0;
        svg {
          fill: var(--svgColor);
          stroke: var(--svgColor);
        }
      }

      .title-svg-shadow {
        position: absolute;
        top: var(--offset);
        left: var(--offset);
        svg {
          fill: var(--svgShadowColor);
          stroke: var(--svgColor);
        }
      }
    }
    &.vive-l-amour {
      svg {
        stroke-width: 0.0625rem;
      }
      .title-svg-icon {
        stroke: none;
      }
    }
    &.no-shadow {
      .title-svg-shadow {
        display: none;
      }

      svg * {
        stroke: none;
      }
    }
  }
  .img-shadow {
    border-radius: 2rem;
    position: relative;
    --offset: 0.5rem;
    &.square {
      aspect-ratio: 1;
    }
    &.small {
      width: 17rem;
    }
    img {
      width: 100%;
      height: 100% !important;
      object-fit: cover;
      position: relative;
      overflow: hidden;
      border-radius: inherit;
      border: solid 0.3125rem white;
    }
    &::before {
      content: "";
      position: absolute;
      top: var(--offset);
      left: var(--offset);
      width: 100%;
      height: 100%;
      border: solid 0.3125rem white;
      border-radius: inherit;
      background-color: inherit;
    }
    &.rose {
      background-color: var(--rose);
    }
    &.cyan {
      background-color: var(--cyan);
    }
    &.orange {
      background-color: var(--orange);
    }
  }

  div.cta,
  p:has(> .cta) {
    all: unset;
    position: relative;
    display: inline-block;
    --offset: 0.25rem;
    --color: var(--cyan);
    --shadowColor: var(--rose);
    a,
    input {
      all: unset;
      font-size: 1.125rem;
      padding: 0.5rem 1.25rem;
      border-radius: 9999px;
      background-color: var(--color);
      border: solid 0.125rem var(--color);
      font-weight: 700;
      letter-spacing: 5%;
      display: block;
      position: relative;
      cursor: pointer;
      transition: all 0.3s;
    }
    /* bloc admin */
    [role="textbox"] {
      position: relative;
      z-index: 1;
      background-color: var(--color);
    }
    &::before {
      content: "";
      position: absolute;
      background-color: var(--shadowColor);
      border: solid 0.125rem var(--color);
      width: 100%;
      height: 100%;
      border-radius: 9999px;
      top: var(--offset);
      left: var(--offset);
      transition: all 0.3s;
    }
    &.highlight::after {
      content: url("assets/bursts.svg");
      position: absolute;
      aspect-ratio: 390/264;
      width: 250%;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      pointer-events: none;
    }
    &:hover {
      a {
        background-color: var(--shadowColor);
        border-color: var(--shadowColor);
      }
      &::before {
        top: -0.125rem;
        left: -0.125rem;
        /* border-color: var(--shadowColor); */
      }
    }
  }
}

@media (width> 724px) {
  .title-svg-block {
    h1,
    h2 {
      br {
        display: none;
      }
    }
    h1 {
      text-align: center;
    }
  }
  h2 {
    br {
      display: none;
    }
  }
}

/* admin */
:root :where(.wp-site-blocks) > * {
  margin-block-start: 0 !important;
}
