@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap');

/**** Reset ****/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: none;
    outline: none;
}

/**** Style général de la page ****/

body {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Roboto", sans-serif;
    background-color: #f8f5f2;
}

header,
footer {
    padding: 20px 15px;
}

header h1 {
    text-align: center;
    text-transform: uppercase;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

header .details {
    font-size: 20px;
    font-weight: 400;
    line-height: 30px;
}

.details .main__title {
    font-weight: 700;
    font-style: italic;
}

.main__content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
}

.container {
    padding: 25px;
    background-color: #fffffe;
    border: 2px solid #232323;
    border-radius: 8px;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.4);
    text-align: center;
    margin: 15px;
}

.title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
}

.converter__article {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input__field {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 5px;
}

.input__field.converter {
    margin-right: 15px;
}

input {
    background-color: #f8f5f2;
    font-size: 22px;
    text-align: center;
    padding: 15px 0;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 2px solid transparent;
    appearance: none;
    -moz-appearance: textfield;
    /* Suppression des flèches de l'input number sur Mozilla */
    transition: border 0.3s ease-in-out;
}

input::-webkit-inner-spin-button,
input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input:focus {
    border: 2px solid #232323;
}

input,
select,
.btn {
    font-family: "Roboto", sans-serif;
}

#result__box {
    pointer-events: none;
}

#input__category,
#result__category {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 27px;
}

#input__category,
.input__box__converter {
    color: #078080;
}

#result__category,
.result__category__box {
    color: #f45d48;
}

select {
    width: 100%;
    font-size: 20px;
    font-weight: 600;
    padding: 10px;
    background-color: #f8f5f2;
    border-radius: 3px;
}

.btn {
    padding: 10px 30px;
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 30px;
    margin-bottom: 20px;
    border: 2px solid #232323;
    background-color: #fffffe;
    color: #232323;
    transition: background-color 0.3s ease-in-out,
        color 0.3s ease-in-out;
}

.btn:hover {
    background-color: #232323;
    color: #ffffff;
}

footer {
    display: flex;
    justify-content: center;
    align-items: center;
}

footer span {
    text-align: center;
    font-size: 20px;
    font-weight: 500;
}

/**** Responsive design ****/

@media screen and (max-width: 767px) {
    .container {
        width: 95%;
        padding: 15px;
    }

    .converter__article {
        flex-direction: column;
        width: 100%;
    }

    .input__field.converter {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .input__field.converter,
    .input__field.result {
        display: flex;
        flex-direction: column-reverse;
        width: 100%;
    }

    input {
        width: 100%;
    }
}