@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Montserrat:wght@400;500;600;700&display=swap');

/* --- CONFIGURATION GLOBALE --- */
.ctg-single-wrapper {
    background-color: #F1F3F6;
    padding: 50px 0;
    font-family: 'Montserrat', sans-serif;
}

.ctg-single-container {
    max-width: 1500px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 40px;
    padding: 0 20px;
    align-items: start;
}

/* --- CONTENU PRINCIPAL --- */
.ctg-main-content {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.ctg-header-main h1 {
    color: #03499E;
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin: 15px 0 0 0;
}

.ctg-meta-top {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.ctg-badge {
    background-color: #e0f7ff;
    color: #0ea5e9;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.meta-item-date, .meta-item-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6B7280;
    font-weight: 500;
}

.meta-item-date img, .meta-item-time img {
    width: 16px;
}

.ctg-main-image {
    margin: 30px 0;
    border-radius: 15px;
    overflow: hidden;
}

.ctg-main-image img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

.ctg-description {
    font-size: 16px;
    line-height: 1.8;
    color: #4B5563;
    margin-bottom: 40px;
    text-align: justify;
}

/* --- SECTION DÉTAILS --- */
.ctg-details-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #EEE;
}

.ctg-details-section h2 {
    color: #03499E;
    font-size: 22px;
    margin-bottom: 20px;
}

.ctg-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #F3F4F6;
}

.detail-label {
    font-weight: 500;
    color: #6B7280;
}

.detail-value {
    font-weight: 700;
    color: #1F2937;
}

.status-ouvert {
    color: #10B981;
    background: #D1FAE5;
    padding: 2px 10px;
    border-radius: 50px;
}

.ctg-action-area {
    margin-top: 30px;
}

.btn-consulter {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid #C5BA90;
    border-radius: 50px;
    color: #1F2937;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.btn-consulter:hover {
    background: #C5BA90;
    color: #FFF;
}

/* --- SIDEBAR --- */
.ctg-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.sidebar-title {
    color: #00194A;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* LISTE SIDEBAR */
.ctg-list-card {
    border: 1px solid #F3F4F6;
    border-radius: 15px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: 0.3s;
}

.ctg-list-card:hover {
    border-color: #C5BA90;
    transform: translateY(-3px);
}

.ctg-list-link {
    display: flex;
    align-items: center;
    padding: 10px;
    gap: 15px;
    text-decoration: none;
}

.ctg-list-image {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
}

.ctg-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ctg-list-content {
    flex: 1;
}

.ctg-list-date {
    font-size: 11px;
    color: #C5BA90;
    font-weight: 700;
}

.ctg-list-title {
    font-size: 13px;
    font-weight: 600;
    color: #1F2937;
    margin: 3px 0 0 0;
    line-height: 1.3;
}

.ctg-list-arrow {
    width: 28px;
    height: 28px;
    background: #F3F4F6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
}

.ctg-list-card:hover .ctg-list-arrow {
    background: #C5BA90;
    color: #FFF;
}

/* CONTACT WIDGET */
.ctg-contact-widget {
    background-image: linear-gradient(rgba(3, 73, 158, 0.6), rgba(3, 73, 158, 0.6)), url('/wp-content/uploads/2025/10/image-202-2-68e819987c82c.webp');
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    padding: 40px 20px;
}

.ctg-contact-widget h3 {
    color: #FFF;
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.btn-contact {
    display: inline-block;
    padding: 10px 25px;
    border: 2px solid #FFF;
    border-radius: 50px;
    color: #FFF;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.btn-contact:hover {
    background: #FFF;
    color: #03499E;
}

/* --- RESPONSIVE & INVERSION --- */
@media (max-width: 1024px) {
    .ctg-single-container {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

    .ctg-sidebar {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Inversion : Autres Offres en premier */
    .ctg-sidebar .sidebar-widget:nth-child(2) {
        order: 1 !important;
    }

    /* Contact en deuxième */
    .ctg-sidebar .ctg-contact-widget {
        order: 2 !important;
    }

    .ctg-header-main h1 {
        font-size: 24px;
    }

    .ctg-main-content {
        padding: 20px;
    }
}