/* === BLOC TEXTE & IMAGES === */
.text-images-block {
    max-width: 100%;
    margin: 0 auto;
    padding: 5rem 5rem;
}

/* === ITEM CONTAINER === */
.text-image-item {
    margin-bottom: 80px;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.text-image-item:last-child {
    margin-bottom: 0;
}

.item-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: 400px;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-image-item:nth-child(1) { animation-delay: 0.1s; }
.text-image-item:nth-child(2) { animation-delay: 0.2s; }
.text-image-item:nth-child(3) { animation-delay: 0.3s; }
.text-image-item:nth-child(4) { animation-delay: 0.4s; }
.text-image-item:nth-child(5) { animation-delay: 0.5s; }

/* === WRAPPER STYLES === */
.text-wrapper {
    padding: 40px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    box-shadow: 
        0 10px 25px -5px rgba(0, 0, 0, 0.1),
        0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.text-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 20px 35px -5px rgba(0, 0, 0, 0.15),
        0 12px 20px -6px rgba(0, 0, 0, 0.1);
}


.image-wrapper {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 15px 30px -5px rgba(0, 0, 0, 0.15),
        0 8px 15px -6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.image-wrapper:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 25px 45px -5px rgba(0, 0, 0, 0.2),
        0 15px 25px -6px rgba(0, 0, 0, 0.15);
}

/* === IMAGE STYLES === */
.image-container {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(45deg, #f1f5f9, #e2e8f0);
}

.image-container img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.5s ease;
    border-radius: 24px;
}

.image-container:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg, 
        rgba(59, 130, 246, 0.1) 0%, 
        rgba(139, 92, 246, 0.1) 50%,
        rgba(236, 72, 153, 0.1) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 24px;
}

.image-container:hover .image-overlay {
    opacity: 1;
}

/* === TEXT CONTENT === */
.text-content {
    line-height: 1.7;
    color: #334155;
}

.text-content h1,
.text-content h2,
.text-content h3,
.text-content h4,
.text-content h5,
.text-content h6 {
    color: #1e293b;
    margin-bottom: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.text-content h2 {
    font-size: 2.25rem;
    color: var(--wp--preset--color--theme-0);
    font-family: var(--gutenverse-font-family-dRY3kv);
    font-size: var(--gutenverse-font-size-dRY3kv);
    font-weight: var(--gutenverse-font-weight-dRY3kv);
    text-transform: var(--gutenverse-font-transform-dRY3kv);
    font-style: var(--gutenverse-font-style-dRY3kv);
    text-decoration: var(--gutenverse-font-decoration-dRY3kv);
    line-height: var(--gutenverse-font-lineHeight-dRY3kv);
    letter-spacing: var(--gutenverse-font-spacing-dRY3kv);
    overflow-wrap: break-word;
    word-break: break-word;
    margin-bottom: 16px;
    margin-top: 24px;
}

/* Style pour les éléments <strong> convertis en titres */
.text-content strong {
    display: block;
    color: var(--wp--preset--color--theme-0);
    font-family: var(--gutenverse-font-family-dRY3kv);
    font-size: var(--gutenverse-font-size-dRY3kv);
    font-weight: var(--gutenverse-font-weight-dRY3kv);
    text-transform: var(--gutenverse-font-transform-dRY3kv);
    font-style: var(--gutenverse-font-style-dRY3kv);
    text-decoration: var(--gutenverse-font-decoration-dRY3kv);
    line-height: var(--gutenverse-font-lineHeight-dRY3kv);
    letter-spacing: var(--gutenverse-font-spacing-dRY3kv);
    overflow-wrap: break-word;
    word-break: break-word;
    margin-bottom: 16px;
    margin-top: 24px;
}


.text-content p {
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.text-content p:last-child {
    margin-bottom: 0;
}

.text-content a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}


.text-content ul,
.text-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.text-content li {
    margin-bottom: 8px;
    color: #475569;
}

/* === NO CONTENT === */
.no-content {
    text-align: center;
    padding: 80px 40px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 24px;
    border: 2px dashed #cbd5e1;
}

.no-content-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.no-content p {
    color: #64748b;
    font-size: 1.125rem;
    margin: 0;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .text-images-block {
        padding: 40px 20px;
    }
    
    .item-container {
        gap: 40px;
        min-height: 350px;
    }
    
    .text-wrapper {
        padding: 30px;
    }
    
    .image-container img {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .text-images-block {
        padding: 30px 15px;
    }
    
    .text-image-item {
        margin-bottom: 50px;
    }
    
    .item-container {
        grid-template-columns: 1fr;
        gap: 30px;
        min-height: auto;
    }
    
    /* Ordre mobile : toujours image puis texte */
    .item-right .text-wrapper {
        order: 2;
    }
    
    .item-right .image-wrapper {
        order: 1;
    }
    
    .text-wrapper {
        padding: 25px;
        border-radius: 20px;
    }
    
    .image-wrapper,
    .image-container,
    .image-container img {
        border-radius: 20px;
    }
    
    .image-container img {
        height: 280px;
    }
    
    .text-content h2 {
        font-size: 1.875rem;
    }
    
    .text-content h3 {
        font-size: 1.5rem;
    }
    
    .text-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .text-images-block {
        padding: 20px 10px;
    }
    
    .text-wrapper {
        padding: 20px;
        border-radius: 16px;
    }
    
    .image-wrapper,
    .image-container,
    .image-container img {
        border-radius: 16px;
    }
    
    .image-container img {
        height: 240px;
    }
    
    .no-content {
        padding: 4rem 2rem;
        border-radius: 16px;
    }
}