/* ================================================================
   Promasterweb — Styles spécifiques au site
   Fichier à placer dans le dossier du thème enfant.
   Chargé via functions.php (voir bloc "BLOG" dans le thème enfant).
   NE PAS inclure dans le plugin pmw-blog-grid.
   ================================================================ */

/* ── Variables de marque ─────────────────────────────────────── */

:root {
    --pmw-accent:       #1fbaa5;
    --pmw-accent-hover: rgba(31,186,165,.9);
}

/* ── En-tête blog (couleurs Promasterweb) ────────────────────── */

.pmw-blog-header {
    background-color: #12416f;
    color: #fff;
}

.pmw-blog-header::after {
    content: "";
    position: absolute;
    background-image: url("https://promasterweb-hero.b-cdn.net/images/svg/ss.svg");
    background-size: contain;
    background-repeat: no-repeat;
    width: 590px;
    height: 690px;
    top: 65%;
    left: -26%;
    transform: translateY(-50%);
    pointer-events: none;
    overflow: hidden;
}

.intro-article {
    color: #fff;
    max-width: 890px;
    margin: auto;
}

/* ── Layout global ───────────────────────────────────────────── */

html {
    scroll-padding-top: 170px;
    scroll-behavior: smooth;
}

.pmw-article section[id],
.pmw-article h2[id],
.pmw-article h3[id] {
    scroll-margin-top: 170px;
}

/* ── Zone de contenu principal ───────────────────────────────── */

.single-post #primary,
#primary {
    background-color: aliceblue;
    padding: 0;
}

/* ── Sidebar droite ──────────────────────────────────────────── */

.inside-right-sidebar {
    position: sticky !important;
    top: 130px;
    padding-left: 20px;
}

.is-right-sidebar {
    background: linear-gradient(150deg, #2d7eca5e 0%, #19918b96 100%) !important;
    padding-bottom: 50px !important;
}

#right-sidebar .wp-block-categories-list,
#right-sidebar .wp-block-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

#right-sidebar .wp-block-categories-list li,
#right-sidebar .wp-block-categories li {
    margin: 0;
}

#right-sidebar .wp-block-categories-list a,
#right-sidebar .wp-block-categories a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 4px;
    background: #f3f6fa;
    color: #1f2a44;
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid #e3e8f0;
    transition: all .2s ease;
}

#right-sidebar .wp-block-categories a:hover,
#right-sidebar .wp-block-categories .current-cat a {
    background: #20b9a4bd;
    color: #fff;
    border-color: #20b9a4bd;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(31,186,165,.25);
}

@media (max-width: 768px) {
    #right-sidebar .wp-block-categories-list a {
        min-width: 100%;
    }
}

#right-sidebar .wp-block-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#right-sidebar .wp-block-tag-cloud a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    padding: 9px 14px;
    background: #f3f6fa;
    color: #1f2a44;
    font-size: 13px !important;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid #e3e8f0;
    transition: all .2s ease;
}

#right-sidebar .wp-block-tag-cloud a:hover {
    background: #20b9a4bd;
    color: #fff;
    border-color: #20b9a4bd;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(31,186,165,.25);
}

#right-sidebar a.btnb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    padding: 4px 14px;
    background: #20b9a4bd;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    border-color: #20b9a4bd;
    box-shadow: 0 6px 20px rgba(31,186,165,.25);
    margin-bottom: 10px;
    transition: all .2s ease;
}

#right-sidebar a.btnb::before {
    content: "✓";
    display: inline-block;
    margin-right: 8px;
    font-weight: 800;
}

#right-sidebar a.btnb:hover {
    background: #20b9a4bd;
    color: #fff;
    border-color: #20b9a4bd;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(31,186,165,.25);
}

/* ── Article single ──────────────────────────────────────────── */

.single-post .pmw-featured-wrapper {
    position: relative;
}

.single-post .pmw-featured-meta {
    position: absolute;
    left: 0;
    right: unset;
    background: rgba(0,0,0,.55);
    color: #fff;
    padding: 4px 15px;
    border-radius: 0;
    font-size: 14px;
    backdrop-filter: blur(6px);
}

.single-post .pmw-featured-meta p {
    margin-bottom: 5px;
}

/* ── Éléments divers sidebar ─────────────────────────────────── */

.sb {
    margin-bottom: 1rem;
    line-height: 1.2;
}

.tag-blog {
    text-align: left;
}

@media (min-width: 1200px) {
    .tag-blog { margin-top: 2rem; }
}

/* ── Boutons GenerateBlocks (actif / désactif) ───────────────── */

.wp-block {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    font-weight: 600;
    line-height: 1;
    border-radius: 999px;
    text-decoration: none;
    transition: background-color .25s ease, color .25s ease, transform .25s ease, box-shadow .25s ease;
    color: #f9f9f9 !important;
}

#actif.wp-block {
    font-size: 13.5px;
    margin-bottom: 10px;
    background: #1fbaa5;
}

#actif.wp-block:hover {
    background: #20b9a4bd;
}

#desactif.wp-block {
    font-size: 12.5px;
    margin-top: 45px;
    background: #1c2f4bd9;
}

#desactif.wp-block:hover {
    background: #1f2a44;
}

@media (max-width: 768px) {
    .wp-block { font-size: 13px; padding: 9px 14px; }
}

/* ── Responsive layout général ───────────────────────────────── */

@media (min-width: 1101px) {
    .info-service::before {
        left: 49.9% !important;
        bottom: 80% !important;
        max-width: 100vw !important;
    }
}

@media (max-width: 1199px) {
    .sb {
        margin: auto;
        text-align: center;
        padding-top: 25px;
    }

    .site-content,
    .content-area,
    .site-main {
        display: flex;
        flex-direction: column;
    }

    .is-right-sidebar {
        order: -1;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
    }

    .inside-right-sidebar {
        position: relative !important;
        top: auto !important;
        padding-left: 0;
    }

    #primary {
        padding: 0;
        width: 100% !important;
        max-width: 100% !important;
    }

    #right-sidebar {
        display: block;
    }

    #right-sidebar .inside-right-sidebar {
        display: flex;
        flex-wrap: wrap;
        gap: 24px;
    }

    #right-sidebar .gb-element-b5802220 {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        width: fit-content;
        max-width: 100%;
        padding-top: 0;
    }

    #right-sidebar .categorie-blog,
    #right-sidebar .tag-blog {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
    }
}

@media (min-width: 799px) and (max-width: 1198px) {
    #right-sidebar .gb-element-b5802220 {
        gap: 60px;
        padding-top: 35px;
    }
}

@media (max-width: 798px) {
    #right-sidebar .gb-element-b5802220 {
        margin-left: auto;
        margin-right: auto;
        width: fit-content;
        max-width: 100%;
        gap: 65px;
        padding-top: 0;
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
    .is-right-sidebar { order: 2; }
}

@media (max-width: 768px) {
    .single-post #primary { padding: 0; }
}
