/**
 * Styles pour la page détails d'offre
 * Version: 5.0.0
 */

/* ===================================
   Override Astra Theme Container
   =================================== */
.single-offres #content,
.single-offres .site-content {
    max-width: 100% !important;
    width: 100% !important;
}

.single-offres .ast-container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Si les classes above ne marchent pas, essaye avec .single-offre (singulier) */
.single-offre #content,
.single-offre .site-content {
    max-width: 100% !important;
    width: 100% !important;
}

.single-offre .ast-container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ===================================
   Styles du Plugin
   =================================== */

.mb-single-offer-wrapper {
    background: linear-gradient(135deg, rgba(110, 159, 51, 0.03) 0%, rgba(84, 180, 53, 0.05) 50%, rgba(63, 103, 49, 0.03) 100%);
    min-height: calc(100vh - 150px);
    padding: 60px 20px;
    width: 100%;
    max-width: 100%;
}


.mb-single-offer-wrapper {
    background: linear-gradient(135deg, rgba(110, 159, 51, 0.03) 0%, rgba(84, 180, 53, 0.05) 50%, rgba(63, 103, 49, 0.03) 100%);
    min-height: calc(100vh - 150px);
    padding: 60px 20px;
    width: 100%;
    max-width: 100%;
}


.mb-single-offer-container {
    max-width: 1400px; /* Augmenté de 1200px à 1400px */
    margin: 0 auto;
    width: 100%;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}


/* Header de l'offre */
.mb-single-offer-header {
    background: linear-gradient(135deg, #6e9f33 0%, #54B435 100%);
    padding: 50px 40px;
    color: white;
}

.mb-offer-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.mb-offer-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.mb-offer-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
}

.mb-offer-status.status-publish {
    color: #27ae60;
}

.mb-offer-status.status-pending {
    color: #f39c12;
}

.mb-single-offer-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: white !important; /* Force le blanc */
}


.mb-offer-excerpt {
    font-size: 1.1rem;
    opacity: 0.95;
    line-height: 1.6;
}

/* Contenu principal */
.mb-single-offer-content {
    display: grid;
    grid-template-columns: 1fr 400px; /* Augmenté de 350px à 400px */
    gap: 50px; /* Augmenté de 40px à 50px */
    padding: 50px 60px; /* Augmenté le padding horizontal */
}


.mb-single-offer-main {
    flex: 1;
}

.mb-single-offer-sidebar {
    background: linear-gradient(135deg, rgba(110, 159, 51, 0.05) 0%, rgba(84, 180, 53, 0.05) 100%);
    padding: 30px;
    border-radius: 16px;
    height: fit-content;
    border: 1px solid rgba(110, 159, 51, 0.1);
}

/* Galerie d'images */
.mb-offer-gallery {
    margin-bottom: 40px;
}

.mb-offer-main-image {
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.mb-offer-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.mb-offer-main-image img:hover {
    transform: scale(1.05);
}

.mb-offer-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.mb-offer-thumbnail {
    width: 100%;
    height: 100px;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.mb-offer-thumbnail.active {
    border-color: #6e9f33;
    box-shadow: 0 0 0 2px rgba(110, 159, 51, 0.2);
}

.mb-offer-thumbnail:hover {
    border-color: #54B435;
    transform: translateY(-2px);
}

.mb-offer-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Description */
.mb-offer-description {
    margin-bottom: 40px;
}

.mb-section-title {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #6e9f33;
    font-weight: 700;
}

.mb-offer-description-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #5a6c7d;
}

/* Détails de l'offre (sidebar) */
.mb-offer-details-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.mb-offer-details-card h3 {
    font-size: 1.3rem;
    color: #6e9f33;
    margin: 0 0 20px 0;
    font-weight: 700;
}

.mb-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #ecf0f1;
}

.mb-detail-item:last-child {
    border-bottom: none;
}

.mb-detail-label {
    font-weight: 600;
    color: #7f8c8d;
    font-size: 14px;
}

.mb-detail-value {
    font-weight: 600;
    color: #2c3e50;
    text-align: right;
    font-size: 15px;
}

.mb-detail-value.highlight {
    color: #6e9f33;
    font-size: 1.2rem;
}

/* Contact */
.mb-offer-contact-card {
    background: linear-gradient(135deg, #6e9f33 0%, #54B435 100%);
    padding: 30px;
    border-radius: 12px;
    color: white;
}

.mb-offer-contact-card h3 {
    font-size: 1.3rem;
    margin: 0 0 20px 0;
    font-weight: 700;
    color: white !important; /* Force le blanc */
}


.mb-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.mb-contact-item:last-child {
    border-bottom: none;
}

.mb-contact-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mb-contact-info {
    flex: 1;
}

.mb-contact-label {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 2px;
}

.mb-contact-value {
    font-size: 15px;
    font-weight: 600;
}

.mb-contact-value a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.mb-contact-value a:hover {
    opacity: 0.8;
}

/* Boutons d'action */
.mb-offer-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.mb-action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 25px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.mb-action-button-primary {
    background: white;
    color: #6e9f33;
    border-color: white;
}

.mb-action-button-primary:hover {
    background: transparent;
    color: white;
    transform: translateY(-2px);
}

.mb-action-button-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.mb-action-button-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Bouton retour */
.mb-back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    color: #6e9f33;
    border: 2px solid rgba(110, 159, 51, 0.2);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.mb-back-button:hover {
    background: #6e9f33;
    color: white;
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(110, 159, 51, 0.3);
}

/* Responsive */
@media (max-width: 992px) {
    .mb-single-offer-content {
        grid-template-columns: 1fr;
    }
    
    .mb-single-offer-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .mb-single-offer-header {
        padding: 40px 25px;
    }
    
    .mb-single-offer-title {
        font-size: 2rem;
    }
    
    .mb-single-offer-content {
        padding: 30px 25px;
    }
    
    .mb-offer-main-image {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .mb-single-offer-header {
        padding: 30px 20px;
    }
    
    .mb-single-offer-title {
        font-size: 1.6rem;
    }
    
    .mb-single-offer-content {
        padding: 20px 15px;
    }
    
    .mb-offer-main-image {
        height: 250px;
    }
}