@import url('https://fonts.googleapis.com/css2?family=Mooli&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600&display=swap');

/* --- HEADER BACKGROUND OVERRIDE --- */
.elementor-3628 .elementor-element.elementor-element-cdbc999:not(.elementor-motion-effects-element-type-background)>.elementor-widget-wrap,
.elementor-3628 .elementor-element.elementor-element-cdbc999>.elementor-widget-wrap>.elementor-motion-effects-container>.elementor-motion-effects-layer {
    background-image: url('/wp-content/uploads/2026/01/Group-1000005369-6.svg') !important;
}

/* --- CONFIGURATION DU LAYOUT --- */
.ngd-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;
}

.ctg-main-content {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin: 0;
}

.ctg-header-main h1 {
    color: #03499E;
    font-family: 'Poppins', sans-serif;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
    margin: 15px 0 0 0;
}

.ctg-meta-top {
    display: flex;
    align-items: center;
    gap: 15px;
}

.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-main-image:hover img {
    transform: scale(1.03);
}

.ctg-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin: 0;
}

.sidebar-widget {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.sidebar-widget:hover {
    transform: translateY(-5px);
}

.sidebar-list-version .ngd-list-card {
    border-radius: 15px;
    border: 1px solid #F3F4F6;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    max-width: 100%;
}

.sidebar-list-version .ngd-list-card:hover {
    border-color: #C5BA90;
    background: #FAFAFA;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.sidebar-list-version .ngd-list-link {
    display: flex;
    align-items: center;
    padding: 10px;
    gap: 15px;
    text-decoration: none;
    position: relative;
}

.sidebar-list-version .ngd-list-image {
    width: 90px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
}

.sidebar-list-version .ngd-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-list-version .ngd-list-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-list-version .ngd-list-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #3642B8;
    font-size: 11px;
    font-weight: 600;
    background: rgba(54, 66, 184, 0.05);
    padding: 3px 10px;
    border-radius: 50px;
}

.sidebar-list-version .ngd-list-title {
    font-size: 12px;
    font-weight: 600;
    color: #1F2937;
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-list-version .ngd-list-arrow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
    transition: 0.3s;
    flex-shrink: 0;
}

.sidebar-list-version .ngd-list-card:hover .ngd-list-arrow {
    background: #C5BA90;
    color: #fff;
}

.ctg-contact-widget {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    padding: 40px 20px;
    text-align: center;
    color: #fff;
    background-image: url('/wp-content/uploads/2025/10/image-202-2-68e819987c82c.webp');
    background-size: cover;
    background-position: center;
}

.ctg-contact-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(25, 42, 86, 0.5);
    z-index: 1;
}

.ctg-contact-widget-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ctg-contact-widget h3 {
    color: #FFF;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 26px;
    font-weight: 900;
    text-transform: uppercase;
    margin: 0 0 25px 0;
}

.btn-contact {
    display: inline-block;
    padding: 12px 30px;
    border: 2px solid #fff;
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    background-color: transparent;
}

.btn-contact:hover {
    background: #fff;
    color: #00194A;
}

.ctg-meta-info {
    display: flex;
    align-items: center;
    gap: 25px;
    padding-bottom: 20px;
    margin-bottom: 30px;
    border-bottom: 2px solid #E5E7EB;
    font-size: 15px;
    color: #374151;
}

