
/* Cache le bouton Sign In */
.sp-sign-in {
    display: none !important;
}

/* Cache le titre de page */
.page-header,
.blog-featured .page-header {
    display: none !important;
}

/* Cache le logo Helix */
#sp-logo {
    display: none !important;
}

/* ========== Bannière ========== */
.banner-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 0;  /* Enlève aussi le margin-top si tu veux que ça colle au menu */
    padding: 0;
}

.site-banner {
    position: relative;
    width: 100%;
    max-width: 1400px;
    height: 200px;
    overflow: hidden;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    background: url("../images/banner.png") right 0 center/auto 100% no-repeat, #F5F7FB;
}

.site-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(255,255,255,.95) 0%,
        rgba(255,255,255,.95) 18%,
        rgba(228,0,43,.88) 18%,
        rgba(228,0,43,.88) 50%,
        rgba(0,61,165,.88) 50%,
        rgba(0,61,165,.88) 100%
    );
    -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,.75) 40%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,.75) 40%, rgba(0,0,0,0) 100%);
    pointer-events: none;
    z-index: 0;
}

.site-banner .custom {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 20px;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,.5);
    position: relative;
    z-index: 2;
}

.banner-logo {
    display: block;
    max-height: 90px;
    width: auto;
}

.banner-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.banner-title {
    font-size: 3rem;
    line-height: 1.05;
    letter-spacing: .3px;
    font-family: Georgia, serif;
}

.banner-subtitle {
    font-size: 1.05rem;
    color: rgba(255,255,255,.92);
    text-shadow: 2px 2px 4px rgba(0,0,0,.45);
}

/* (garde le reste du CSS articles-grid-custom en dessous) */

.articles-grid-custom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 30px;
}

.card-article {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-category {
    color: #E4002B;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.card-title {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 12px;
}

.card-title a {
    color: #2C3E50;
    text-decoration: none;
}

.card-title a:hover {
    color: #E4002B;
}

.card-text {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.card-meta {
    font-size: 0.8rem;
    color: #999;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

@media (max-width: 992px) {
    .articles-grid-custom {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .articles-grid-custom {
        grid-template-columns: 1fr;
    }
}

/* Augmentation taille des menus */
.sp-megamenu-parent > li > a {
    font-size: 1.05rem !important;
}

/* Header layout : menus à gauche, hamburger à droite */
#sp-header .container-inner {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

#sp-menu {
    order: 1;
    flex: 0 0 auto;
}

#sp-menu .sp-column {
    justify-content: flex-start !important;
}

.sp-megamenu-wrapper {
    justify-content: flex-start !important;
}

.sp-megamenu-parent {
    justify-content: flex-start !important;
}

/* Hamburger et modules à droite */
#sp-menu .offcanvas-toggler-right {
    order: 3;
    margin-left: auto !important;
}

.header-modules {
    order: 2;
    margin-left: auto !important;
}

/* Align menu bar width with banner */
#sp-header .container,
#sp-header .container-inner {
    max-width: 1400px !important;
    width: 100% !important;
    margin: 0 auto !important;
}

/* Move burger icon to the left of menu items */
.sp-megamenu-wrapper {
    flex-direction: row-reverse !important;
}

/* Ensure proper spacing */
#offcanvas-toggler {
    order: -1 !important;
    margin-right: 20px !important;
    margin-left: 0 !important;
}

.sp-megamenu-parent {
    order: 1 !important;
}

/* Optionally, align everything to the left instead of right */
.sp-column {
    justify-content: flex-start !important;
}

/*--------------------------------*/
/* Hide the social media/contact bar */
#sp-top-bar {
    display: none !important;
}

/*-----------------------------------*/

/* Reduce spacing between menu and articles */
#sp-main-body {
    padding-top: 20px !important;
}

