/* ═══════════════════════════════════════════════════════════════════════════
   MeowChip Related — Widget "Pour aller plus loin"
   Palette : #FB7258 #8B3A21 #171927 #f9f7ef #8a9a5b #647687
   ═══════════════════════════════════════════════════════════════════════════ */

.mcrel-wrapper {
    margin: 2.5rem 0;
    padding: 1.5rem;
    background: #f9f7ef;
    border: 2px solid #8a9a5b;
    border-radius: 8px;
}

.mcrel-heading {
    font-family: Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #8B3A21;
    margin: 0 0 1.25rem 0;
    padding-bottom: .6rem;
    border-bottom: 1px solid #e7e4d6;
}

/* ── Carrousel ───────────────────────────────────────────────────────────── */
.mcrel-carousel {
    position: relative;
    overflow: hidden;
}

.mcrel-track {
    display: flex;
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    gap: 0;
}

.mcrel-card {
    flex: 0 0 100%;
    min-width: 0;
}

.mcrel-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
    border: 1px solid #e7e4d6;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
}

.mcrel-card-link:hover {
    box-shadow: 0 6px 24px rgba(23,25,39,.12);
    transform: translateY(-2px);
}

/* ── Thumbnail ───────────────────────────────────────────────────────────── */
.mcrel-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #DFDFE2;
}

.mcrel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.mcrel-card-link:hover .mcrel-thumb img {
    transform: scale(1.03);
}

.mcrel-thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #8a9a5b;
}

/* ── Corps de carte ──────────────────────────────────────────────────────── */
.mcrel-card-body {
    padding: 1rem 1.1rem 1rem;
    background: #f9f7ef;
}

.mcrel-card-title {
    font-family: Georgia, serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #FB7258;
    margin: 0 0 .5rem 0;
    line-height: 1.35;
}

.mcrel-card-link:hover .mcrel-card-title {
    color: #8B3A21;
}

.mcrel-card-excerpt {
    font-size: .875rem;
    color: #171927;
    line-height: 1.55;
    margin: 0 0 .75rem 0;
}

/* ── Bouton "Lire le parchemin" ──────────────────────────────────────────── */
.mcrel-card-btn {
    display: inline-block;
    background: #FB7258;
    color: #ffffff;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .04em;
    padding: .35em .85em;
    border-radius: 4px;
    transition: background .2s ease;
    margin-bottom: .65rem;
}

.mcrel-card-link:hover .mcrel-card-btn {
    background: #8B3A21;
}

/* ── Méta (date, catégorie) ──────────────────────────────────────────────── */
.mcrel-card-meta {
    font-size: .75rem;
    color: #647687;
    margin-bottom: .35rem;
}

.mcrel-tags {
    font-size: .72rem;
    color: #647687;
    line-height: 1.4;
}

/* ── Navigation flèches ─────────────────────────────────────────────────── */
.mcrel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(139,58,33,.85);
    color: #f9f7ef;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    padding: 0;
}

.mcrel-nav:hover { background: #8B3A21; }
.mcrel-nav--prev { left: 6px; }
.mcrel-nav--next { right: 6px; }
.mcrel-nav[disabled] { opacity: .35; cursor: default; }

/* ── Points de navigation ────────────────────────────────────────────────── */
.mcrel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: .75rem;
}

.mcrel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e7e4d6;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .2s;
}

