.top-title{
    width:55%;
    padding:50px;
}



/* Container centering and title spacing */
.machine-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.machine-container .section-title {
    max-width: 1200px;
    margin: 0px 10% 5px;
    padding-left: 8px;
    font-size: 1.25rem;
    color: #1A202C;
}



/* Ordinateur */
@media screen and (min-width : 900px){

    .voir-plus{
        background: #003F87;
        background: linear-gradient(157deg,rgba(0, 63, 135, 1) 0%, rgba(0, 86, 179, 1) 100%);
        padding:25px;
        color:white;
        font-weight:bold;
        border-radius:20px;
        border:none;
        width:20%;
        margin:10px 40%;
        transition:transform 0.2s ease, background 0.5s ease-in-out, filter 0.2s ease;
    }

    .voir-plus:hover{
        cursor:pointer;
        transform: scale(1.05);
        background: linear-gradient(157deg,rgba(0, 86, 179, 1) 0%, rgba(0, 63, 135, 1) 100%);
        filter:brightness(1.2)
    }

    .machine-holder {
        display: grid;
        grid-template-columns: 1fr 1.2fr; /* Colonne de gauche plus étroite que celle de droite */
        gap: 30px;
        max-width: 1200px;
        margin: 50px auto;
        padding: 20px;
    }

    /* Colonne de gauche (Contient les deux blocs blancs) */
    .first-column {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .top-part, .bottom-part {
        background: white;
        padding: 30px;
        border-radius: 15px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
        position: relative;
    }
    
    /* La bordure bleue décorative à droite du premier bloc */
    .top-part::after {
        content: "";
        position: absolute;
        right: 1px;   
        top: 1.2%;
        height: 97.6%;
        width: 4px;
        background: #003F87;
        border-radius: 0px 4px 4px 0px;
    }

    .top-part h2, .bottom-part h2 {
        font-size: 1.4rem;
        margin-bottom: 15px;
        color: #1a1a1a;
    }

    .top-part p, .bottom-part p {
        font-size: 0.95rem;
        color: #666;
        line-height: 1.5;
        margin-bottom: 20px;
    }

    /* Listes d'infos (RPM, Postes) */
    .info1, .info2, .info3, .info4 {
        display: flex;
        justify-content: space-between;
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
        font-size: 0.9rem;
    }

    .info1 p:last-child, .info2 p:last-child, .info3 p:last-child, .info4 p:last-child {
        font-weight: bold;
        color: #333;
    }

    /* Colonne de droite (Le bloc principal avec l'image) */
    .second-column {
        background: white;
        border-radius: 15px;
        padding: 40px;
        display: flex;
        flex-direction: column;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    }

    .second-column img {
        max-width:350px;
        max-height:230px;
        margin-left: -5%;
        margin-bottom: 20px;
        object-fit: contain;
    }

    /* Invert layout for fraisage machines: image on right becomes image on left (and vice versa) */
    .fraisage-title ~ .machine-holder {
        grid-template-columns: 1.2fr 1fr; /* swap column widths */
    }

    .fraisage-title ~ .machine-holder .second-column img {
        margin-left: 0; /* reset left negative offset */
        margin-right: -5%; /* push image slightly outside on the right side */
    }

    .main-info-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
    }

    .main-info-top h4 {
        font-size: 1.5rem;
        font-weight: 800;
        margin: 0;
    }

    .date-holder {
        background: #002D62;
        color: white;
        padding: 5px 15px;
        border-radius: 5px;
        font-size: 0.85rem;
        font-weight: bold;
    }

    .second-column p {
        color: #444;
        font-size: 1rem;
        margin-bottom: 30px;
    }

    /* Les badges de stats en bas */
    .stats-holder {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .first-stat, .second-stat, .third-stat {
        background: #DEE7F2; /* Bleu très clair */
        padding: 15px;
        border-radius: 8px;
    }

    .stats-holder h5 {
        margin: 0 0 5px 0;
        font-size: 0.75rem;
        color: #003F87;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .stats-holder span {
        font-weight: bold;
        font-size: 0.95rem;
        color: #002D62;
    }
}




/* --- Styles spécifiques Mobile (pc-hidden) --- */

@media screen and (max-width: 899px) {


    .info1, .info2, .info3, .info4 {
        display: flex;
        justify-content: space-between;
        padding: 3px 0;
        border-bottom: 1px solid #f0f0f0;
        font-size: 0.9rem;
    }

    .info1 p:last-child, .info2 p:last-child, .info3 p:last-child, .info4 p:last-child {
        font-weight: bold;
        color: #333;
    }

    .voir-plus{
        background: #003F87;
        background: linear-gradient(157deg,rgba(0, 63, 135, 1) 0%, rgba(0, 86, 179, 1) 100%);
        padding:25px;
        color:white;
        font-weight:bold;
        border-radius:20px;
        border:none;
        width:40%;
        margin:10px 30%;
        transition:transform 0.2s ease, background 0.5s ease-in-out, filter 0.2s ease;
    }

    .voir-plus:hover{
        cursor:pointer;
        transform: scale(1.05);
        background: linear-gradient(157deg,rgba(0, 86, 179, 1) 0%, rgba(0, 63, 135, 1) 100%);
        filter:brightness(1.2)
    }


    body {
        background-color: #F4F7FA;
        padding-bottom: 80px; /* Pour ne pas cacher le contenu derrière la nav noire */
    }

    /* Filtres */
    .mobile-filters {
        display: flex;
        gap: 8px;
        padding: 10px;
        justify-content: center;
    }

    .mobile-filters button {
        border: none;
        padding: 8px 15px;
        border-radius: 5px;
        background: #E2E8F0;
        color: #4A5568;
        font-weight: 500;
    }

    .mobile-filters button.active {
        background: #003F87;
        color: white;
    }

    /* Carte Machine */
    .machine-holder-mobile {
        background: white;
        margin: 15px;
        border-radius: 12px;
        overflow: visible;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }

    .machine-card-image {
        position: relative;
        padding: 20px;
        display: flex;
        justify-content: center;
        background: #fff;
    }

    .badge-entree {
        position: absolute;
        top: 10px;
        left: 10px;
        background: #2D3748;
        color: white;
        font-size: 10px;
        padding: 4px 8px;
        border-radius: 3px;
    }

    .machine-card-image img {
        max-width: 90%;
        height: auto;
    }

    .machine-card-content {
        padding: 20px;
        border-top: 1px solid #F0F0F0;
    }

    .machine-card-header h2 {
        font-size: 1.2rem;
        font-weight: 800;
        margin: 0;
        color: #1A202C;
    }

    .machine-subtitle {
        font-size: 0.75rem;
        color: #3182CE;
        font-weight: bold;
        text-transform: uppercase;
    }

    /* Stats Grille */
    .machine-card-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin: 15px 0;
    }

    .mobile-stat-box {
        background: #f5faff;
        padding: 10px;
        border-radius: 6px;
    }

    .mobile-stat-box.highlight {
        background: #f5faff;
    }

    .stat-label {
        display: block;
        font-size: 0.65rem;
        color: #000000;
    }

    .stat-value {
        font-size: 0.85rem;
        font-weight: bold;
        color: #2C5282;
    }

    /* Footer Mobile */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #000;
        display: flex;
        justify-content: space-around;
        padding: 10px 0;
        z-index: 998;
    }

    .nav-item {
        color: #718096;
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 0.65rem;
    }

    .nav-item.active {
        color: white;
    }

    /* Pagination */
    .mobile-pagination {
        text-align: center;
        padding: 20px;
    }

    .btn-more {
        background: #0056B3;
        color: white;
        border: none;
        padding: 12px 40px;
        border-radius: 8px;
        width: 80%;
        font-weight: bold;
    }

    .machine-holder-mobile a[href*="/modif_machine"] {
        width: 56px;
        height: 56px;
        top: 12px;
        right: 12px;
    }

    .machine-holder-mobile a[href*="/modif_machine"] img {
        width: 32px;
        height: 32px;
    }
}


