/*
Theme Name: the7dtchild
Author: Dream-Theme
Author URI: http://dream-theme.com/
Description: The7 is perfectly scalable, performance and SEO optimized, responsive, retina ready multipurpose WordPress theme. It will fit every site – big or small. From huge corporate portals to studio or personal sites – The7 will become a great foundation for your next project!
Version: 1.0.0
License: This WordPress theme is comprised of two parts: (1) The PHP code and integrated HTML are licensed under the GPL license as is WordPress itself.  You will find a copy of the license text in the same directory as this text file. Or you can read it here: http://wordpress.org/about/gpl/ (2) All other parts of the theme including, but not limited to the CSS code, images, and design are licensed according to the license purchased. Read about licensing details here: http://themeforest.net/licenses/regular_extended
Template: dt-the7
*/

/* ===============================================
   OVERLAY DE LÉGENDES D'IMAGES AU SURVOL
   =============================================== */

/* Style général pour les conteneurs d'images avec légendes */
.wp-caption,
figure {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

/* Masquer les légendes par défaut */
.wp-caption .wp-caption-text,
.wp-caption figcaption,
figure figcaption,
.widget-image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(28, 28, 28, 0.4);
    color: white;
    padding: 4px 12px;
    margin: 0;
    font-size: 0.7em;
    line-height: 1.4;
    text-align: left;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s ease-in-out;
    z-index: 1;
    box-sizing: border-box;
}

/* Afficher les légendes au survol du conteneur */
.wp-caption:hover .wp-caption-text,
.wp-caption:hover figcaption,
figure:hover figcaption,
.wp-caption:hover .widget-image-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Styles spécifiques pour les galeries WordPress */
.wp-block-gallery .blocks-gallery-image,
.wp-block-gallery .blocks-gallery-item,
.gallery-item {
    position: relative;
    overflow: hidden;
}

.wp-block-gallery .blocks-gallery-image figcaption,
.wp-block-gallery .blocks-gallery-item figcaption,
.gallery-item .gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(28, 28, 28, 0.4);
    color: white;
    padding: 4px 12px;
    margin: 0;
    font-size: 0.7em;
    line-height: 1.4;
    text-align: left;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s ease-in-out;
    z-index: 1;
    box-sizing: border-box;
}

.wp-block-gallery .blocks-gallery-image:hover figcaption,
.wp-block-gallery .blocks-gallery-item:hover figcaption,
.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Styles pour les images Elementor */
.elementor-widget-image figure,
.elementor-image-gallery .gallery-item {
    position: relative;
    overflow: hidden;
}

.elementor-widget-image .widget-image-caption,
.elementor-image-gallery .gallery-item .gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(28, 28, 28, 0.4);
    color: white;
    padding: 4px 12px;
    margin: 0;
    font-size: 0.7em;
    line-height: 1.4;
    text-align: left;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s ease-in-out;
    z-index: 1;
    box-sizing: border-box;
}

.elementor-widget-image figure:hover .widget-image-caption,
.elementor-image-gallery .gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Assurer que les images gardent leurs proportions */
.wp-caption img,
figure img,
.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease-in-out;
}

/* Effet de zoom léger sur l'image au survol (optionnel) */
.wp-caption:hover img,
figure:hover img,
.gallery-item:hover img {
    transform: scale(1.05);
}

/* Responsive - réduire le padding sur mobile */
@media (max-width: 768px) {
    .wp-caption .wp-caption-text,
    .wp-caption figcaption,
    figure figcaption,
    .widget-image-caption,
    .wp-block-gallery .blocks-gallery-image figcaption,
    .wp-block-gallery .blocks-gallery-item figcaption,
    .gallery-item .gallery-caption {
        padding: 6px 8px;
        font-size: 0.em;
    }
}

/* Support pour les thèmes sombres */
@media (prefers-color-scheme: dark) {
    .wp-caption .wp-caption-text,
    .wp-caption figcaption,
    figure figcaption,
    .widget-image-caption,
    .wp-block-gallery .blocks-gallery-image figcaption,
    .wp-block-gallery .blocks-gallery-item figcaption,
    .gallery-item .gallery-caption {
        background: rgba(28, 28, 28, 0.4);
        color: #333;
    }
}