.mcrel-dot.is-active { background: #8B3A21; }

/* ── Script carrousel inline ─────────────────────────────────────────────── */

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tablette (≤ 768px) ─────────────────────────────────────────────────── */
@media ( max-width: 768px ) {

    .mcrel-wrapper {
        padding: 1.1rem;
        margin: 2rem 0;
    }

    .mcrel-heading {
        font-size: 1.15rem;
        margin-bottom: 1rem;
    }

    .mcrel-card-title {
        font-size: .95rem;
    }

    .mcrel-card-body {
        padding: .85rem .9rem .85rem;
    }

    .mcrel-card-excerpt {
        font-size: .82rem;
    }

    .mcrel-nav {
        width: 28px;
        height: 28px;
        font-size: 1.2rem;
    }

    .mcrel-nav--prev { left: 4px; }
    .mcrel-nav--next { right: 4px; }
}

/* ── Mobile (≤ 480px) ───────────────────────────────────────────────────── */
@media ( max-width: 480px ) {

    .mcrel-wrapper {
        padding: .85rem .75rem;
        border-radius: 6px;
    }

    .mcrel-heading {
        font-size: 1.05rem;
        margin-bottom: .85rem;
    }

    /* Image moins haute sur petit écran */
    .mcrel-thumb {
        aspect-ratio: 16/10;
    }

    .mcrel-card-body {
        padding: .75rem .8rem .75rem;
    }

    .mcrel-card-title {
        font-size: .9rem;
        line-height: 1.3;
    }

    .mcrel-card-excerpt {
        font-size: .8rem;
        /* Limiter à 3 lignes sur mobile */
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .mcrel-card-btn {
        font-size: .73rem;
        padding: .3em .7em;
    }

    .mcrel-card-meta {
        font-size: .7rem;
    }

    .mcrel-tags {
        font-size: .68rem;
        /* Limiter à 2 lignes */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Flèches plus petites et mieux positionnées */
    .mcrel-nav {
        width: 26px;
        height: 26px;
        font-size: 1.1rem;
        /* Semi-transparentes pour ne pas cacher le contenu */
        background: rgba(139,58,33,.7);
    }

    .mcrel-nav--prev { left: 2px; }
    .mcrel-nav--next { right: 2px; }

    /* Points de nav légèrement plus petits */
    .mcrel-dot {
        width: 7px;
        height: 7px;
    }
}

/* ── Très petit écran (≤ 360px) ─────────────────────────────────────────── */
@media ( max-width: 360px ) {

    .mcrel-wrapper {
        padding: .7rem .6rem;
    }

    .mcrel-card-title {
        font-size: .85rem;
    }

    .mcrel-nav {
        width: 22px;
        height: 22px;
        font-size: 1rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   WIDGET PRODUITS SIDEBAR — [mcrel_products]
   ═══════════════════════════════════════════════════════════════════════════ */

.mcrel-products-widget {
    margin-bottom: 1.5rem;
}

.mcrel-p-heading {
    font-family: Georgia, serif;
    font-size: .95rem;
    font-weight: 700;
    color: #f9f7ef;
    background: #8B3A21;
    margin: 0 0 0 0;
    padding: .55rem 1rem;
    border-radius: 6px 6px 0 0;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.mcrel-p-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 2px solid #8a9a5b;
    border-top: none;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
    background: #f9f7ef;
}

/* ── Card produit ────────────────────────────────────────────────────────── */
.mcrel-p-card {
    border-bottom: 1px solid #e7e4d6;
}
.mcrel-p-card:last-child {
    border-bottom: none;
}

.mcrel-p-link {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: .7rem .8rem;
    text-decoration: none;
    color: inherit;
    transition: background .18s ease;
}

.mcrel-p-link:hover {
    background: #fff;
}

/* ── Thumbnail ───────────────────────────────────────────────────────────── */
.mcrel-p-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    background: #DFDFE2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mcrel-p-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}

.mcrel-p-link:hover .mcrel-p-thumb img {
    transform: scale(1.06);
}

.mcrel-p-thumb--placeholder {
    font-size: 1.5rem;
    color: #8a9a5b;
}

/* ── Corps ───────────────────────────────────────────────────────────────── */
.mcrel-p-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mcrel-p-name {
    font-family: Georgia, serif;
    font-size: .8rem;
    font-weight: 700;
    color: #171927;
    margin: 0;
    line-height: 1.3;
    /* Limiter à 2 lignes */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .18s;
}

.mcrel-p-link:hover .mcrel-p-name {
    color: #8B3A21;
}

.mcrel-p-price {
    font-size: .78rem;
    color: #647687;
    line-height: 1;
}

.mcrel-p-price ins {
    text-decoration: none;
    font-weight: 600;
    color: #8B3A21;
}

.mcrel-p-price del {
    color: #DFDFE2;
    font-size: .72rem;
}

/* ── Bouton ──────────────────────────────────────────────────────────────── */
.mcrel-p-btn {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: #FB7258;
    transition: color .18s;
    margin-top: 1px;
}

.mcrel-p-link:hover .mcrel-p-btn {
    color: #8B3A21;
}

/* ── Responsive sidebar ──────────────────────────────────────────────────── */
@media ( max-width: 768px ) {
    .mcrel-p-thumb {
        width: 52px;
        height: 52px;
    }
    .mcrel-p-name {
        font-size: .78rem;
    }
}


/* ── Largeur sidebar ─────────────────────────────────────────────────────── */
.mcrel-products-widget {
    max-width: 360px;
    width: 100%;
    margin: 0 auto;
}
