/* BWA Realisations Grid */
.bwa-realisations-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.bwa-realisations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Card Styles */
.bwa-realisation-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bwa-realisation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.bwa-card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.bwa-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.bwa-realisation-card:hover .bwa-card-image img {
    transform: scale(1.05);
}

.bwa-card-placeholder {
    width: 100%;
    height: 100%;
    background: #e0e0e0;
}

.bwa-card-content {
    padding: 20px;
}

.bwa-card-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

/* Load More Button */
.bwa-load-more-wrapper {
    text-align: center;
    margin-top: 30px;
}

.bwa-load-more-btn {
    background: #2c3e50;
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.bwa-load-more-btn:hover {
    background: #34495e;
}

.bwa-load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Modal Styles */
.bwa-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.bwa-modal.active {
    display: block;
}

.bwa-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.bwa-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 10px;
    width: 90%;
    max-width: 1100px;
    max-height: 90vh;
    overflow: hidden;
}

.bwa-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #333;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bwa-modal-close:hover {
    color: #e74c3c;
}

.bwa-modal-inner {
    display: flex;
    min-height: 500px;
}

/* Modal Slider */
.bwa-modal-slider {
    flex: 0 0 55%;
    background: #f5f5f5;
    position: relative;
}

.bwa-slider-container {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bwa-slider-main {
    flex: 1;
    width: 100%;
    min-height: 0;
    border-radius: 15px 15px 15px 0;
    overflow: hidden;
}

.bwa-slider-images {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

/* Swiper specific styles */
.bwa-slider-images.swiper-wrapper {
    display: flex;
    height: 100%;
    transition-property: transform;
}

.bwa-slider-images .swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
}

.bwa-slider-images .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Legacy styles for non-Swiper images */
.bwa-slider-images img {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bwa-slider-prev,
.bwa-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 15px 20px;
    font-size: 18px;
    cursor: pointer;
    z-index: 5;
}

.bwa-slider-prev {
    left: 10px;
}

.bwa-slider-next {
    right: 10px;
}

.bwa-slider-prev:hover,
.bwa-slider-next:hover {
    background: #fff;
}

.bwa-slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.bwa-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    border: none;
}

.bwa-slider-dot.active {
    background: #fff;
}

/* Slider de miniatures */
.bwa-slider-thumbs {
    width: 100%;
    height: 120px;
    box-sizing: border-box;
    overflow: hidden;
}

.bwa-slider-thumbs.bwa-thumbs-hidden {
    display: none !important;
}

.bwa-slider-thumbs .swiper-slide {
    width: 120px;
    height: 120px;
    aspect-ratio: 1 / 1;
    opacity: 0.4;
    transition: opacity 0.3s ease-out;
    cursor: pointer;
    border-radius: 15px;
    overflow: hidden;
}

.bwa-slider-thumbs .swiper-slide-thumb-active {
    opacity: 1;
}

.bwa-slider-thumbs-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Masquer les miniatures sur mobile */
@media (max-width: 768px) {
    .bwa-slider-thumbs {
        display: none;
    }
}

/* Modal Info */
.bwa-modal-info {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.bwa-modal-title {
    margin: 0 0 20px 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
}

.bwa-modal-description {
    color: #555;
    line-height: 1.7;
    margin-bottom: 30px;
}

.bwa-modal-description p {
    margin-bottom: 15px;
}

.bwa-modal-linked-posts h4,
.bwa-realisation-modal-linked-posts h4 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--e-global-color-text, #2c3e50);
}

.bwa-modal-linked-posts ul,
.bwa-realisation-modal-linked-posts ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.bwa-modal-linked-posts li,
.bwa-realisation-modal-linked-posts li {
    margin: 0;
}

.bwa-realisation-linked-post-item {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 85px;
    min-width: 85px;
    background: #ffffff;
    padding: 6px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.bwa-realisation-linked-post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bwa-realisation-linked-post-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .bwa-realisations-grid {
        grid-template-columns: 1fr;
    }

    .bwa-modal-inner {
        flex-direction: column;
    }

    .bwa-modal-slider {
        flex: 0 0 300px;
    }

    .bwa-modal-info {
        padding: 25px;
    }

    .bwa-modal-title {
        font-size: 1.4rem;
    }
}