/* Modifier icon (match style from realisations) */
.machine-holder, .machine-holder-mobile {
    position: relative;
    overflow: visible;
}

.machine-holder a[href*="/modif_machine"],
.machine-holder-mobile a[href*="/modif_machine"] {
    position: absolute;
    z-index: 998;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    transform: translate(50%, -50%);
    top: 16px;
    right: 16px;
    background: transparent;
}

.machine-holder a[href*="/modif_machine"]:hover,
.machine-holder-mobile a[href*="/modif_machine"]:hover {
    background: rgba(255,255,255,1);
    transform: translate(50%, -50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.machine-holder a[href*="/modif_machine"] img,
.machine-holder-mobile a[href*="/modif_machine"] img {
    width: 54px;
    height: 54px;
    opacity: 0.8;
    display: block;
}

/* Container des filtres */
.filter-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 40px 0;
    flex-wrap: wrap;
    background-color:#f2f4f6;
    width:94%;
    padding: 20px;
}

/* Style des boutons calqué sur ta page produit */
.filter-btn {
    border: none;
    padding: 10px 24px;
    background-color: #EDF2F7; /* Gris très clair */
    color: #4A5568; /* Gris texte */
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

/* Effet au survol */
.filter-btn:hover {
    background-color: #E2E8F0;
}

/* État actif (Bleu MECA-CN) */
.filter-btn.active {
    background-color: #003F87; /* Le bleu de ton logo */
    color: white;
}

/* Masquage des groupes lors du tri */
.hidden {
    display: none !important;
}



.title-holder{
    display:flex;
    flex-direction:column;
    gap:15px;
    justify-content:center;
    justify-content:left;
    margin-bottom:75px;
    margin-top:100px !important;
}

.title-holder p{
    color:#595959;
    font-size:1rem;
    margin-left:125px;
    width:60%;
}

.title-top-part{
    display:flex;
    gap:15px;
    align-items:center;
    justify-content:left;
    margin-top:50px !important
}

.separateur{
    width:60%;
    height:1.5px;
    background-color:#003983;
}

.fraisage-group{
    
    margin-bottom:50px !important;
}