/* Styles des blocs et compositions partagés entre le site et l’éditeur. */

/* Taille du logo dans le Header sur mobile. */
@media (max-width: 640px) {
  .wp-block-site-logo.order-mobile-1 img {
    width: 80px;
    height: auto;
  }
}

/* Cartes d'actualités partagées par la grille et le carrousel. */
.news-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  border: 1px solid #d1cdc7;
  border-radius: 52px;
  overflow: hidden;
}

.news-thumb {
  position: relative;
  height: 250px;
  overflow: hidden;
  flex: 0 0 auto;
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.arrow-blue {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 39px;
  height: 39px;
  z-index: 2;
}

.arrow-circle {
  fill: var(--wp--preset--color--teal);
  transition: fill 0.3s ease;
}

.arrow-head {
  transition: transform 0.3s ease;
  transform-origin: center;
}

.news-card:hover .arrow-circle {
  fill: var(--wp--preset--color--wine-red);
}

.news-bottom-content {
  padding: 20px 35px 35px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.news-title {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 500;
  color: var(--wp--preset--color--dark-green);
  text-decoration: none;
  margin: 0 0 16px;
}

.news-excerpt {
  font-size: clamp(0.825rem, 3vw, 0.925rem);
  font-weight: 400;
  margin-bottom: 24px;
}

@media screen and (max-width: 768px) {
  .news-excerpt,
  .news-title {
    margin: 0;
  }
}

/* ---------------------------------------------------------------------------
                               Grid Flex
---------------------------------------------------------------------------*/
/* Empêche l'empilement sur mobile et force des colonnes en 2x2 */
.wp-block-columns.columns-responsive-4 {
  display: flex;
  gap: var(--wp--style--block-gap, 1rem);
}

.columns-responsive-4 .wp-block-column {
  flex: 1 1 25% !important; /* 4 colonnes sur desktop */
}

@media screen and (max-width: 768px) {
  .wp-block-columns.columns-responsive-4 {
    flex-wrap: wrap !important;
  }

  .columns-responsive-4 .wp-block-column {
    flex: 1 1 calc(50% - 1rem) !important; /* 2 colonnes sur mobile */
  }

  .two-cols-mobile {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------------------------------------------------------------------------
                               Breadcrumb
---------------------------------------------------------------------------*/
.wp-block-wpseopress-breadcrumbs a {
  text-decoration: none;
}

.wp-block-wpseopress-breadcrumbs .breadcrumb li:after {
  margin: 0 20px;
  /* color: var(--wp--preset--color--custom-menthe-douce); */
}

@media screen and (max-width: 768px) {
  .wp-block-wpseopress-breadcrumbs .breadcrumb li:after {
    margin: 0px 8px;
  }
}

/* ---------------------------------------------------------------------------
                                Votre Installation
---------------------------------------------------------------------------*/

.frise-etapes {
  position: relative;
}

.frise-etapes::before {
  content: "";
  position: absolute;
  bottom: 120px;
  left: 0;
  right: 0;
  height: 2px;
  border-bottom: 2px dashed #ccc;
  z-index: 0;
  width: 80%;
  margin: 0 auto;
}

.etape-title {
  font-weight: 700;
  margin: 0.5rem 0;
}

.etape-description {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: 0.5rem;
}

.etape-number {
  width: 36px;
  height: 36px;
  margin: 0 auto;
  margin-top: 0.75rem;
  border-radius: 50%;
  background-color: #ccc;
  color: white;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Couleurs par étape */
.step-1 .etape-number {
  background-color: var(--wp--preset--color--mint);
}
.step-2 .etape-number {
  background-color: var(--wp--preset--color--teal);
}
.step-3 .etape-number {
  background-color: var(--wp--preset--color--dark-green);
}
.step-4 .etape-number {
  background-color: var(--wp--preset--color--wine-red);
}
.step-5 .etape-number {
  background-color: #555;
}

@media screen and (max-width: 768px) {
  .etape {
    flex-wrap: wrap;
  }

  .frise-etapes::before {
    display: none;
  }

  .etape > div {
    flex: 1 1 calc(50% - 1rem);
  }
}

/* ---------------------------------------------------------------------------
                         3 options d’implantation
---------------------------------------------------------------------------*/

.wp-block-column.opt-impl-col {
  display: flex;
  flex-direction: column;
}

.wp-block-column.opt-impl-col .wp-block-group.is-layout-constrained {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 250px;
}

.wp-block-column.opt-impl-col .news-link-alt {
  margin-top: auto;
}

/* ---------------------------------------------------------------------------
                                FAQ
---------------------------------------------------------------------------*/

.global-faq details {
  border-bottom: 1px solid #dbdbdb;
  padding: 20px 0;
  transition: all 0.3s ease;
}

.global-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 700;
  color: var(--wp--preset--color--dark-green);
  cursor: pointer;
  list-style: none;
  position: relative;
  padding: 0;
  margin: 0;
}

/* Cache la puce native */
.global-faq summary::marker {
  display: none;
}

.global-faq summary::after {
  content: "+";
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

/* Quand le détail est ouvert */
.global-faq details[open] summary::after {
  content: "−";
  transform: rotate(180deg);
}

/* Animation du contenu */
.global-faq details > p {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 0.4s ease,
    opacity 0.3s ease;
  margin-top: 0.75rem;
  color: var(--wp--preset--color--dark-green);
}

.global-faq details[open] > p {
  max-height: 500px; /* ou auto avec JS si besoin */
  opacity: 1;
}

/* ---------------------------------------------------------------------------
                                Footer
---------------------------------------------------------------------------*/

footer.wp-block-template-part {
  margin-block-start: 0;
}

.list-footer {
  list-style: none;
  padding-left: 0;
}

.list-footer a {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.underline-fill a {
  background-image: linear-gradient(
    var(--wp--preset--color--dark-green),
    var(--wp--preset--color--dark-green)
  );
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% var(--underline-thickness, 1px);
  transition: background-size 0.3s cubic-bezier(0.075, 0.81, 0.165, 1);
}

.underline-fill a:hover {
  background-size: 100% var(--underline-thickness, 1px);
}

.bullet {
  position: relative;
}

.bullet::before {
  position: absolute;
  top: 1rem;
  left: -2rem;
  display: inline-block;
  content: "";
  width: 23px;
  height: 23px;
  margin-right: 8px;
  background-repeat: no-repeat;
  background-size: contain;
}

.bullet.practitioner-name:before {
  top: 4px;
}

footer .bullet::before {
  top: 0.3rem;
}

.green::before {
  background-image: url("/wp-content/themes/initial-sante-2025/assets/pictos/bullet_green.svg");
}

.red::before {
  background-image: url("/wp-content/themes/initial-sante-2025/assets/pictos/bullet_red.svg");
}

.blue::before {
  background-image: url("/wp-content/themes/initial-sante-2025/assets/pictos/bullet_blue.svg");
}

footer .bullets-ladder-1::after {
  transform: rotateY(180deg);
}

@media screen and (max-width: 768px) {
  .bullet::before {
    position: relative;
    top: 0;
    left: 0;
  }
}

.swiper-pagination-bullet {
  background-color: var(--wp--preset--color--white);
  opacity: 1;
  width: 12px;
  height: 12px;
}
.swiper-pagination-bullet-active {
  background-color: var(--wp--preset--color--teal);
  opacity: 1;
}

/* ---------------------------------------------------------------------------
                                Bullets Ladder
---------------------------------------------------------------------------*/

/* Image SVG en pseudo-élément */
.bullets-ladder-1::after {
  content: "";
  position: absolute;
  width: 65%;
  background-image: url("/wp-content/themes/initial-sante-2025/assets/img/bullets_ladder_1.svg");
  aspect-ratio: 4.692 / 1;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 0;
}

.bullets-ladder-2::after {
  content: "";
  position: absolute;
  width: 18%;
  /* height: 100px;  */
  aspect-ratio: 2.2 / 1;
  background-image: url("/wp-content/themes/initial-sante-2025/assets/img/bullets_ladder_2.svg");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 1;
  transform: translateY(26px);
}

.bullets-ladder-3::after {
  content: "";
  position: absolute;
  width: 18%;
  /* height: 100px;  */
  aspect-ratio: 2.2 / 1;
  background-image: url("/wp-content/themes/initial-sante-2025/assets/img/bullets_ladder_3.svg");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  bottom: 30px !important;
  z-index: 1;
  transform: translateY(70px);
}

@media screen and (max-width: 768px) {
  .bullets-ladder-1::after {
    width: 100%;
  }

  .bullets-ladder-2::after,
  .bullets-ladder-3::after {
    width: 30%;
  }
}

/* Positionnement bas gauche */
.bottom-left,
.bottom-right {
  position: relative;
}

.bottom-left::after {
  bottom: 0;
  left: 0;
}

.bottom-right::after {
  bottom: 0;
  right: 0;
}
