body {
    margin: 0;
    padding: 20px;
    font-family: Arial, sans-serif;
    background: url('./images/bg.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
    overflow-y: auto; 
    box-sizing: border-box;
}


/* Police pour le texte général */
body, input, select, textarea, button {
    font-family: "Corporate S", sans-serif;
}

form#carForm {
    background-color: white;
    padding: 30px 40px 40px 40px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: auto;
}

button#downloadExcel {
    background-color: #66b3ff;
    border: none;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    margin-bottom: 20px;
    align-self: stretch;
}

button#downloadExcel:hover {
    background-color: #4a90e2;
}

.form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.form-header img {
    height: 50px;
    width: auto;
}

.form-header h1 {
    flex-grow: 1;
    text-align: center;
    margin: 0;
    font-weight: 700;
    font-size: 1.8rem;
    color: #000000;
    user-select: none;
}

input,
select ,textarea{
    padding: 12px 15px;
    font-size: 1rem;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

#selectFake {
    padding: 12px 15px;
    font-size: 1rem;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.3s ease;
    width: 100%;
    max-width: 600px;
    cursor: pointer;
    user-select: none;
    box-sizing: border-box;
}

#selectFake:focus {
    outline: 3px solid #66b3ff;
    outline-offset: 2px;
}

input:focus,
select:focus,textarea:focus {
    border-color: #66b3ff;
    outline: none;
}

button[type="submit"] {
    background-color: #66b3ff;
    border: none;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: fit-content;
    align-self: flex-start;
    margin-top: 10px;
}

button[type="submit"]:hover {
    background-color: #4a90e2;
}

/* Popup voiture */
#carPopup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    z-index: 1000;
    max-width: 640px;
    width: 90%;
    box-sizing: border-box;
}

#carPopup h2 {
    text-align: center;
    margin-bottom: 20px;
}

#carPopup > div {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

#carPopup > div > div {
    width: 45%;
    box-sizing: border-box;
    text-align: center;
}

#carPopup img {
    width: 100%;
    cursor: pointer;
    border-radius: 6px;
    transition: transform 0.2s ease;
}

#carPopup img:hover,
#carPopup img:focus {
    transform: scale(1.05);
    outline: 2px solid #66b3ff;
}

#carPopup span {
    display: block;
    margin-top: 8px;
    font-weight: 600;
    color: #333;
}

#carPopup button {
    margin-top: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    padding: 8px 20px;
    border: none;
    background: #f44336;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}
#loadingOverlay {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.8);
  justify-content: center;
  align-items: center;
}

#loadingOverlay img {
  width: 120px;
  height: 120px;
  animation: spin 1.5s linear infinite;
}
@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}
/* Responsive */
@media (max-width: 600px) {
    form#carForm {
        padding: 20px;
    }

    .form-header img {
        height: 40px;
    }

    .form-header h1 {
        font-size: 1.4rem;
        font-family: "Corporate A", sans-serif;
    }

    button[type="submit"] {
        width: 100%;
        text-align: center;
        align-self: stretch;
    }

    #carPopup > div > div {
        width: 100%;
    }
}

@media (max-width: 380px) {
    body {
        padding: 10px;

    }

    button#downloadExcel {
        font-size: 1rem;
        padding: 10px 15px;
    }

    input,
    select,
    #selectFake {
        font-size: 0.9rem;
        padding: 10px 12px;
    }

    #carPopup {
        padding: 15px;
    }

    #carPopup h2 {
        font-size: 1.3rem;
    }

    #carPopup button {
        padding: 6px 16px;
    }
}
