/**
 * Styles pour l'affichage public des shortcodes
 */

/* Shortcode de contenu texte */
.seo-content-shortcode {
    margin: 1em 0;
    padding: 0;
    line-height: 1.6;
}

.seo-content-shortcode p:first-child {
    margin-top: 0;
}

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

/* Shortcode d'image */
.seo-image-shortcode {
    margin: 1em 0;
    text-align: center;
}

.seo-image-shortcode img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.seo-image-shortcode img:hover {
    transform: translateY(-2px);
}

/* Shortcode mixte */
.seo-mixed-content {
    margin: 1.5em 0;
    padding: 1em;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #0073aa;
}

.seo-mixed-content.seo-mixed-default {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.seo-mixed-content.seo-mixed-side-by-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2em;
    align-items: center;
}

.seo-mixed-content.seo-mixed-image-left {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5em;
    align-items: flex-start;
}

.seo-mixed-content.seo-mixed-image-right {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5em;
    align-items: flex-start;
}

.seo-mixed-text {
    flex: 1;
}

.seo-mixed-text p:first-child {
    margin-top: 0;
}

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

.seo-mixed-image-wrapper {
    flex-shrink: 0;
}

.seo-mixed-image {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* Layouts spéciaux pour le contenu mixte */
.seo-mixed-content.seo-mixed-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 1.5em;
}

.seo-mixed-content.seo-mixed-highlight {
    background: linear-gradient(135deg, #f6f9fc 0%, #e9ecef 100%);
    border-left-color: #28a745;
}

.seo-mixed-content.seo-mixed-minimal {
    background: transparent;
    border: none;
    padding: 0;
    gap: 1.5em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .seo-mixed-content.seo-mixed-side-by-side,
    .seo-mixed-content.seo-mixed-image-left,
    .seo-mixed-content.seo-mixed-image-right {
        grid-template-columns: 1fr;
        gap: 1em;
    }
    
    .seo-mixed-content.seo-mixed-image-right .seo-mixed-image-wrapper {
        order: -1;
    }
    
    .seo-mixed-content {
        padding: 0.75em;
    }
}

@media (max-width: 480px) {
    .seo-mixed-content {
        margin: 1em -0.5em;
        border-radius: 0;
        border-left: none;
        border-top: 4px solid #0073aa;
    }
    
    .seo-mixed-content.seo-mixed-highlight {
        border-top-color: #28a745;
    }
}

/* Animations et transitions */
.seo-content-shortcode,
.seo-mixed-content {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Styles pour l'impression */
@media print {
    .seo-mixed-content {
        background: transparent !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
    
    .seo-image-shortcode img,
    .seo-mixed-image {
        box-shadow: none !important;
        max-width: 100% !important;
    }
}

/* Accessibilité */
.seo-content-shortcode:focus-within,
.seo-mixed-content:focus-within {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Styles pour les thèmes sombres */
@media (prefers-color-scheme: dark) {
    .seo-mixed-content {
        background: #2d3748;
        color: #e2e8f0;
        border-left-color: #4299e1;
    }
    
    .seo-mixed-content.seo-mixed-card {
        background: #1a202c;
        border-color: #4a5568;
    }
    
    .seo-mixed-content.seo-mixed-highlight {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
        border-left-color: #48bb78;
    }
}

/* Intégration avec les thèmes WordPress populaires */

/* Twenty Twenty-Four */
.wp-site-blocks .seo-mixed-content {
    margin-block: var(--wp--preset--spacing--50);
}

/* Astra */
.ast-container .seo-mixed-content {
    margin: 1.5em auto;
    max-width: 100%;
}

/* GeneratePress */
.inside-article .seo-mixed-content {
    margin: 1.5em 0;
}

/* Kadence */
.entry-content .seo-mixed-content {
    margin: 1.5em 0;
}

/* Styles utilitaires */
.seo-shortcode-center {
    text-align: center;
}

.seo-shortcode-left {
    text-align: left;
}

.seo-shortcode-right {
    text-align: right;
}

.seo-shortcode-full-width {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.seo-shortcode-shadow {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.seo-shortcode-no-margin {
    margin: 0;
}

.seo-shortcode-large-margin {
    margin: 2em 0;
}
