body {
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-size: var(--bs-body-font-size);
    font-weight: var(--bs-body-font-weight);
    line-height: var(--bs-body-line-height);
    background-color: #bae4ff;
    background-image: url("../images/policeCarLSPD.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    margin: 0;
    padding: 0;

    /* Centrage automatique horizontal et vertical */
    display: flex;
    justify-content: center; /* Centre horizontalement */
    align-items: center; /* Centre verticalement */
    min-height: 100vh; /* Assure que le contenu ne dépasse pas */
    overflow-y: auto; /* Permet de scroller si nécessaire */
}

.main {
    position: relative; /* Changement de absolute à relative pour éviter qu'il dépasse */
    background-color: rgba(255, 255, 255, 0.75);
    border-radius: 15px;
    box-shadow: 0 0 20px rgb(81, 81, 81);
    padding: 40px;
    max-width: 90%;
    width: 500px; /* Limite la largeur pour éviter de dépasser l'écran */
    text-align: center;
    margin-top: 20px; /* Ajoute une marge pour éviter que ça touche le haut */
}

.main img {
    display: block;
    margin: 0 auto 3vh auto;
    width: 50%;
    height: auto;
}

.main h2, .main h3 {
    font-size: clamp(1.5rem, 5vw, 2rem);
}

.main p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: #555;
    font-weight: bold;
}

.main .btnCenter {
    text-align: center;
}

label {
    display: block;
    margin-bottom: 10px;
    color: #555;
    font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="password"],
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

/* Suppression de la marge négative excessive */
body .navbar {
    margin-top: 0;
}

/* Responsive */
@media (max-width: 600px) {
    .main {
        width: 90%;
        padding: 20px;
    }

    .main h2, .main h3 {
        font-size: 5vw;
    }

    .main p {
        font-size: 4vw;
    }
}
