/**
 * Cosamirai Expanding Image - Styles
 */

.cosamirai-expanding-image {
    position: relative;
    width: 100%;
}

.expanding-image-container {
    position: relative;
    width: 100%;
    height: var(--container-height, 80vh);
    display: flex;
    align-items: center;
    justify-content: center;
}

.expanding-image-wrapper {
    position: relative;
    overflow: hidden;
    will-change: width;
    height: 100%;
}

.expanding-image__img {
    /* Position absolue pour garder taille fixe */
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    /* Taille FIXE - ne change jamais */
    width: var(--final-width, 100vw);
    height: 100%;
    object-fit: cover;
    object-position: center;
    /* Empêcher tout redimensionnement */
    min-width: var(--final-width, 100vw);
    max-width: var(--final-width, 100vw);
}

/* ============================================
   Backend Preview Styles
   ============================================ */

.cosamirai-expanding-image--preview {
    min-height: 300px;
}

.expanding-image-container--preview {
    position: relative;
    padding: 2rem;
    text-align: center;
}

.expanding-image-wrapper--preview {
    max-width: 400px;
    margin: 0 auto 1rem;
}

.expanding-image-wrapper--preview img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.preview-info {
    background: rgba(0, 0, 0, 0.05);
    padding: 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.preview-info p {
    margin: 0.25rem 0;
}

.expanding-image-placeholder {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .expanding-image-container {
        height: calc(var(--container-height, 80vh) * 0.7);
    }
}