.blog-featured,
.com-content-featured {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* If there's a specific container causing the gap */
#sp-component {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Reduce top margin on your custom articles grid */
.articles-grid-custom {
    margin-top: 20px !important;
}

/* ========== Modern Breadcrumb ========== */
.mod-breadcrumbs {
    background: linear-gradient(to right, #f8f9fa, #ffffff);
    padding: 10px 0;
    margin: 0 auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.breadcrumb {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    list-style: none;
    display: flex;
    align-items: center;
    font-size: 0.85rem;
}

.breadcrumb a {
    color: #003DA5;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.breadcrumb a:hover {
    background: #E4002B;
    color: white;
}

.breadcrumb li + li::before {
    content: "→";
    padding: 0 6px;
    color: #999;
}

/* Hide the location icon in breadcrumb */
.mod-breadcrumbs__divider,
.icon-location {
    display: none !important;
}

/* Force full width for breadcrumb */
.breadcrumb-wrapper .container {
    max-width: 100% !important;
    padding-left: 0px !important;
    padding-right: 0px !important;
}

/*------------------*/

/* 1. Add space between last menu item and search field */
.header-modules {
    margin-left: 30px !important;
}

/* Alternative: add space to the search module itself */
.header-modules .sp-module {
    margin-left: 20px;
}

/* 2. Add space between articles and pagination */
.articles-grid-custom {
    margin-bottom: 40px;
}

/* Or target the pagination directly */
.pagination {
    margin-top: 40px !important;
}

/*------------------*/

/* Hide Featured badge */
.featured-article-badge {
    display: none !important;
}

/* Hide author name */
.article-info .createdby {
    display: none !important;
}

/* Hide hits counter */
.article-info .hits {
    display: none !important;
}

/* ========== Dropdown Submenu ========== */

/* Ensure parent items are positioned correctly */
.sp-megamenu-parent > li {
    position: relative;
}

/* Style for dropdown container */
.sp-megamenu-parent > li .sp-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 0 0 8px 8px;
    padding: 10px 0;
    z-index: 1000;
    margin-top: 0;
}

/* Show dropdown on hover */
.sp-megamenu-parent > li:hover > .sp-dropdown {
    display: block;
}

/* Submenu list styling */
.sp-dropdown .sp-dropdown-inner > ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Submenu items */
.sp-dropdown li.sp-menu-item {
    list-style: none;
    margin: 0;
}

.sp-dropdown li.sp-menu-item > a {
    display: block;
    padding: 12px 20px;
    color: #2C3E50;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
}

.sp-dropdown li.sp-menu-item > a:hover {
    background: #f8f9fa;
    color: #E4002B;
    border-left-color: #E4002B;
    padding-left: 25px;
}

/* Active submenu item */
.sp-dropdown li.sp-menu-item.active > a,
.sp-dropdown li.sp-menu-item.current > a {
    color: #E4002B;
    font-weight: 600;
    border-left-color: #E4002B;
}

/* Arrow indicator for parent items with submenu */
.sp-megamenu-parent > li.sp-has-child > a::after,
.sp-megamenu-parent > li:has(.sp-dropdown) > a::after {
    content: "▼";
    font-size: 0.65em;
    margin-left: 6px;
    opacity: 0.5;
    transition: transform 0.2s ease;
}

.sp-megamenu-parent > li:hover > a::after {
    transform: rotate(180deg);
}

/* Mobile: Show dropdown on click instead of hover */
@media (max-width: 991px) {
    .sp-megamenu-parent > li .sp-dropdown {
        position: static;
        box-shadow: none;
        border-radius: 0;
        background: #f8f9fa;
        margin-top: 5px;
    }
    
    .sp-dropdown li.sp-menu-item > a {
        padding-left: 30px;
    }
}

/* ========== Centrer la pagination ========== */

/* Wrapper de pagination */
.blog-featured > .w-100,
.blog-category > .w-100 {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-top: 40px;
    width: 100%;
}

/* Pagination elle-même */
.pagination {
    display: flex;
    justify-content: center;
    margin: 0 auto !important;
    float: none !important;
}

/* Counter "Page X of Y" à droite */
.counter {
    position: absolute !important;
    right: 20px !important;
    float: none !important;
}

/* Reset des styles par défaut */
.w-100 .pagination {
    margin-left: auto;
    margin-right: auto;
}
