/* Styles pour l'overlay sur le bloc Image mise en avant */

/* Styles de base pour la figure avec overlay */
.wp-block-post-featured-image.has-overlay {
    position: relative;
    overflow: hidden;
}

/* Supprimer les bordures au focus sur les images de projets */
.wp-block-post-featured-image:focus,
.wp-block-post-featured-image a:focus,
.wp-block-post-featured-image img:focus,
.wp-block-post-featured-image.has-overlay:focus,
.wp-block-post-featured-image.has-overlay a:focus,
.wp-block-post-featured-image.has-overlay img:focus,
.kozto-project-item:focus,
.kozto-project-item a:focus,
.kozto-project-item img:focus,
.kozto-project-item *:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* L'overlay lui-même */
.wp-block-post-featured-image .featured-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    padding: 20px;
    box-sizing: border-box;
    z-index: 2;
}

/* Affichage au survol */
.wp-block-post-featured-image.has-overlay:hover .featured-image-overlay {
    opacity: 1;
}

/* Le titre sur l'overlay */
.featured-image-overlay .overlay-title {
    font-family: var(--wp--preset--font-family--ibm-plex-sans-condensed);
    font-style: italic;
    font-weight: 100; /* Thin italic */
    letter-spacing: -0.1px;
    text-transform: uppercase;
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: #000000;
    font-size: clamp(1.2rem, 3vw, 2rem);
    margin: 0;
    z-index: 3;
    max-width: 100%;
    word-wrap: break-word;
    line-height: 1.3;
}

.featured-image-overlay .overlay-title p{
  font-family: var(--wp--preset--font-family--ibm-plex-sans-condensed);
  font-style: italic;
  font-weight: 100;
  letter-spacing: -0.1px;
  line-height: 1.13;
  text-transform: uppercase;
}
/* Assurer que l'image reste en dessous */
.wp-block-post-featured-image.has-overlay img {
    position: relative;
    z-index: 1;
}

/* Version toujours visible de l'overlay (optionnel) */
.wp-block-post-featured-image.has-overlay.always-visible .featured-image-overlay {
    opacity: 0.85;
}

.wp-block-post-featured-image.has-overlay.always-visible:hover .featured-image-overlay {
    opacity: 1;
}

/* Styles pour les petits écrans */
@media (max-width: 768px) {
    .featured-image-overlay .overlay-title {
        font-size: clamp(1rem, 4vw, 1.5rem);
    }

    .featured-image-overlay {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .featured-image-overlay .overlay-title {
        font-size: clamp(0.9rem, 5vw, 1.2rem);
    }

    .featured-image-overlay {
        padding: 10px;
    }
}

/* Animation optionnelle pour un effet plus dynamique */
/* @keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
} */



/* Styles pour l'éditeur (prévisualisation) */
.editor-styles-wrapper .wp-block-post-featured-image.has-overlay {
    position: relative;
}

.editor-styles-wrapper .featured-image-overlay {
    pointer-events: none;
}

.featured-image-overlay {
    pointer-events: none;
}