/* ============================================
   MACHINES MULTIBOISSONS - Styles Front-end
   ============================================ */

/* --- Conteneur principal --- */
.mm-comparateur {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.mm-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.mm-subtitle {
    font-size: 1.1rem;
    color: #666;
    text-align: center;
    margin-bottom: 2rem;
}

/* --- Filtre --- */
.mm-filter {
    margin-bottom: 2rem;
    text-align: center;
}

.mm-filter label {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
    color: #333;
}

.mm-filter-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.mm-filter-btn {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    padding: 10px 22px;
    font-size: 0.9rem;
    color: #555;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-weight: 600;
    outline: none;
    font-family: inherit;
}

.mm-filter-btn:hover {
    border-color: var(--mm-primary-color, #78a22f);
    color: var(--mm-primary-color, #78a22f);
    background: #f8fbff;
    transform: translateY(-2px);
}

.mm-filter-btn.active {
    background: var(--mm-primary-color, #78a22f);
    border-color: var(--mm-primary-color, #78a22f);
    color: #fff;
    box-shadow: 0 4px 12px rgba(120, 162, 47, 0.25);
    transform: translateY(-2px);
}

/* --- Listing cartes --- */
/* --- Listing cartes --- */
.mm-listing {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 30px;
    row-gap: 90px;
    margin-bottom: 3rem;
    padding-top: 60px;
    /* Espace pour les images qui débordent */
}

.mm-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    overflow: visible;
    /* Important pour laisser dépasser l'image */
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.mm-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

.mm-card.mm-hidden {
    display: none;
}

.mm-card-image {
    width: 160px;
    height: 160px;
    margin: -50px auto 20px auto;
    /* Décalage vers le haut réduit */
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    /* Effet de relief */
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.mm-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.mm-card:hover .mm-card-image img {
    transform: scale(1.05);
}

.mm-card-content {
    padding: 0 20px 20px 20px;
    text-align: center;
    /* Centrage des infos */
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mm-card-lait {
    position: absolute;
    top: 0;
    left: 0;
    width: 80px;
    height: 0;
    box-sizing: content-box;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 20px solid #f7b00b;
    border-top: 20px solid transparent;
    transform-origin: top left;
    transform: rotate(-45deg) translate(-60px, 20px);
}

.mm-card-lait span {
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}


.mm-card-title {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: #333;
    font-weight: 700;
}

.mm-card-title a {
    color: #333;
    text-decoration: none !important;
}

.mm-card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    flex: 1;
}

.mm-card-features li {
    padding: 6px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.9rem;
    color: #555;
}

.mm-card-features li:last-child {
    border-bottom: none;
}

.mm-card-features li strong {
    display: inline;
    color: #333;
    margin-right: 5px;
    margin-bottom: 0;
    font-weight: 600;
}

.mm-card-prices {
    margin-bottom: 1rem;
    background: #f9f9f9;
    padding: 12px;
    border-radius: 8px;
}

.mm-price-location,
.mm-price-achat {
    margin: 0.3rem 0;
    line-height: 1.3;
}

.mm-price-mention {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mm-card-cta {
    display: inline-block;
    padding: 10px 25px;
    background: var(--mm-primary-color, #78a22f);
    color: #fff;
    text-decoration: none !important;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(120, 162, 47, 0.2);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.mm-card-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(120, 162, 47, 0.3);
    background: var(--mm-secondary-color, #648a24);
    color: #fff;
}

/* --- Tableau comparatif --- */
.mm-table-wrapper {
    margin-top: 3rem;
}

.mm-table-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.mm-table-responsive {
    overflow-x: auto;
    padding: 10px 2px;
    /* Espace pour l'ombre */
}

.mm-table {
    width: 100%;
    border-spacing: 0;
    border-collapse: separate;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    /* Ombrage du tableau */
    border: 1px solid #e0e0e0;
}

.mm-table thead {
    background: #f7f7f7;
}

.mm-table th {
    padding: 15px 15px;
    text-align: center;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
    color: #333;
}

.mm-table th:not(:last-child),
.mm-table td:not(:last-child) {
    border-right: 1px solid #ddd;
}

.mm-table th:last-child,
.mm-table td:last-child {
    border-right: none;
}


/* Alignement à gauche pour la première colonne (Nom) */
.mm-table th:first-child,
.mm-table td:first-child {
    text-align: left;
}



.mm-table td {
    padding: 15px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    text-align: center;
    /* Par défaut centré pour les données techniques */
}

/* Alignement à droite pour les colonnes prix (7 et 8) */
.mm-table td:nth-child(7),
.mm-table td:nth-child(8) {
    text-align: right;
    white-space: nowrap;
    /* Évite les retours à la ligne des prix */
}

.mm-table tbody tr:last-child td {
    border-bottom: none;
    /* Pas de bordure en bas pour la dernière ligne */
}

.mm-table tbody tr.mm-hidden {
    display: none;
}

.mm-table tbody tr:hover {
    background: #f9f9f9;
}

.mm-table-link {
    text-decoration: none !important;
    font-weight: 600;
}


/* --- Page Single Machine --- */
.mm-single-hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    margin-bottom: 4rem;
    align-items: start;
}

.mm-hero-details {
    background: transparent;
    padding: 0;
    box-shadow: none;
    border: none;
}

/* Modif: plus de header séparé, c'est intégré */
.mm-single-header {
    display: none;
}

/* --- Bloc Détails --- */
.mm-details-container {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.mm-single-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: #000;
    line-height: 1.1;
    margin-bottom: 25px;
    margin-top: 15px;
    text-transform: uppercase;
}

/* Prix */
.mm-single-prices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.mm-price-main {
    font-size: 1.3rem;
    color: #78a22f;
    /* Vert charte */
    font-weight: 700;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px;
}

.mm-price-value-main {
    font-size: 1.6rem;
    font-weight: 900;
}

.mm-price-suffix {
    font-size: 1rem;
    font-weight: 600;
}

.mm-price-secondary {
    font-size: 0.9rem;
    color: #999;
    font-weight: 400;
}

.mm-price-secondary strong {
    color: #777;
    font-weight: 600;
}

.mm-purchase-link-new {
    text-decoration: none;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    margin-left: 5px;
}

.mm-purchase-link-new:hover {
    text-decoration: underline;
}

/* Description */
.mm-single-description {
    line-height: 1.6;
    color: #333;
    font-size: 1rem;
    margin-bottom: 10px;
}

.mm-single-description p:not(:last-child) {
    padding: 0 0 5px 0;
    margin: 0;
}

.mm-single-description p:last-child {
    padding: 0;
    margin: 0;
}

/* Indicateurs (version inline) */
.mm-single-indicators-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 20px;
}

.mm-indicator-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mm-indicator-icon {
    font-size: 1.4rem;
    color: #333;
}

.mm-indicator-text {
    font-weight: 600;
    font-size: 1rem;
    color: #000;
}

/* Encart Promo Orange */
.mm-promo-box {
    background: #f1c37d;
    /* Orange charte */
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    color: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.mm-promo-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.mm-promo-check {
    color: #9c9c9c;
    font-size: 1.3rem;
}

.mm-promo-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #000;
    text-transform: none;
}

.mm-promo-content {
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 500;
}

/* CTA */
.mm-single-cta {
    margin-top: 15px;
}

.mm-cta-button {
    display: inline-block;
    padding: 14px 35px;
    background: var(--mm-primary-color, #9c9c9c);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(120, 162, 47, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mm-cta-button:hover {
    background: var(--mm-secondary-color, #868686);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(182, 182, 182, 0.3);
}

/* --- Galerie Single --- */
.mm-hero-gallery {
    position: sticky;
    top: 20px;
}

.mm-single-gallery-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mm-single-gallery {
    margin-bottom: 0;
}

.mm-gallery-main {
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #f0f0f0;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.mm-gallery-main img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    max-height: 500px;
    padding: 20px;
}

.mm-gallery-thumbs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.mm-gallery-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    opacity: 0.7;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.mm-gallery-thumb:hover,
.mm-gallery-thumb.active {
    opacity: 1;
    border-color: #8b8b8b;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* --- Spécifications techniques --- */
.mm-single-specifications {
    margin-top: 2rem;
}

.mm-single-specifications h2 {
    font-size: 1.8rem;
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.mm-specs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.mm-spec-section {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    height: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.mm-spec-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.mm-spec-section h3 {
    font-size: 1.15rem;
    margin-bottom: 1.2rem;
    color: #000;
    font-weight: 700;
    border-bottom: 1px solid #f5f5f5;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mm-spec-icon {
    font-size: 1.4rem;
}

.mm-spec-content {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

.mm-spec-content ul {
    margin: 0;
    padding-left: 18px;
}

/* --- Masquage des métas et titre standards WordPress --- */
.single-machine-multiboisson .entry-title,
.single-machine-multiboisson .page-title,
.single-machine-multiboisson .post-title,
.single-machine-multiboisson header.entry-header,
.single-machine-multiboisson .entry-meta,
.single-machine-multiboisson .byline,
.single-machine-multiboisson .posted-on,
.single-machine-multiboisson .cat-links,
.single-machine-multiboisson .tags-links {
    display: none !important;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .mm-listing {
        grid-template-columns: repeat(2, 1fr);
    }

    .mm-single-hero {
        display: flex;
        flex-direction: column-reverse;
        /* Détails en premier, galerie en second */
        gap: 30px;
    }

    .mm-hero-gallery {
        position: static;
        /* Désactive le sticky en tablette/mobile */
        top: auto;
    }

    .mm-specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mm-listing {
        grid-template-columns: 1fr;
    }

    .mm-single-hero {
        flex-direction: column-reverse;
        gap: 25px;
    }

    .mm-hero-gallery {
        position: static;
        top: auto;
    }

    .mm-gallery-main img {
        max-height: 350px;
        padding: 15px;
    }

    .mm-single-title {
        font-size: 1.6rem;
        margin-top: 0;
    }

    .mm-single-prices {
        flex-direction: column;
        gap: 10px;
    }

    .mm-price-main {
        font-size: 1.1rem;
    }

    .mm-price-value-main {
        font-size: 1.4rem;
    }

    .mm-single-indicators-inline {
        flex-direction: column;
        gap: 15px;
    }

    .mm-promo-box {
        padding: 20px;
    }

    .mm-specs-grid {
        grid-template-columns: 1fr;
    }

    .mm-cta-button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .mm-filter-select {
        min-width: 100%;
    }

    .mm-filter-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .mm-table {
        font-size: 0.85rem;
    }

    .mm-table th,
    .mm-table td {
        padding: 8px 5px;
    }

    .mm-gallery-thumbs {
        gap: 8px;
    }

    .mm-gallery-thumb {
        width: 60px;
        height: 60px;
    }
}