/* =============================================================================
   Wengel - Espace CSE — Styles front-office
   ============================================================================= */

/* ===========================
   LAYOUT 2 COLONNES
   =========================== */

.wgl-cse-layout {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    color: #1d202d;
}

/* ===========================
   SIDEBAR GAUCHE (1/4) — sticky
   =========================== */

.wgl-cse-sidebar {
    flex: 0 0 25%;
    max-width: 25%;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

.wgl-cse-sidebar__inner {
    /*background: #f8f8f8;
    border: 1px solid #e8e8e8;
    border-radius: 8px;*/
    border-right: 1px solid #e0e0e0;
    padding: 24px;
    text-align: center;
}

.wgl-cse-sidebar__logo {
    margin-bottom: 20px;
}

.wgl-cse-sidebar__logo img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}

.wgl-cse-sidebar__contact {
    border-bottom: 1px solid #e0e0e0;
    padding: 16px 0;
    margin-bottom: 15px;
}

.wgl-cse-sidebar__contact-label {
    font-size: 0.78rem;
    color: #1d202d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 6px;
}

.wgl-cse-sidebar__contact-mail {
    font-size: 0.9rem;
    /*color: #333;
    font-weight: 600;
    text-decoration: none;*/
    font-style: italic;
    word-break: break-word;
    display: block;
}

.wgl-cse-sidebar__contact-mail:hover {
    text-decoration: underline;
}

/* ===========================
   CONTENU DROITE (3/4)
   =========================== */

.wgl-cse-content {
    flex: 1 1 0;
    min-width: 0;
}

/* ===========================
   SECTIONS (Pages / Actualités)
   =========================== */

.wgl-cse-section {
    margin-bottom: 48px;
}

.wgl-cse-section:last-child {
    margin-bottom: 0;
}

.wgl-cse-section__title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 5px;
    padding-bottom: 5px;
    /*border-bottom: 2px solid #e8e8e8;*/
}

.wgl-cse-section__subtitle {
    font-size: 0.85rem;
    font-weight: 400;
    font-style: italic;
}

.wgl-cse-section__empty {
    color: #888;
    font-style: italic;
    padding: 20px 0;
}

/* ===========================
   GRILLE DES CARDS
   =========================== */

.wgl-cse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* ===========================
   CARD
   =========================== */

.wgl-cse-card {
    /*border: 1px solid #e8e8e8;
    border-radius: 6px;*/
    overflow: hidden;
    /*transition: box-shadow 0.2s ease, transform 0.2s ease;*/
    background: #fff;
}

.wgl-cse-card:hover {
    /*box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);*/
    /*transform: translateY(-2px);*/
}

.wgl-cse-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.wgl-cse-card__image-wrapper {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f0f0f0;
    border-radius: 10px;
}

.wgl-cse-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wgl-cse-card:hover .wgl-cse-card__image {
    transform: scale(1.04);
}

.wgl-cse-card__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 0.8rem;
    width: 100%;
    height: 100%;
}

.wgl-cse-card__body {
    padding: 12px 14px;
}

.wgl-cse-card__title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    text-align: center;
}

/* ===========================
   PAGE DÉTAIL / PAGE WP
   =========================== */

.wgl-cse-back {
    margin-bottom: 24px;
}

.wgl-cse-back--bottom {
    margin-top: 40px;
    margin-bottom: 0;
}

.wgl-cse-article__featured-image {
    margin-bottom: 28px;
    border-radius: 6px;
    overflow: hidden;
    max-height: 420px;
}

.wgl-cse-article__featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wgl-cse-article__header {
    margin-bottom: 20px;
}

.wgl-cse-article__title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.wgl-cse-article__date {
    font-size: 0.85rem;
    color: #888;
}

.wgl-cse-article__content {
    line-height: 1.75;
    color: #333;
}

.wgl-cse-article__content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 12px 0;
}

.wgl-cse-article__content h1,
.wgl-cse-article__content h2,
.wgl-cse-article__content h3 {
    margin-top: 28px;
    margin-bottom: 12px;
}

/* ===========================
   BOUTON HOOK
   =========================== */

.wgl-cse-btn {
    /*display: inline-flex;
    align-items: center;
    gap: 8px;*/
    background-color: #bfd400;
}

/* ===========================
   RESPONSIVE — TABLETTE (≤ 992px)
   Sidebar passe en bandeau horizontal au-dessus du contenu
   =========================== */

