.e42-browse-posts-container {
    width: 100%;
    margin: 0 auto;
    font-family: inherit;
}

.e42-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.e42-header .e42-title {
    margin-right: auto;
}

.e42-title {
    margin: 0;
    line-height: 1.15;
}

.e42-title .main-title {
    display: block;
    font-size: 38px;
    font-weight: 500;
    color: #0088ff;
}

.e42-title .sub-title {
    display: block;
    font-size: 38px;
    font-weight: 300;
    color: #0088ff;
}

/* Quand "Empêcher le retour à la ligne du titre" est activé dans Elementor :
   le titre principal et le sous-titre passent tous les deux sur UNE SEULE
   ligne (ils ne sont plus l'un en dessous de l'autre). */
.e42-title.e42-title-nowrap {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    max-width: 100%;
}

.e42-title.e42-title-nowrap .main-title,
.e42-title.e42-title-nowrap .sub-title {
    display: inline;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.e42-title.e42-title-nowrap .main-title {
    margin-right: 0.3em;
    flex-shrink: 0;
}

.e42-title.e42-title-nowrap .sub-title {
    min-width: 0;
}

.e42-btn-view-more {
    display: inline-block;
    padding: 10px 28px;
    border: 1px solid #0088ff;
    border-radius: 25px;
    color: #0088ff;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.e42-btn-view-more:hover {
    background-color: #0088ff;
    color: #ffffff;
}

.e42-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.e42-card {
    background: #ffffff;
    border: 1px solid #eef2f5;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.e42-image-wrapper {
    position: relative;
    width: 100%;
    height: 210px;
}

.e42-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.e42-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ffffff;
    color: #0088ff;
    padding: 6px 15px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.e42-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.e42-card-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333333;
}

.e42-card-date {
    color: #0088ff;
    font-size: 13px;
    margin-bottom: 12px;
}

.e42-card-desc {
    color: #666666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 22px 0;
    flex-grow: 1;
}

.e42-btn-read-more {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 8px 20px;
    border: 1px solid #0088ff;
    border-radius: 20px;
    color: #0088ff;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
}

.e42-btn-read-more .e42-icon {
    font-size: 10px;
    margin-right: 6px;
}

.e42-btn-read-more:hover {
    background-color: #0088ff;
    color: #ffffff;
}

/* Adaptabilité Mobile & Tablette */
@media (max-width: 992px) {
    .e42-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .e42-grid {
        grid-template-columns: 1fr !important;
    }

    /* Le titre et le bouton "View more" restent côte à côte sur la même
       ligne. La barre de recherche, elle, passe systématiquement sur sa
       propre ligne complète (elle est trop large pour partager la ligne). */
    .e42-header {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 12px !important;
    }

    .e42-header .e42-title {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        margin-right: 0 !important;
    }

    .e42-btn-view-more {
        flex: 0 0 auto !important;
        white-space: nowrap;
    }

    /* La barre de recherche et le select catégories/tags sont désormais
       affichés côte à côte, sur la même ligne (row), en dessous du
       titre/bouton "View more". */
    .e42-search-wrapper {
        flex: 0 0 auto !important;
        padding: 9px 9.425px 10px 0;
        width: 140px;
        min-width: 0 !important;
        order: 2;
    }

    .e42-filter-wrapper {
        flex: 0 0 auto !important;
        padding: 9px 9.425px 10px 0;
        width: 117px;
        min-width: 0 !important;
        order: 3;
    }

    /* Espace automatique entre les deux blocs : .e42-header applique déjà
       justify-content: space-between, ce qui pousse la recherche à gauche
       et le filtre à droite sur leur propre ligne — exactement comme sur
       la maquette. */

    .e42-search-input {
        width: 100%;
        box-sizing: border-box;
    }

    .e42-taxonomy-select {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
}


.e42-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.e42-card-title a:hover {
    color: #0088ff;
}

/* ==========================================
   BARRE DE RECHERCHE
   ========================================== */
.e42-search-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.e42-search-input {
    width: 260px;
    max-width: 100%;
    padding: 10px 40px 10px 18px;
    border: 1px solid #0088ff;
    border-radius: 25px;
    font-size: 14px;
    color: #333333;
    background-color: #ffffff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.e42-search-input:focus {
    border-color: #0088ff;
}

.e42-search-input::placeholder {
    color: #a9b4bf;
}

.e42-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.e42-search-icon circle,
.e42-search-icon line {
    stroke: #0088ff;
}

/* ==========================================
   FILTRE DÉROULANT (SELECT CATÉGORIES / TAGS)
   Design "underline" (texte + flèche, ligne fine en dessous),
   identique à la maquette : pas de fond, pas de bordure pleine.
   ========================================== */
.e42-filter-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 140px;
    max-width: 100%;
}

.e42-taxonomy-select {
    width: 100%;
    padding: 6px 22px 6px 0;
    border: none;
    border-bottom: 1px solid #333333;
    border-radius: 0;
    font-size: 14px;
    font-family: inherit;
    color: #333333;
    background-color: transparent;
    outline: none;
    box-sizing: border-box;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: border-color 0.3s ease;
}

.e42-taxonomy-select:focus {
    border-color: #0088ff;
}

.e42-filter-icon {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.e42-filter-icon path {
    stroke: #333333;
}

/* Visibilité responsive administrable (barre de recherche et select
   catégories/tags) : permet par ex. de masquer un élément sur desktop
   et de ne l'afficher que sur mobile, ou l'inverse. */
.e42-search-wrapper.e42-visible-mobile-only,
.e42-filter-wrapper.e42-visible-mobile-only {
    display: none;
}

.e42-search-wrapper.e42-visible-desktop-only {
    display: inline-flex;
}

.e42-filter-wrapper.e42-visible-desktop-only {
    display: inline-flex;
}

@media (max-width: 600px) {
    .e42-search-wrapper.e42-visible-mobile-only,
    .e42-filter-wrapper.e42-visible-mobile-only {
        display: inline-flex;
    }

    .e42-search-wrapper.e42-visible-desktop-only,
    .e42-filter-wrapper.e42-visible-desktop-only {
        display: none;
    }
}

/* ==========================================
   PAGINATION
   ========================================== */
.e42-pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 35px;
}

.e42-pagination {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.e42-pagination .e42-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 13px;
    color: #666666;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.e42-pagination .e42-page-number:hover {
    color: #0088ff;
    background-color: #f0f6ff;
}

.e42-pagination .e42-page-number.active {
    color: #ffffff;
    background-color: #0088ff;
}

.e42-pagination .e42-page-prev,
.e42-pagination .e42-page-next {
    font-weight: 500;
    color: #333333;
}

.e42-pagination .e42-page-prev.disabled,
.e42-pagination .e42-page-next.disabled {
    color: #cccccc;
    cursor: default;
}

.e42-pagination .e42-page-dots {
    color: #999999;
    cursor: default;
}

/* ==========================================
   ETAT DE CHARGEMENT (AJAX)
   ========================================== */
.e42-browse-posts-container.e42-loading .e42-grid {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.e42-no-posts {
    grid-column: 1 / -1;
    text-align: center;
    color: #666666;
    padding: 30px 0;
}

@media (max-width: 600px) {
    .e42-search-input {
        width: 100%;
    }
}