.ctg-meta-info .meta-item,
.ctg-meta-info .meta-item-date {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ctg-meta-info .meta-item img {
    width: 20px;
    height: 20px;
}

.ctg-description {
    font-size: 16px;
    line-height: 1.8;
    color: #4B5563;
    margin-bottom: 40px;
    text-align: justify;
}

.sidebar-actualite-title {
    color: #00194A;
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 25px;
}

.card-category-tag {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 999px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
}

.card-category-tag.badge-blue {
    background-color: #e0f7ff;
    color: #0ea5e9;
}

.card-category-tag.badge-green {
    background-color: #d1fae5;
    color: #10b981;
}

.card-category-tag.badge-yellow {
    background-color: #fef9c3;
    color: #eab308;
}

.card-category-tag.badge-purple {
    background-color: #f5f3ff;
    color: #8b5cf6;
}

.card-category-tag.badge-gray {
    background-color: #f3f4f6;
    color: #6b7280;
}

.card-category-tag.badge-greenlight {
    background-color: #B7FFBC;
    color: #677642;
}

.card-category-tag.badge-red {
    background-color: #FFE1E1;
    color: #604444;
}

.card-category-tag.badge-bluelight {
    background-color: #B7ECFF;
    color: #327A94;
}

/* ==========================================================================
   STYLES DU CARROUSEL NATIF (SPLIDE) - DESIGN PREMIUM
   ========================================================================== */
.ctg-caroussel-wrapper {
    margin-top: 50px;
    margin-bottom: 30px;
    position: relative;
}

.ctg-caroussel {
    width: 100%;
    border-radius: 20px;
    padding-bottom: 50px;
    /* Espace pour la pagination en dessous */
}

.ctg-caroussel .splide__slide {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f9fafb;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.ctg-caroussel .splide__slide img {
    width: 100%;
    height: 450px;
    object-fit: contain;
    border-radius: 20px;
}

/* --- Flèches de navigation (Arrows) --- */
.ctg-caroussel .splide__arrow {
    display: flex;
    background: #ffffff;
    width: 50px;
    height: 50px;
    opacity: 1;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    flex-wrap: nowrap;
    align-content: center;
    align-items: center;
}

.ctg-caroussel .splide__arrow svg {
    fill: #03499E;
    /* Bleu foncé de la charte */
    width: 16px;
    height: 16px;
    transition: fill 0.4s ease;
}

/* Effet au survol des flèches */
.ctg-caroussel .splide__arrow:hover, .ctg-caroussel .splide__arrow:focus {
    background: #C5BA90;
    /* Devient Or */
    transform: translateY(-50%) scale(1.1);
    /* S'agrandit légèrement */
    box-shadow: 0 12px 30px rgba(197, 186, 144, 0.4);
    /* Ombre dorée */
}

.ctg-caroussel .splide__arrow:hover svg {
    fill: #ffffff;
    /* L'icône devient blanche */
}

/* Positionnement des flèches */
.ctg-caroussel .splide__arrow--prev {
    left: 20px;
}

.ctg-caroussel .splide__arrow--next {
    right: 20px;
}

/* --- Pagination (Dots modernes en forme de pilule) --- */
.ctg-caroussel .splide__pagination {
    bottom: 0;
    gap: 8px;
}

.ctg-caroussel .splide__pagination__page {
    width: 10px;
    height: 10px;
    background: #D1D5DB;
    /* Gris clair */
    border-radius: 50%;
    opacity: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    margin: 0;
}

.ctg-caroussel .splide__pagination__page:hover {
    background: #9CA3AF;
    transform: scale(1.1);
}

/* Le point actif devient une pilule dorée */
.ctg-caroussel .splide__pagination__page.is-active {
    background: #C5BA90;
    /* Or */
    width: 35px;
    /* S'étire en largeur */
    border-radius: 10px;
    transform: scale(1);
}

/* --- Responsive --- */
@media (max-width: 1024px) {

    .ctg-single-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .ctg-sidebar {
        display: flex;
        flex-direction: column;
        /* On reste en colonne */
    }

    /* On donne l'ordre 1 au widget des "Autres Actualités" (le 2ème dans le HTML) */
    .ctg-sidebar .sidebar-widget:nth-child(2) {
        order: 1;
    }

    /* On donne l'ordre 2 au widget de "Contact" (le 1er dans le HTML) */
    .ctg-sidebar .ctg-contact-widget {
        order: 2;
    }
}

@media (max-width: 768px) {
    .ctg-caroussel .splide__slide img {
        height: 300px;
    }

    .ctg-caroussel .splide__arrow {
        width: 40px;
        height: 40px;
    }

    .ctg-caroussel .splide__arrow svg {
        width: 14px;
        height: 14px;
    }
}

/* ==========================================================================
   OPTIMISATION RESPONSIVE POUR LA PAGE SINGLE (MOBILE)
   ========================================================================== */

@media (max-width: 768px) {

    /* Réduction de l'espacement global du wrapper */
    .ngd-single-wrapper {
        padding: 20px 0;
    }

    /* Ajustement du container principal */
    .ctg-main-content {
        padding: 20px;
        /* Réduit de 40px à 20px pour gagner de la place */
        border-radius: 15px;
    }

    /* RÉDUCTION DE LA TAILLE DU TITRE (Votre demande principale) */
    .ctg-header-main h1 {
        font-size: 22px;
        /* Taille réduite pour mobile (au lieu de 34px) */
        line-height: 1.3;
        margin-top: 10px;
    }

    /* Ajustement des meta (catégorie et date) */
    .ctg-meta-top {
        flex-wrap: wrap;
        gap: 10px;
    }

    .meta-item-date {
        font-size: 13px;
    }

    /* Ajustement de la description pour la lisibilité */
    .ctg-description {
        font-size: 15px;
        line-height: 1.6;
        text-align: justify;
    }

    /* Espacement de la sidebar sur mobile */
    .ctg-sidebar {
        gap: 20px;
    }
}

@media (max-width: 480px) {

    /* Encore plus petit pour les très petits écrans */
    .ctg-header-main h1 {
        font-size: 20px;
    }

    .ctg-main-content {
        padding: 15px;
    }
}