@media (max-width: 992px) {
    .wgl-cse-layout {
        flex-direction: column;
        gap: 24px;
    }

    .wgl-cse-sidebar {
        flex: none;
        max-width: 100%;
        width: 100%;
        position: static;
    }

    .wgl-cse-sidebar__inner {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 24px;
        text-align: left;
        padding: 16px 20px;
    }

    .wgl-cse-sidebar__logo {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .wgl-cse-sidebar__logo img {
        max-height: 64px;
    }

    .wgl-cse-sidebar__contact {
        border-top: none;
        border-left: 1px solid #e0e0e0;
        padding-top: 0;
        padding-left: 24px;
    }
}

/* ===========================
   RESPONSIVE — MOBILE (≤ 576px)
   Tout s'empile, logo et mail centrés
   =========================== */

@media (max-width: 576px) {
    .wgl-cse-sidebar__inner {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .wgl-cse-sidebar__contact {
        border-left: none;
        border-top: 1px solid #e0e0e0;
        padding-left: 0;
        padding-top: 16px;
        width: 100%;
    }

    .wgl-cse-grid {
        grid-template-columns: 1fr;
    }

    .wgl-cse-article__title {
        font-size: 1.4rem;
    }
}

/* ===========================
   PAGES WP — CERCLES COLORÉS
   =========================== */

.wgl-cse-pages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 8px;
}

.wgl-cse-page-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.wgl-cse-page-card__circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background-color: var(--wgl-cse-color, #cccccc);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.wgl-cse-page-card:hover .wgl-cse-page-card__circle {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.wgl-cse-page-card__icon {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

.wgl-cse-page-card__title {
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #333;
    line-height: 1.3;
}

/* ===========================
   FILTRES
   =========================== */

.wgl-cse-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.wgl-cse-filters__select {
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: #fff;
    cursor: pointer;
    min-width: 180px;
}

.wgl-cse-filters__select:focus {
    outline: none;
    border-color: var(--wgl-cse-color, #cccccc);
}

/* ===========================
   GRILLE POSTS (4 colonnes)
   =========================== */

.wgl-cse-grid--posts {
    grid-template-columns: repeat(4, 1fr);
    transition: opacity 0.2s ease;
}

/* ===========================
   PAGINATION
   =========================== */

.wgl-cse-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e8e8e8;
}

.wgl-cse-pagination__btn {
    padding: 8px 20px;
    border: 1px solid var(--wgl-cse-color, #cccccc);
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.wgl-cse-pagination__btn:hover:not(:disabled) {
    background: var(--wgl-cse-color, #cccccc);
    color: #fff;
}

.wgl-cse-pagination__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.wgl-cse-pagination__info {
    font-size: 0.9rem;
    color: #666;
}

/* ===========================
   RESPONSIVE PAGES — TABLETTE
   =========================== */

@media (max-width: 992px) {
    .wgl-cse-pages-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    .wgl-cse-page-card__circle {
        width: 120px;
        height: 120px;
    }

    .wgl-cse-grid--posts {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===========================
   RESPONSIVE PAGES — MOBILE
   =========================== */

@media (max-width: 576px) {
    .wgl-cse-pages-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wgl-cse-page-card__circle {
        width: 100px;
        height: 100px;
    }

    .wgl-cse-grid--posts {
        grid-template-columns: repeat(2, 1fr);
    }

    .wgl-cse-filters {
        flex-direction: column;
    }

    .wgl-cse-filters__select {
        width: 100%;
    }
}

.hide-on-mobile,
.hide-on-tablet,
.hide-on-desktop,
.uag-hide-tab,
.uag-hide-mob,
.uag-hide-desktop{
    display: none;
}

@media (max-width: 576px) {
    .hide-on-desktop,
    .uag-hide-desktop{
        display: block;
    }
}

@media (min-width: 576px) {
    
    .hide-on-mobile,
    .hide-on-tablet,
    .uag-hide-tab,
    .uag-hide-mob{
        display: block;
    }
}

.wp-block-button__link{
    font-size: 14px;
    line-height: 24px;
    padding: 7px 20px;
    overflow: hidden;
    transition: all 400ms ease-in-out 0s;
    -webkit-transition: all 400ms ease-in-out 0s;
    -moz-transition: all 400ms ease-in-out 0s;
    -o-transition: all 400ms ease-in-out 0s;
    -ms-transition: all 400ms ease-in-out 0s;
    z-index: 1;
    position: relative;
}

.wp-block-buttons{
    display: flex;
    justify-content: center;
}