/**
 * CSS pour le bloc Prestations Duo
 */

/* Variables couleurs */
:root {
    --levrard-red: #E73331;
    --levrard-dark-red: #E73331;
    --levrard-white: #ffffff;
    --levrard-gray: #f5f5f5;
    --levrard-light-gray: #f8f8f8;
    --levrard-dark-gray: #333333;
    --levrard-text: #363636;
    --levrard-border: #e0e0e0;
    --levrard-pink: #ffeaea;
    --levrard-pink-border: #ffcccc;
}

/**
 * Structure principale
 */
.levrard-prestations-duo-section {
    background-color: var(--levrard-white);
    position: relative;
}

/* Espacements */
.levrard-prestations-duo-section.spacing-small {
    padding: 40px 0;
}

.levrard-prestations-duo-section.spacing-medium {
    padding: 60px 0;
}

.levrard-prestations-duo-section.spacing-large {
    padding: 80px 0 10px 0;
}

.levrard-prestations-duo-section.spacing-xlarge {
    padding: 100px 0;
}

.levrard-prestations-duo-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/**
 * Layout - 1 élément
 */
.levrard-prestations-duo-single {
    max-width: 800px;
    margin: 0 auto;
}

/**
 * Layout - 2 éléments
 */
.levrard-prestations-duo-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/**
 * Item de prestation
 */
.prestations-duo-item {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/**
 * Alternance automatique pour 2 prestations côte à côte
 */

/* Layout double : 1ère prestation (image en haut) */
.levrard-prestations-duo-double .prestations-duo-item:nth-child(1).image-top .prestations-duo-image {
    order: 1;
}

.levrard-prestations-duo-double .prestations-duo-item:nth-child(1).image-top .prestations-duo-content {
    order: 2;
}

/* Layout double : 2ème prestation (image en bas - inverse automatique) */
.levrard-prestations-duo-double .prestations-duo-item:nth-child(2).image-top .prestations-duo-content {
    order: 1;
}

.levrard-prestations-duo-double .prestations-duo-item:nth-child(2).image-top .prestations-duo-image {
    order: 2;
}

/* Layout double : 1ère prestation (image en bas) */
.levrard-prestations-duo-double .prestations-duo-item:nth-child(1).image-bottom .prestations-duo-content {
    order: 1;
}

.levrard-prestations-duo-double .prestations-duo-item:nth-child(1).image-bottom .prestations-duo-image {
    order: 2;
}

/* Layout double : 2ème prestation (image en haut - inverse automatique) */
.levrard-prestations-duo-double .prestations-duo-item:nth-child(2).image-bottom .prestations-duo-image {
    order: 1;
}

.levrard-prestations-duo-double .prestations-duo-item:nth-child(2).image-bottom .prestations-duo-content {
    order: 2;
}

/* Layout simple : pas d'alternance, suit la consigne normale */
.levrard-prestations-duo-single .prestations-duo-item.image-top .prestations-duo-image {
    order: 1;
}

.levrard-prestations-duo-single .prestations-duo-item.image-top .prestations-duo-content {
    order: 2;
}

.levrard-prestations-duo-single .prestations-duo-item.image-bottom .prestations-duo-content {
    order: 1;
}

.levrard-prestations-duo-single .prestations-duo-item.image-bottom .prestations-duo-image {
    order: 2;
}

/**
 * Image de prestation
 */
.prestations-duo-image {
    border-radius: 30px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.prestations-duo-image img {
    width: 100%;
    height: auto;
    display: block;
}

/**
 * Contenu de prestation
 */
.prestations-duo-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/**
 * Titre de prestation
 */
.prestations-duo-title {
    font-weight: 600;
    color: var(--levrard-dark-gray);
    margin: 0;
    line-height: 1.3;
    padding: 3.5%;
    border: solid 3px var(--levrard-light-gray);
    border-radius: 10px;
}

.prestations-duo-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.prestations-duo-title a:hover {
    color: var(--levrard-dark-red);
}

.prestations-duo-title a:hover:after {
    opacity: 1;
    transform: translateX(0);
}

/**
 * Description
 */
.prestations-duo-description {
    line-height: 1.6;
    color: var(--levrard-text);
    margin: 0;
}

.prestations-duo-description strong {
    color: var(--levrard-red);
    font-weight: 600;
}

/**
 * Liste des caractéristiques - Cadre rose
 */
.prestations-duo-features {
    background-color: var(--levrard-pink);
    border: 2px solid var(--levrard-pink-border);
    border-radius: 8px;
    padding: 20px;
    margin: 0;
}

.prestations-duo-features ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.prestations-duo-features li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    line-height: 1.5;
    color: var(--levrard-text);
}

.prestations-duo-features li:last-child {
    margin-bottom: 0;
}

.prestations-duo-features li:before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--levrard-red);
    font-weight: bold;
}

