/* Titre de la page */
#location-info-title-text {
    margin-top: 50px; /* Increased margin-top for more space with the top */
    margin-left: 0%;
    font-weight: bold;
    font-size: 22px;
    position: relative;
    z-index: 1;
}

#location-info-title-background-image {
    margin-top: -30px;
    margin-left: 7%;
    z-index: 2;
}

/* Titre de la section "Nos occasions du moment" */
.Home-location-title-text {
    margin-top: 50px; /* Increased margin-top for more space with the top */
    margin-left: 0%;
    font-weight: bold;
    font-size: 22px;
    position: relative;
    z-index: 1;
}

.Home-location-title-background-image {
    margin-top: -30px;
    margin-left: 7%;
    z-index: 2;
}

/* Bouton personnalisé */
.custom-button {
    background-color: #ffde59;
    color: #000;
    border: 1px solid #000;
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    outline: none;
    font-family: Arial, sans-serif;
}

.custom-button:hover {
    background-color: #000;
    border-color: #000;
    color: #ffde59;
}

/* Détails de la machine */
.machine-details {
    display: flex;
}

.machine-details img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 15px;
}

.machine-img-container {
    background-color: white;
    width: 470px;
    height: 470px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 15px;
    padding: 10px;
}

.machine-info {
    margin-left: 40px;
}

.machine-nom {
    font-weight: 600;
    font-size: 30px;
    margin-top: -15px;
}

.machine-nom-modele {
    font-weight: 300;
}

.machine-specifications {
    font-style: italic;
    font-size: 15px;
    color: #ffde59;
    margin-top: 20px;
}

.machine-prix p {
    font-size: 22px;
    font-weight: 300;
    color: red;
}

.machine-etoile {
    color: gold;
    font-size: 20px;
    margin-top: 5px;
}

.machine-text {
    color: black;
}

.machine-contact {
    margin-top: 210px;
    font-weight: bold;
}

.machine-pdf {
    margin-top: 20px;
    font-style: italic;
}

/* Titre des spécifications */
.specification-title-text {
    margin-top: 40px;
    margin-left: 0%;
    font-weight: bold;
    font-size: 22px;
    position: relative;
    z-index: 1;
}

.specification-title-background-image {
    margin-top: -30px;
    margin-left: 7%;
    z-index: 2;
}

/* Tableau des spécifications */
.machine-specifications-table {
    margin-top: 20px;
    border-radius: 15px;
}

.machine-specifications-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.machine-specifications-table table, .machine-specifications-table th, .machine-specifications-table td {
    border: 1px solid #ddd;
}

.machine-specifications-table th, .machine-specifications-table td {
    padding: 12px;
    text-align: left;
    font-family: Arial, sans-serif;
}

.machine-specifications-table th {
    background-color: #ffde59;
    color: black;
}

.machine-specifications-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.machine-specifications-table tr:hover {
    background-color: #ddd;
}

/* Section "Nos locations du moment" styles */
.Home-location {
    margin-top: 60px;
    margin-left: 0%;
}

.machines-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-left: 0%;
}

.machine-card {
    margin: 15px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: 0.3s;
    width: 280px;
    height: 470px;
    background-color: white;
    border: 1px solid #e6e6e6;
    overflow: hidden;
}

.machine-card img {
    width: 240px;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #e6e6e6;
    margin: 0 auto;
    border-radius: 15px;
}

.machine-card:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.machine-card .CategorieMachine {
    font-style: italic;
    font-size: 14px;
    color: #ffde59;
    margin-top: 10px;
}

.machine-card .NomMachine {
    font-weight: 500;
    font-size: 22px;
    margin-top: 10px;
}

.machine-card .ModeleMachine {
    font-size: 16px;
    font-weight: 300;
    margin-top: 5px;
}

.machine-card .PrixOccasion, .machine-card .PrixLocation {
    font-size: 19px;
    font-weight: 300;
    color: red;
    margin-top: 10px;
}

.machine-card .DescriptionEtatMachine {
    font-weight: 300;
    margin-top: 10px;
}

.machine-link {
    text-decoration: none;
    color: inherit;
}

.machine-link:hover {
    text-decoration: none;
}

/* Prevent horizontal overflow for the entire document */
html, body {
    overflow-x: hidden;
}

/* Ensure that all elements within the document do not exceed the viewport width */
* {
    max-width: 100%;
}

/* Styles pour le modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Media Query for Mobile Screens */
@media (max-width: 600px) {
    /* Titre de la page */
    #location-info-title-text {
        font-size: 16px; /* Reduced font size */
        margin-top: 30px; /* Adjusted for mobile */
        margin-left: 5%;
        text-align: center;
    }

    #location-info-title-background-image {
        margin-top: -20px;
        margin-left: 5%;
    }

    /* Titre de la section "Nos occasions du moment" */
    .Home-location-title-text {
        font-size: 16px; /* Reduced font size for mobile */
        margin-top: 30px; /* Adjusted margin for mobile */
        text-align: center;
    }

    .Home-location-title-background-image {
        margin-top: -20px;
        margin-left: 5%;
    }

    /* Machine Details Section */
    .machine-details {
        display: block;
        text-align: center;
    }

    .machine-img-container {
        width: 100%;
        height: auto;
        margin: 0 auto;
    }

    .machine-info {
        margin-left: 0;
        margin-top: 15px;
    }

    .machine-nom {
        font-size: 20px; /* Reduced font size */
        margin-top: 0;
    }

    .machine-nom-modele {
        font-size: 14px; /* Reduced font size */
    }

    .machine-specifications {
        font-size: 12px; /* Reduced font size */
    }

    .machine-prix p {
        font-size: 18px; /* Reduced font size */
    }

    .machine-etoile {
        font-size: 16px; /* Reduced font size */
    }

    .machine-contact {
        margin-top: 20px;
        font-weight: bold;
    }

    /* Machine Card in List */
    .machine-card {
        width: 100%;
        height: auto;
        padding: 15px;
        margin: 10px auto;
    }

    .machine-card img {
        width: 100%;
        height: auto;
    }

    .machine-card .CategorieMachine {
        font-size: 12px; /* Reduced font size */
    }

    .machine-card .NomMachine {
        font-size: 18px; /* Reduced font size */
    }

    .machine-card .ModeleMachine {
        font-size: 14px; /* Reduced font size */
    }

    .machine-card .PrixOccasion, .machine-card .PrixLocation {
        font-size: 16px; /* Reduced font size */
    }

    .machine-card .DescriptionEtatMachine {
        font-size: 12px; /* Reduced font size */
    }

    /* Custom Button */
    .custom-button {
        padding: 8px 10px;
        font-size: 0.8rem; /* Reduced font size */
    }

    /* Specification Title */
    .specification-title-text {
        font-size: 18px; /* Reduced font size */
        margin-top: 30px;
    }

    .specification-title-background-image {
        margin-top: -20px;
        margin-left: 5%;
    }

    /* Specifications Table */
    .machine-specifications-table {
        margin-top: 15px;
    }

    .machine-specifications-table table {
        font-size: 12px; /* Reduced font size */
    }
}