/* MSC — Recherche d'articles de blog en direct
   Charte : noir / blanc / rouge MSC (#d4001a) */

.msc-blog-search-wrap {
    margin: 0 0 2.5rem;
}

.msc-blog-search-form {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 560px;
}

.msc-blog-search-icon {
    position: absolute;
    left: 1.1rem;
    color: #111;
    pointer-events: none;
}

.msc-blog-search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 3rem;
    font-size: 1rem;
    line-height: 1.4;
    color: #111;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    transition: border-color .2s ease, box-shadow .2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.msc-blog-search-input::placeholder {
    color: #9a9a9a;
}

.msc-blog-search-input:focus {
    outline: none;
    border-color: #d4001a;
    box-shadow: 0 0 0 3px rgba(212, 0, 26, .12);
}

/* masque la croix native du champ search */
.msc-blog-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.msc-blog-search-clear {
    position: absolute;
    right: .9rem;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    line-height: 1;
    color: #fff;
    background: #111;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background .2s ease;
}

.msc-blog-search-clear:hover {
    background: #d4001a;
}

.msc-blog-search-status {
    margin: 1rem 0 0;
    font-size: .92rem;
    color: #666;
}

/* Conteneur de résultats : on s'appuie ENTIÈREMENT sur le markup natif Divi
   (.et_pb_blog_grid > .et_pb_salvattore_content > .column.size-1of3 > .et_pb_post).
   salvattore crée les colonnes et le CSS natif Divi gère largeurs, gouttières,
   typographie, image, etc. — rendu strictement identique au module Blog.
   On ne fait qu'ajouter une marge haute quand les résultats sont visibles. */
.msc-blog-search-results:not([hidden]) {
    margin-top: 1.5rem;
}

/* Repli si salvattore n'est pas disponible (page sans module Blog Divi) :
   les articles restent à plat -> grille CSS simple. Inactif dès que salvattore
   a créé les .column (ce qui est le cas normal sur la page blog). */
.msc-bs-grid:not(:has(.column)) {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 30px;
}

.msc-bs-grid:not(:has(.column)) .et_pb_post {
    float: none;
    width: auto;
    margin: 0 0 30px;
}

@media (max-width: 980px) {
    .msc-blog-search-form {
        max-width: 100%;
    }
    .msc-bs-grid:not(:has(.column)) {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .msc-bs-grid:not(:has(.column)) {
        grid-template-columns: 1fr;
    }
}