.prestations-duo-features li strong {
    color: var(--levrard-red);
    font-weight: 600;
}

/**
 * Texte mis en avant
 */
.prestations-duo-highlight {
    background-color: var(--levrard-light-gray);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--levrard-red);
    font-size: 15px;
    line-height: 1.6;
    color: var(--levrard-text);
    font-style: italic;
    margin: 0;
}

.prestations-duo-highlight strong {
    color: var(--levrard-red);
    font-weight: 600;
    font-style: normal;
}

/**
 * Informations supplémentaires
 */
.prestations-duo-additional {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    margin: 0;
}

.prestations-duo-additional strong {
    color: var(--levrard-text);
    font-weight: 600;
}

/**
 * Preview dans l'éditeur
 */
.levrard-prestations-duo-preview {
    background: #f5f5f5;
    border: 2px dashed #ddd;
    padding: 40px;
    text-align: center;
    border-radius: 10px;
}

.levrard-prestations-duo-preview h3 {
    margin-bottom: 10px;
    color: var(--levrard-text);
}

.levrard-prestations-duo-preview p {
    color: #666;
    margin: 0;
}

/**
 * Responsive Design
 */
@media screen and (max-width: 992px) {
    .levrard-prestations-duo-double {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Sur mobile/tablette : désactiver l'alternance et suivre la consigne normale */
    .levrard-prestations-duo-double .prestations-duo-item:nth-child(2).image-top .prestations-duo-image {
        order: 1;
    }

    .levrard-prestations-duo-double .prestations-duo-item:nth-child(2).image-top .prestations-duo-content {
        order: 2;
    }

    .levrard-prestations-duo-double .prestations-duo-item:nth-child(2).image-bottom .prestations-duo-content {
        order: 1;
    }

    .levrard-prestations-duo-double .prestations-duo-item:nth-child(2).image-bottom .prestations-duo-image {
        order: 2;
    }

    .prestations-duo-title {
        font-size: 22px;
    }
}

@media screen and (max-width: 768px) {
    .levrard-prestations-duo-section.spacing-small {
        padding: 30px 0;
    }

    .levrard-prestations-duo-section.spacing-medium {
        padding: 40px 0;
    }

    .levrard-prestations-duo-section.spacing-large {
        padding: 50px 0;
    }

    .levrard-prestations-duo-section.spacing-xlarge {
        padding: 60px 0;
    }

    .levrard-prestations-duo-container {
        padding: 0 15px;
    }

    .prestations-duo-item {
        gap: 20px;
    }

    .prestations-duo-features {
        padding: 15px;
    }

    .prestations-duo-features li {
        margin-bottom: 10px;
    }

    .prestations-duo-highlight {
        padding: 15px;
    }
}

@media screen and (max-width: 480px) {
    .prestations-duo-content {
        gap: 15px;
    }

    .prestations-duo-features {
        padding: 12px;
    }

    .prestations-duo-highlight {
        padding: 12px;
    }
}

/**
 * STYLES SPÉCIFIQUES À L'ÉDITEUR GUTENBERG
 */

/* Améliorer la sélectabilité dans l'éditeur */
.block-editor-block-list__block .levrard-prestations-duo-section {
    position: relative;
    z-index: 1;
}

.block-editor-block-list__block .levrard-prestations-duo-section * {
    position: relative;
}

/* Bordure pour identifier le bloc dans l'éditeur */
.block-editor-block-list__block .levrard-prestations-duo-section {
    border: 2px dashed rgba(233, 57, 52, 0.3);
    margin: 10px 0;
}

/* Forcer certains styles si Gutenberg les écrase */
.block-editor-block-list__block .prestations-duo-title {
    font-size: 24px !important;
    font-weight: 600 !important;
    color: var(--levrard-red) !important;
}
