/* Style des listings de vignettes interactives (avec lightbox et animation) */
.cf-dynamic-tiles {
    display: grid;
    transition: gap 0.2s ease; /* transition pour le gap */
}

.cf-dynamic-tiles > .wp-block-columns {
    display: grid;
    background-color: #FFF;
    color: #000;
    padding: 30px;
    aspect-ratio: 1 / 1;
}
.cf-dynamic-tiles > .wp-block-columns:hover {
    cursor: pointer;
}

.cf-dynamic-tiles > .wp-block-columns h3,
.cf-dynamic-tiles > .wp-block-columns p {
    margin: 0;
}

.cf-dynamic-tiles > .wp-block-columns {
  background: #7ec699; /* couleur initiale initiale */
  border-radius: 8px;
  transition: transform 0.6s ease, background-color 0.6s ease;
  cursor: pointer;
  transform-style: preserve-3d;
  position: relative;
  overflow: hidden;
}

/* Effacer le contenu quand la tile est flipped */
.cf-dynamic-tiles > .wp-block-columns.flipped * {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Flip et fond blanc */
.cf-dynamic-tiles > .wp-block-columns.flipped {
  transform: rotateY(180deg);
  background-color: white;
}



.cf-dynamic-tiles__tile-content.is-layout-flex {
    padding: 30px;
    display: none;
}
.cf-dynamic-tiles__tile-content.is-layout-flex > div > p {
    margin: 0;
}
.cf-dynamic-tiles__tile-content p:first-of-type {
    font-weight: bold;
    font-family: 'Audiowide', sans-serif;
    font-size: 1.17em;
}



.cf-dynamic-tiles__tile-content.is-layout-flex .back-btn {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 29px;
    height: 30px;
    background: #7ec699;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
}

.cf-dynamic-tiles__tile-content.is-layout-flex .back-btn:hover {
    background: #5aa37d;
}

