:root {
    /* COULEURS */
    --text: #424242;
    --background: white;
    --accent: #424242;

    /* BORDERS */
    --border-simple: 1px solid var(--text);
    --border-fin: 1px solid var(--text);
    --border-colour: 2px solid var(--accent);

    /* BUTTONS */
    --button: rgb(229, 248, 252);
    --button-hover: var(--text);
    --button-click: var(--background);
    --button-text: var(--text);
    --button-text-hover: var(--background);
    --button-text-click: var(--text);

    /* FONTS */
    --font-base: 'Montserrat', sans-serif;
    --font-h1: "Noto Serif Display", Arial;
    --font-h23456: 'Roboto',
        sans-serif;
}

* {
    /* border: 1px grey dotted; */
    padding: 0;
    margin: 0;
    font-family: var(--font-base);
    color: var(--text);
}

/* ------------ HEADER ------------ */
header {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 8dvh;
    padding: 1rem;
    margin-bottom: 20px;
    border-bottom: var(--border-colour);
}

.header-text-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 100%;
}

header img {
    height: 100%;
    width: auto;
}

/* ------------ FOOTER ------------ */
footer {
    display: flex;
    flex-direction: row;
    min-height: 25dvh;
    align-items: center;
    justify-content: space-around;
    padding: 1rem;
    margin-top: 20px;
    border-top: var(--border-colour);
}

#footer-img {
    height: 15dvh;
    width: auto;
}

/* ------------ BODY et GENERAL ------------ */
body {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    width: 90dvw;
    margin: 0 auto;
}

main {
    flex-grow: 1;
    padding: 15px;
    box-sizing: border-box;
    margin: 0 auto;
    width: 100%;
}

button {
    border-radius: 20px;
    border: var(--border-fin);
    padding: 0.5rem;
    color: var(--button-text);
    background-color: var(--button);
    font-size: 1.1rem;
}

button:hover {
    background-color: var(--button-hover);
    color: var(--button-text-hover);
    cursor: pointer;
}

button:active {
    background-color: var(--button-click);
    color: var(--button-text-click);
}

h1 {
    font-family: var(--font-h1);
    font-weight: 600;
    font-style: normal;
    font-variation-settings: "wdth" 100;
    vertical-align: center;
}

h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-h23456);
    text-align: center;
}

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

a:hover {
    text-decoration: none;
    font-style: italic;
}

/* ------------ FORM ------------ */
#filters-form {
    display: flex;
    flex-direction: column;
    border: var(--border-colour);
    border-radius: 20px;
    padding: 1.5rem;
    max-width: 600px;
    margin: 20px auto;
    z-index: 0;
}

#form-header {
    justify-content: space-between;
}

#job-count,
#page-count {
    border: var(--border-simple);
    border-radius: 20px;
    padding: 0.7rem;
}

.form-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin: 0.2rem;
}

#filters-form input[type="text"],
.filters-form-select {
    flex-basis: 80%;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.3rem;
    padding-left: 0.5rem;
    border-radius: 5px;
    background-color: var(--background-input);
    border: var(--border-simple);
}

label {
    padding-right: 0.4rem;
}

#container-villes {
    padding: 0.1rem;
    display: block;
    margin: 0 0;
}

#container-villes h5 {
    margin-bottom: 0.4rem;
}

#hebergement-container {
    display: block;
}

/* ------------ JOB LIST ------------ */
#job-list {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.job-list-item {
    border-bottom: var(--border-colour);
    padding: 8px 20px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.job-list-item:first-child {
    border-top: var(--border-colour);
}

.job-list-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 2px 0;
}

.job-list-row span {
    font-size: 1.5rem;
    margin-right: 5px;
}

.job-list-row p {
    margin-right: 15px;
}

.job-list-item-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#pagination-controls {
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin: 1rem auto 0 auto;
    max-width: 600px;
}

#pagination-controls * {
    margin: 0 1rem;
}


/* ------------ OFFER PAGE ------------ */
.job-offer-section {
    border-bottom: var(--border-colour);
    padding: 1rem;
    text-align: left;
}

.job-offer-section:first-of-type,
.job-offer-section:last-of-type {
    border-bottom: none;
}

.job-offer-section .center {
    text-align: center;
}

.job-offer-section strong {
    font-weight: 600;
}

/* ------------ MEDIA QUERIES ------------ */
@media (max-width: 850px) {
    header {
        flex-direction: column;
        justify-content: center;
    }

    .header-text-container {
        display: none;
    }
}

@media (max-width: 700px) {
    #footer-img {
        display: none;
    }

    .footer-container {
        text-align: center;
    }
}

@media (max-width: 576px) {
    body {
        width: 100dvw;
    }

    button {
        font-size: 0.9rem;
    }

    /* ------------ INDEX PAGE ------------ */
    .form-row {
        flex-direction: column;
    }

    .form-row button:first-child {
        margin-bottom: 1rem;
    }

    .form-row input[type="submit"] {
        margin-bottom: 5px;
    }

    #hebergement-container {
        display: flex;
        flex-direction: row;
        justify-content: center;
    }

    #hebergement-container label {
        padding-left: 0.2rem;
    }

    .job-list-item {
        flex-direction: column;
        padding: 8px 10px;
    }

    .job-list-row h3 {
        width: 100%;
        text-align: center;
    }

    .job-list-item-right button {
        width: 30%;
        margin: 0.5rem auto 0 auto;
    }

    /* ------------ OFFER PAGE ------------ */
    .row {
        flex-direction: column;
    }

    .row button {
        margin-bottom: 5px;
    }
}

/* ------------ STLYES FOR PRINTING OFFER PAGE ------------ */
@media print {

    body,
    main {
        width: 100dvw;
        height: 100dvh;
    }

    .row,
    footer {
        display: none;
        margin: 0;
        padding: 0;
    }

    header {
        height: 120px;
        margin: 0;
        padding: 10px;
    }

    section * {
        orphans: 2;
        widows: 2;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        break-after: avoid-page;
    }

    .job-offer-section {
        border-bottom: var(--border-simple);
    }

    header {
        border-bottom: var(--border-simple);
    }
}